Exporting discount codes from your Shopify store into a CSV file is a straightforward process that allows you to analyze and review your discounts in detail. Here's how you can export your discount codes and manage them effectively using Google Sheets or a text editor.

Exporting Discount Codes

  1. Navigate to the Discounts Page:

    • From your Shopify admin, go to Discounts.
  2. Initiate Export:

    • Click the Export button located at the top of the page.  Navigating Discount Page
  3. Choose Export Options: Choosing Export Options

    • You can choose to export:
      • Current page: Export the discounts displayed on the current page of your admin.
      • All discounts: Export all discounts in your store.
      • Selected discounts: Export only the discounts you have manually selected.
      • Current search: Export discounts that match your current search or filter criteria. 
  4. Select File Format:

    • Choose CSV for Excel, Numbers, and other spreadsheet programs if you intend to use a spreadsheet application.
    • Choose Plain CSV file if you plan to use a text editor.
  5. Download the File:

    • Click Export discounts to download your CSV file.

Importing Your Discounts CSV into Google Sheets

  1. Open Google Sheets:

    • Log in to your Google account and open a new spreadsheet.
  2. Import CSV File:

    • Go to File > ImportNavigating Google Sheet
    • Choose Upload and then drag your CSV file into the space provided or use the file picker to select your CSV file from your computer. Uploading CSV File
  3. Set Import Options:

    • Choose how you want the CSV data to be added to your sheet (e.g., replace the current sheet, insert new sheet, etc.). Navigating Import Options
  4. Edit Your CSV in Google Sheets:

    • Once imported, your CSV data will appear as a new sheet or replace the current sheet, depending on your selection. You can now edit your discounts directly in Google Sheets.

Using a Text Editor to Edit Your Discounts CSV

  1. Open the CSV File:

    • Open your CSV file using a text editor of your choice, such as Notepad, Visual Studio Code, or Sublime Text. 
  2. Edit with Caution:

    • Carefully make changes to your CSV. Ensure that each field is separated by a comma and that your changes follow the CSV format rules.
    • Save your changes regularly to avoid losing any data.
  3. Formatting Tips:

    • Ensure that fields containing commas are enclosed in quotation marks.
    • Ensure line breaks are used to separate each record.

Important Notes

  • Encoding: Always save your CSV file with UTF-8 encoding to ensure compatibility when importing back into any system.
  • Backup: Before making major changes to your CSV file, make a backup copy to prevent data loss.
  • Limitations: Remember that while you can export discount codes to CSV, Shopify does not support importing discount codes via CSV. Any edits or new discounts need to be manually entered into Shopify.

By following these steps, you can efficiently manage your discount codes outside of Shopify, allowing for bulk edits, detailed analysis, and backups, enhancing your promotional strategies and operational efficiency.

Back to blog