Shopify bulk discount codes: generate, import, and track thousands of codes

Shopify bulk discount codes seem easy enough to generate until you realize you have to do 5,000 of them manually. Rather than clicking Create, typing in a code, entering in the value and then Save record after Save record, it requires repeating that process 4,999 more times. There is no workflow here. Only wrist numbing pain.

Instead of copying thousands of single use promo codes one by one, this video outlines a process for creating and uploading thousands of unique, traceable codes in one step: using a free online coupon generator, importing the generated promo codes via CSV, ensuring the codes are uploaded within Shopify’s admin limitations, and applying the codes to actual marketing campaigns such as influencer drop, churn win back, or holiday flash sales.

You probably just want to copy this post into the Shopify admin and stop reading. Or maybe you need different promo codes for different customers or influencers or abandoned carts, in which case keep reading.

In this post

Why bulk discount codes matter

Use one single shared code (SAVE10) instead of unique codes. Easy to implement but that is a leak in itself. Within hours your savings code will be aggregated on coupon sites and can accidentally be applied to the wrong order, eating into your margin. Unique codes mean that even if one code leaks, it is only that one code that needs to be disabled, and not your entire campaign to influencers, by email, etc.

Unique codes allow for true attribution. You can see what influencer actually drove orders, which email performed best, and what segment of churning customers was won back via the referral link. Shared links, on the other hand, do not allow for attribution.

How to generate bulk codes

The fastest way to generate discount codes is to use the FREE discount code generator on this website. Choose a prefix, length, characters, and quantity. You will then get a list of unique codes in 1 second! No account or signup is required.

Good prefix patterns matter more than people think. A prefix like VIP-2026- makes every code self-describing. So for example VIP-2026-K9F2 is much easier to debug than some random string like acij4. Support tickets coming in at 1am can’t work as well without this simple optimisation.

Codes must be 8 to 12 characters long. Anything shorter is too ambiguous and prone to collisions. Anything longer is too long and starts to feel like a serial number, and people will mis-type them. Ask anyone who has tried to type IL1 into a checkout box on a phone next to Il1 or 1l1.

CSV import workflow

Shopify does not have a native bulk discount CSV importer in the basic admin. You have three options:

  1. Shopify Functions and the Discounts API (for devs).
  2. A third-party bulk discount app from the App Store.
  3. Generate codes with the discount code generator, then bulk create them through an app that accepts a CSV of codes and one shared rule.

Option 3 is what most sellers actually want – a single easy to set up rule with the terms 15% off, valid till Dec 31st, use once per customer – and 5,000 unique activation codes created on the fly to distribute to customers. You set up the rule in the app, and the tool generates the activation codes.

Shopify admin limits you need to know

Shopify has a hard limit of around 20 million for the number of discount codes a store can have. Sounds like it’s infinite, right? Not if you have a huge influencer program that is constantly adding codes year after year. Those codes may be expired but they count. Best to clean them out quarterly.

The Discounts API is heavily rate limited for security reasons on standard plans, around 40 calls per minute. You can bulk create 10,000 discount codes through the API without hitting any limts, but running it without throttling will result in 429 errors halfway through. Any decent bulk discount app will handle this for you, but if you are scripting it yourself, you should add a sleep between calls.

Fixed vs percent vs free shipping

TypeBest forRisk
Percent off (15%)Storewide sales, influencer dropsHigh-AOV orders discount hard
Fixed amount ($10)Churn win-back, low-AOV storesLooks tiny on a $500 order
Free shippingCheckout abandonment recoveryEats margin on heavy items
BOGOApparel, cosmeticsInventory pressure

Free shipping is the quietly powerful one. Unexpected shipping costs are the number one reason for cart abandonment according to Baymard research. Free shipping codes recover more abandoned carts than 10% off codes, with only a slightly higher margin cost. But most stores offer percent off instead because it feels bigger.

Real campaign use cases

Influencer promo codes. One unique code per influencer. You can see the influencer(s) who actually converted with this feature. If an influencer gets a code out on a coupon site, you can zero out the code and continue running your campaign.

Churn win back customers who haven’t ordered in 90 days. Use the discount code generator to generate a unique code per customer, and email it with their name, eg. “Hi John, here’s $10 off your next order. XMYCODE”. These codes cannot be shared on subreddits like reddit.com/deals.

Abandoned cart recovery – Trigger on cart abandonment. Unique code good for 24 hours for one use. Conveys urgency without revealing public code to customer.

Use holiday flash sales as a prompt to generate codes for each email segment. Give the VIP segment 25% off, general list 15% off, and cold list 10% off. See which segment of buyers is the most engaged.

Tracking performance

Shopify displays base code usage counts within the admin. Exporting orders with the correct discount codes on a monthly basis and then performing a pivot in a spreadsheet allows for accurate attribution. Typically, you would then group by the prefix of the code and answer questions such as: What is the highest AOV for a given prefix? What code was redeemed most within a given prefix? What code had the highest percentage of refunds within a given prefix.

When running bulk campaigns, make sure you’re using clean variant imagery along with the products you’re discounting to ensure customers are seeing the right product about to be discounted for. See the color swatches guide for information on how to display swatches on product pages, and the collection page swatches guide for information on how to display swatches on collection pages.

Instead of listing different colors as separate items, look into Stores that sell variants in separate listings (one product per color) for ways to link those listings together. Instead of using a discount code for a collection of pants, actually group the pants together for your code.

See the live demo store, watch the tutorial video, or read the getting started guide.

FAQ

How many discount codes can a Shopify store have?

Around 20,000,000 total across all rules including expired copies. Most retailers do not reach this number, and influential users are advised to maintain their promo codes on a quarterly basis.

Can Shopify import discount codes via CSV natively?

These are not included in the standard admin. You would need either a third-party app such as a bulk discount app, or the Discounts API. You can use a free code generator to generate codes, and then import them using the app of your choice.

What is the best code length for bulk campaigns?

8-12 characters + readable prefix. Shorter names too similar and collide, longer names get mis-typed at checkout, especially on mobile.

Should I use percent off or fixed amount?

Percent off for high AOV stores and for use on store wide promotions. Fixed amount for churn win back and low AOV stores. A dollar amount feels more appropriate for these cases.

How do I prevent discount code abuse?

Unique one-use-per-customer promo codes with a limited validity period. Minimum purchase amount requirement. Excludes products that have already been discounted. Analyze order history for abnormal promo redemption.

Can I track which influencer drove a sale with a bulk code?

Yes. You can get per-influencer attribution by exporting orders filtered by prefix without needing any extra tracking pixels if each influencer has a unique prefix.

Do bulk codes work with Shopify Markets?

Yes. Vouchers/code will work on the Markets page by default. You can however add in countries to a price rule if you wanted to offer a flash sale just in Europe for example.

Co-Founder at Craftshift