Sample File
The following sample files show how to import discount codes:
General
ID
Description | Example Value |
Shopify's unique discount identifier |
|
If present, the ID will be used to find an existing discount on the store. When importing, the ID will be used to see if the discount already exists. If there's no ID match the app will attempt to find an existing discount using the Code
or Title
.
Title
Description | Example Value |
Name of the discount |
|
The display name of the discount that appears in the Shopify admin. This field is required unless there's a unique code present that can identify the discount.
Command
Description | Example Value |
Action to perform: MERGE, DELETE, NEW |
|
MERGE: Update existing discount or create if not found
DELETE: Remove the discount from the store
NEW: Create a new discount (will fail if discount already exists)
UPDATE: Update existing discount (fails if not found)
REPLACE: Delete existing discount and create new one
IGNORE: Skip this discount row
Code
Description | Example Value |
Discount code that customers use at checkout |
|
The code customers enter at checkout to apply the discount. You can have multiple codes for one discount by duplicating the row with the same ID or Title.
Code Command
Description | Example Value |
Code action: MERGE, REPLACE, DELETE |
|
MERGE: Add codes without removing existing ones
REPLACE: Replace all existing codes with those in the file
DELETE: Remove codes listed in the file
Code Used Count
Description | Example Value |
Number of times the discount code has been used - Export only |
|
The number of times this specific discount code has been used. This field is export-only and cannot be imported.
Total Used Count
Description | Example Value |
Total number of times the discount has been used - Export only |
|
The total number of times the discount has been used across all codes. This field is export-only and cannot be imported.
Type
Description | Example Value |
Type of discount |
|
The type of discount being created. Available options:
Amount off Products: Discount on specific products or collections
Amount off Order: Discount on the entire order total
Free Shipping: Free shipping for qualifying orders
Buy X Get Y: Purchase specific items to get others at discount or free
Method
Description | Example Value |
Application method: Code, Automatic |
|
Code: Customers must enter a discount code at checkout
Automatic: Discount is automatically applied when conditions are met
Value Type
Description | Example Value |
How the discount value is calculated |
|
The type of discount value:
Percentage: Discount as a percentage (e.g., 25% off)
Fixed Amount: Discount as a fixed amount (e.g., $20 off)
Free: Items are given for free (for Buy X Get Y)
Value
Description | Example Value |
Discount amount or percentage |
|
The discount value. For percentage discounts, enter the percentage number (e.g., 20 for 20%). For fixed amount discounts, enter the amount.
Minimum Requirement
Description | Example Value |
Type of minimum purchase requirement |
|
The type of minimum requirement for the discount:
None: No minimum requirement
Amount: Minimum order subtotal required
Quantity: Minimum quantity of items required
Minimum Value
Description | Example Value |
Minimum subtotal or quantity required |
|
The minimum value required when Minimum Requirement is set to Amount or Quantity.
Limit Total Times
Description | Example Value |
Maximum number of times discount can be used |
|
The total number of times the discount can be used across all customers. Leave empty for unlimited uses.
Limit One Use Per Customer
Description | Example Value |
Whether each customer can use discount only once |
|
TRUE: Each customer can use the discount only once
FALSE: Customers can use the discount multiple times
Limit Uses Per Order
Description | Example Value |
Maximum number of uses per single order |
|
Controls how many times a discount can be used per order. For "Amount off Products" with "Fixed Amount": 1 = once per order, 0 = unlimited.
Status
Description | Example Value |
Current status - Export only |
|
The current status of the discount based on timing:
Active: Currently available for use
Scheduled: Will become active in the future
Expired: No longer available for use
This field is export-only and cannot be imported.
Starts At
Description | Example Value |
Date and time when discount becomes active |
|
The date and time when the discount becomes active. If left blank, the current time will be used, meaning the discount will be active immediately.
ISO-formatted timestamps (eg, 2024-06-01T00:00:00Z
) are also supported. If no timezone is specified, the store's timezone will be used.
Ends At
Description | Example Value |
Date and time when discount expires |
|
The date and time when the discount expires. Leave empty if the discount should never expire.
ISO-formatted timestamps (eg, 2024-08-31T23:59:59Z
) are also supported. If no timezone is specified, the store's timezone will be used.
Created At
Description | Example Value |
Date and time when discount was created - Export only |
|
The timestamp when the discount was originally created. This field is export-only and cannot be imported.
Updated At
Description | Example Value |
Date and time when discount was last modified - Export only |
|
The timestamp when the discount was last modified. This field is export-only and cannot be imported.
Summary
Description | Example Value |
Detailed description of the discount rules - Export only |
|
A human-readable summary of the discount rules and conditions. This field is export-only and cannot be imported.
Row
Description | Example Value |
Row number for multi-row data |
|
Used when a discount spans multiple rows (e.g., when including multiple codes or rules).
Top Row
Description | Example Value |
Whether this is the first row for this discount |
|
TRUE: This is the primary row for the discount
FALSE: This is a secondary row for additional codes or data
Applies To: Type
Description | Example Value |
What the discount applies to |
|
What the discount applies to:
All: All products in the store
Specific Products: Only specified products
Specific Collections: Only products in specified collections
Applies To: Values
Description | Example Value |
Specific products/collections the discount applies to |
|
Comma-separated list specifying which products or collections the discount applies to:
For whole products: Use product handles (e.g.,
wireless-headphones,gaming-mouse
)For specific variants: Use
handle|SKU
format (e.g.,laptop-backpack|WH4567
)For collections: Use collection handles
Type-Specific
Buy X Get Y: Customer Buys Type
Description | Example Value |
What customers must buy to get the discount |
|
What customers must purchase to qualify for the discount:
Products: Specific products
Collections: Products from specific collections
Amount: Minimum dollar amount
Buy X Get Y: Customer Buys Values
Description | Example Value |
Specific items customers must buy |
|
Comma-separated list of what customers must purchase:
For whole products: Use product handles
For specific variants: Use
handle|SKU
formatFor collections: Use collection handles
Buy X Get Y: Customer Gets Quantity
Description | Example Value |
Quantity of items customers get for free/discount |
|
The number of items customers receive at the discount or for free when they meet the purchase requirements.
Free Shipping: Country Codes
Description | Example Value |
Countries where free shipping applies |
|
Comma-separated list of two-letter country codes where free shipping applies:
Use 2-letter country codes (e.g.,
US,CA,AU
)Use
*
for "Rest of the World"Countries must be added to at least one shipping zone
Free Shipping: Over Amount
Description | Example Value |
Minimum order amount for free shipping |
|
The minimum order subtotal required to qualify for free shipping.
Eligibility
Eligibility: Customer Type
Description | Example Value |
Type of customer eligibility rule |
|
The type of customer eligibility:
All Customers: Available to all customers
Specific Customers: Only specific customers can use
Customer Segments: Only customers in specific segments can use
Eligibility: Customer Values
Description | Example Value |
Specific customers or groups who can use |
|
Comma-separated list specifying who can use the discount:
If Customer Type is "Segments": Customer segment names
If Customer Type is "Customers": Customer email addresses
Purchase Type
Purchase Type
Description | Example Value |
Type of purchase the discount applies to |
|
The type of purchase the discount applies to:
One-time: One-time purchases only
Subscription: Subscription purchases only
Both: Both one-time and subscription purchases
Purchase Type: Recurring Subscription Limit
Description | Example Value |
Number of billing cycles discount applies to |
|
Controls how many billing cycles the discount applies to:
1: First payment only
Number > 1: Specific number of recurring payments
Empty: All recurring payments
Combinations
Combines with Product Discounts
Description | Example Value |
Whether discount can combine with product discounts |
|
TRUE: This discount can be used with product-level discounts
FALSE: This discount cannot be combined with product-level discounts
Combines with Order Discounts
Description | Example Value |
Whether discount can combine with order discounts |
|
TRUE: This discount can be used with other order-level discounts
FALSE: This discount cannot be combined with other order-level discounts
Combines with Shipping Discounts
Description | Example Value |
Whether discount can combine with shipping discounts |
|
TRUE: This discount can be used with shipping discounts
FALSE: This discount cannot be combined with shipping discounts
Shareable Links
Shareable Link: Target
Description | Example Value |
What the shareable link targets |
|
What the shareable link points to:
Product: Links to a specific product
Collection: Links to a product collection
URL: Links to a custom URL
Shareable Link: Title
Description | Example Value |
Title for the shareable link |
|
The title text that appears with the shareable discount link.
Shareable Link: URL
Description | Example Value |
URL for the shareable link |
|
The URL that the shareable link points to.
Shareable Link: Image URL
Description | Example Value |
Image URL for the shareable link |
|
The URL of the image to display with the shareable discount link.
Export Filters
You can use these filters to limit which discounts are exported:
id
: Filter by specific discount IDstitle
: Filter by discount titlecode
: Filter by discount codestatus
: Filter by discount status (active, scheduled, expired)type
: Filter by discount typemethod
: Filter by discount method (code, automatic)created_at
: Filter by creation dateupdated_at
: Filter by last update datestarts_at
: Filter by start dateends_at
: Filter by end datetotal_used_count
: Filter by total usage countusage_limit
: Filter by usage limitapplies_once_per_customer
: Filter by one-use-per-customer setting