Exporting discount codes
You can export your discount codes to a CSV file from the Discounts page of your Shopify admin to see a broad overview of your discount code history.
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 the products, customers, orders (export only), and discounts (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:
- 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
To export discount codes:
From your Shopify admin, go to Discounts.
From the Discounts page, click Export:
Click one of the following export options:
- Current page to export the discounts showing in your admin
- All discounts to export all your store's discounts
- Selected discounts to export discounts you have selected
- Current search to export a filtered list of discounts.
Select which file format you would like:
Click Export discounts to download your discounts CSV:
After you export your discount codes to a CSV file, you can import it into Google Sheets to view a formatted version of your discounts CSV.
Import your discounts CSV into Google Sheets
To import your CSV in to Google Sheets:
On the Google Sheets page, click Blank in the Start a new spreadsheet section:
From the Untitled Spreadsheet page, go to File > Import...:
Locate and select the CSV file that you want to edit.
In the Import file dialog, select your preferred options under the Import action, Separator character, and Convert text to numbers and dates sections.
Your CSV will look something like this after you've uploaded it:
From here you can edit your CSV. When you are done, 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.
To format your CSV file in a text editor:
- 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,
- Different records must be separated by line breaks.