# Import discount codes

> Bring your discount codes from Shopify, WooCommerce or a spreadsheet into Shoprocket in one go, from a CSV, Excel or JSON file. Which columns the file needs, how existing codes are matched, and what an import can't carry.

Help Centre / Marketing - Updated 2 November 2026

If you are moving from another platform, or keep your codes in a spreadsheet, you can import them all at once instead of creating each one by hand. The import reads a CSV, Excel (.xlsx) or JSON file of up to 10MB, one discount per row.

## What the file needs

The first row holds the column headers. Only **Name** is required. Columns with recognisable names are matched for you, and you can change any match before importing. To start from the right shape, click **Download CSV template** on the import page.

| Column | Notes |
|---|---|
| Name | Required. Shown to customers at checkout. |
| Code | What the customer types. Leave it blank for an automatic discount. |
| Type | `code` or `automatic`. A code when blank. |
| Amount type | `fixed` or `percentage`. Fixed when blank. |
| Value | The amount off, such as `10.00`, or the percent, such as `15`. |
| Applies to | `subtotal`, `grand_total` or `shipping`. The subtotal when blank. |
| Status | `active` or `inactive`. Active when blank. |
| Maximum discount amount | The cap on a percentage discount. |
| Usage limit, Limit per customer | Blank means no limit. |
| Starts at, Ends at | A date such as `2026-06-15`. Blank means straight away, or no end. |
| Minimum order amount, Minimum quantity | The cart must reach this to qualify. |
| First order only | `yes` or `no`. |
| Combinable, Combines code with automatic | `yes` or `no`, for discounts that stack. |

For a free shipping code, set **Amount type** to `percentage`, **Value** to `100` and **Applies to** to `shipping`. It then opens in the dashboard as **Free shipping**.

## Import a file

1. In your dashboard, go to **Discounts** and click **Import**.
2. Choose your file, or paste a link to it under **Or paste a link to a CSV, Excel or JSON file**. The link must open without signing in.
3. On **Map CSV columns**, check that each column goes to the right field, or choose **(Skip this column)**.
4. Under **Import settings**, choose the **Import mode**:
   - **Import all (create + update)**: new codes are created and codes you already have are updated.
   - **Only create new**: codes you already have are skipped.
   - **Only update existing**: only codes you already have are changed. Rows without a match are skipped.
5. Click **Start import**. When it finishes you see how many discounts were created, updated, skipped and failed, and **Download error report** gives the reason for each failed row.

![The Map CSV columns step of the discount import: the file columns matched to Name, Code, Amount type, Value, Total usage limit, Limit per customer and Ends at, next to the import settings](https://shoprocket.io/img/help/import-discount-codes/map-columns.webp)

## How existing discounts are matched

- A **code** matches the discount that already has that code, whatever its letter case. A row whose code belongs to another discount is reported as an error.
- An **automatic** discount has no code, so it matches the first one with the same name.

When a row updates a discount, empty cells leave the existing details as they are. So a file with only a few columns changes only those details.

## What an import can't carry

An import covers the parts of a discount that fit in a spreadsheet. You set these in the dashboard instead:

- **Which products or categories** a discount applies to, or that the cart must contain. Imported discounts apply to the whole order. If you re-import a discount you have limited this way, your limits stay.
- **Buy X get Y** offers, and limits to **Customers with tags**.

Imported discounts show in the list like any other. Open one to add product limits after the import.

## Export your discounts

To get a file of every discount, click **Export** on the **Discounts** page. It uses the same columns as the import, so you can edit it in a spreadsheet and import it back to change many discounts at once.

## Related

- [Create a discount code](https://shoprocket.io/help/discount-codes.md)
- [Automatic discounts](https://shoprocket.io/help/automatic-discounts.md)
- [Reports and exports](https://shoprocket.io/help/reports-and-exports.md)

[Open the discount import in your dashboard](https://app.shoprocket.io/go/discounts/import)

---

- HTML version: https://shoprocket.io/help/import-discount-codes
- Language: English (en)
- Also in: [العربية](https://shoprocket.io/ar/help/import-discount-codes.md), [Deutsch](https://shoprocket.io/de/hilfe/rabattcodes-importieren.md), [Ελληνικά](https://shoprocket.io/el/help/import-discount-codes.md), [Español](https://shoprocket.io/es/ayuda/importar-codigos-de-descuento.md), [Français](https://shoprocket.io/fr/aide/importer-des-codes-de-reduction.md), [עברית](https://shoprocket.io/he/help/import-discount-codes.md), [हिन्दी](https://shoprocket.io/hi/help/import-discount-codes.md), [Bahasa Indonesia](https://shoprocket.io/id/bantuan/impor-kode-diskon.md), [Italiano](https://shoprocket.io/it/aiuto/importare-codici-sconto.md), [日本語](https://shoprocket.io/ja/help/import-discount-codes.md), [Lietuvių](https://shoprocket.io/lt/pagalba/nuolaidu-kodu-importas.md), [Norsk](https://shoprocket.io/nb/hjelp/importer-rabattkoder.md), [Nederlands](https://shoprocket.io/nl/hulp/kortingscodes-importeren.md), [Polski](https://shoprocket.io/pl/pomoc/import-kodow-rabatowych.md), [Português](https://shoprocket.io/pt/ajuda/importar-codigos-de-desconto.md), [Română](https://shoprocket.io/ro/ajutor/import-coduri-de-reducere.md), [Русский](https://shoprocket.io/ru/help/import-discount-codes.md), [ไทย](https://shoprocket.io/th/help/import-discount-codes.md), [Türkçe](https://shoprocket.io/tr/yardim/indirim-kodlarini-ice-aktarin.md), [中文](https://shoprocket.io/zh/help/import-discount-codes.md)
