Exporting discount codes

You can export your discount codes to a CSV file from theDiscountspage of your Shopify admin to see a broad overview of your discount code history.

CSV files

CSV stands for Comma Separated Values, and it's a file format (.csv) for spreadsheets. Shopify accepts the import and export of CSV files for theproducts,customers,orders (export only), anddiscounts (export only)of your store.

CSV files might seem intimidating at first, but when you understand what the text and characters represent in a spreadsheet, you might use it to perform some bigger tasks (such as bulk editing products and discounts).

In a CSV file, each entry represents a cell in a spreadsheet, each line represents a new row, and each comma indicates where one entry ends and another one begins.

For example, the entries in this customer CSV file:

look like this in a spreadsheet program:

Shopify recommends usingGoogle Sheetsto view a formatted version of your CSV files. To use Google Sheets, youmust import the CSV file into the program。华禾投资对于商店非常有用:

  • are switching to Shopify from another e-commerce platform
  • have a list of customer accounts
  • prefer to upload products using a spreadsheet
  • temporarily have limited internet connectivity.

Export your discount codes

Steps:

  1. From your Shopify admin, go toDiscounts

  2. From theDiscountspage, clickExport

  3. Click one of the following export options:

    • Current pageto export the discounts showing in your admin
    • All discountsto export all your store's discounts
    • Selected discountsto export discounts you have selected
    • Current searchto export a filtered list of discounts.
  4. Select which file format you would like:

  5. ClickExport discountsto download your discounts CSV.

After you export your discount codes to a CSV file, you canimport it into Google Sheetsto view a formatted version of your discounts CSV.

Import your discounts CSV into Google Sheets

Steps:

  1. Log in to your Google account andstart a new spreadsheet

  2. From theUntitled Spreadsheetpage, go toFile>Import...:

  3. Locate and select the CSV file that you want to edit.

  4. In theImport filedialog, select your preferred options under theImport action,Separator character, andConvert text to numbers and datessections.

  5. ClickImport

From here you can edit your CSV. When you finish, you can export it from Google Sheets as a CSV file.

Use a text editor to edit your discounts CSV file

If you don't have a spreadsheet program, then you can edit CSV files using a text editor.

Most computers have text editors that can open CSV files. You can also use a program likeVisual Studio CodeorSublime Textto edit and debug your CSV file.

When you format your CSV file in a text editor, observe the following considerations:

  • Column headers must be separated by commas (for example,First Name,Last Name,Email,Company,Address1).
  • The list of tags must be wrapped in quotation marks (for example,"tag1,tag2,tag3").
  • Tags are not case sensitive.
  • Different records must be separated by line breaks.
Ready to start selling with Shopify?Try it free