The Discount Codes Import from File feature allows you to bulk import discount codes into your Shopify store using a CSV file. This powerful tool enables you to create multiple discount codes with custom settings, active dates, usage limits, and automatically send them to customers via email.
When to Use This Feature
Bulk Code Creation: Create hundreds or thousands of discount codes at once
Pre-generated Codes: Import existing discount codes from external systems
Customer-Specific Discounts: Send unique discount codes to specific customers
Seasonal Campaigns: Set up multiple campaigns with different active dates in one import
Advanced Requirements: Configure minimum purchase amounts, quantity limits, and combination rules per code
Getting Started
Step 1: Prepare Your CSV File
Download one of our templates to get started:
Simple Template - Basic discount codes with dates
Advanced Template - All available options
Step 2: Fill in Your Data
Edit the CSV file with your discount code data. See the Column Reference below for details on each field.
Step 3: Upload and Import
Navigate to Bulk Operations → New Bulk Operation
Select Discount Codes tab
Review any validation errors
Configure email sending (optional)
Click Import now or Schedule for later
CSV Column Reference
Required Columns
These columns must be present in your CSV file:
Internal title/description for the discount code
Type of discount: fixed or percentage
Discount value (dollar amount or percentage)
Optional Columns
Add these columns to customize your discount codes:
Basic Settings
Column
Description
Format
Example
Discount code customers will use. If empty, auto-generated
Prefix for auto-generated codes (only if code is empty)
Date & Time
Column
Description
Format
Example
When the discount becomes active
When the discount expires
Supported Date Formats:
YYYY-MM-DD (recommended): 2026-12-25
Note: If your file contains ambiguous dates (like 01/05/2026), you'll be asked to specify if the first number represents day or month.
Usage Limits
Column
Description
Format
Example
Total number of times code can be used
Limit to one use per customer
For fixed discounts: apply once per order vs per item
Minimum Requirements
Column
Description
Format
Example
Minimum order amount required (in shop currency)
Minimum quantity of items required
Note: Only one minimum requirement can be set per discount code. If both are provided, minimum_purchase_amount takes precedence.
Purchase Type
Column
Description
Format
Example
What the discount applies to
one-time, subscription, or both
one-time (default): Only one-time purchases
subscription: Only subscription purchases
both: Both one-time and subscription purchases
Combination Settings
Control whether this discount can be combined with other discounts:
Column
Description
Format
Example
combines_with_product_discounts
Can combine with product discounts
combines_with_order_discounts
Can combine with order discounts
combines_with_shipping_discounts
Can combine with shipping discounts
Customer Notification
Column
Description
Format
Example
Customer email to send discount code to
Shopify customer ID (alternative to email)
Note: Email sending must be enabled in the import form. The app will send the discount code to customers listed in the CSV.
Example 1: Simple Seasonal Discounts
Create basic discount codes with active dates:
Example 2: Customer-Specific Discounts
Send unique discount codes to specific customers:
Example 3: Advanced Configuration
Full control with minimum requirements and combination rules:
Auto-Generated Codes
If you don't provide a code column or leave it empty, the system will automatically generate unique codes for you.
Generated code example: AbC123xY
Generated code example: FLASHabc123 (prefix + random characters)
Prefix Rules:
Only used when code column is empty or not provided
Helps organize and identify discount codes
1. Test with Small Batches First
Start with a CSV file containing 5-10 discount codes to ensure everything is configured correctly before importing thousands of codes.
2. Use Clear, Descriptive Titles
Titles are internal and help you identify discount codes in your Shopify admin:
✅ Good: "Summer Sale 2026 - 20% Off", "VIP Customer - $50 Off"
❌ Poor: "Discount 1", "Code ABC"
3. Set Appropriate Usage Limits
Consider your campaign goals:
Single Use: Set usage_limit=1 and once_per_customer=true for one-time offers
Limited Campaign: Set usage_limit=500 to cap total uses
Unlimited: Leave usage_limit empty for unlimited uses
4. Plan Your Active Dates
Set starts_at in the future to schedule campaigns
Set ends_at to automatically expire codes
Leave ends_at empty for codes that never expire
5. Be Strategic with Combinations
Enable combines_with_shipping_discounts=true for free shipping offers
Disable all combinations for exclusive offers
Use once_per_order=true for fixed discounts to prevent stacking per item
6. Validate Before Importing
The app will show validation errors before import. Common issues:
Missing required columns (title, discount_type, discount_value)
Invalid discount types (must be fixed or percentage)
Invalid boolean values (must be true or false)
Common Use Cases
Use Case 1: Welcome Discount Campaign
Send unique 15% off codes to new customers:
Use Case 2: Bulk Order Incentives
Encourage larger orders with minimum purchase requirements:
Use Case 3: Flash Sale Event
Create time-limited discounts:
Combine fixed discount with shipping discount combination:
Troubleshooting
Issue: Import fails with "No file uploaded"
Solution: Make sure you've selected a CSV file and the file is not corrupted.
Issue: "Row X: title is required"
Solution: Every row must have a title. Check that the title column is filled in for all rows.
Issue: "Row X: discount_type must be 'fixed' or 'percentage'"
Solution: Check the discount_type column. Valid values are exactly fixed or percentage (lowercase).
Issue: "Row X: discount_value must be a number"
Solution: Ensure discount_value contains only numbers (no currency symbols like $ or %).
Issue: Dates are interpreted incorrectly
Solution: Use the YYYY-MM-DD format (e.g., 2026-12-25) or specify your date format when prompted.
Issue: Codes not sent to customers
Solution:
Check that "Send discount codes to customers" is enabled in the import form
Verify email addresses in the CSV are valid
Ensure you've selected an email sender and template
Issue: Generated codes are too similar
Solution: The system generates random unique codes. If you need specific patterns, provide your own codes in the code column.
Product/Collection Targeting: Currently, imported codes apply to all products. For product-specific discounts, use the Bulk Create feature.
Customer Eligibility: Imported codes are available to all customers. Customer segment targeting is not supported via import.
Code Format: Codes must be 3-20 characters, alphanumeric with hyphens and underscores only.
Additional Resources
If you have questions or need assistance:
Contact support via email or in-app chat