To send unique discount codes in Shopify emails, you need more than Shopify Email, which can only include one shared code for everyone. There are three ways to do it: an email platform that creates Shopify codes for you, a batch of codes generated in Shopify and imported into your email platform as a custom field, or a coupon app that creates a code per person and passes it to your emails. In Audienceful, the second and third methods work today: imported codes go into campaigns through merge tags, and codes passed in with an event work in any automation.
We make Audienceful. App prices and vendor documentation below were checked on 14 November 2026. Each method is described so it works on its own, whatever platform you use.
Why unique discount codes are worth the effort
A shared code like WELCOME10 is easy, but it has three problems:
- It leaks. Shared codes end up on coupon sites and browser extensions, so people who never signed up use them.
- It can't expire per person. One end date applies to everyone. You can't honestly say "your code expires in 7 days" when the code works for anyone with no end date.
- It blurs attribution. When the same code appears in your welcome email, a popup and an influencer post, you can't tell which one drove the order.
A unique code works once, for one person, so leaks stop at one order, and each code can carry its own expiry. You'll also know exactly which email it came from.
Can Shopify Email send unique discount codes?
No. Seguno's help center, which documents the bulk-code route for many email platforms, states plainly that Shopify Email does not support inserting unique discount codes. Shopify Email (now part of Shopify Messaging) can include a shared code you create in Shopify. For per-person codes, use one of the methods below.
The three methods compared
| Method | Works in automations | Per-recipient expiry | Typical cost (checked 14 Nov 2026) | Setup time |
|---|---|---|---|---|
| 1. Email platform generates Shopify codes | Yes | Yes, within the platform's options | Included in the platform | Minutes per discount |
| 2. Bulk codes, CSV import, merge tag | Campaigns; automations only if you manage the pool | Only if you create codes with an end date | Bulk Discount Code Bot free for 3 discount sets, then $19 or $99 a month | 20 to 30 minutes per batch |
| 3. Coupon app passes a code per person | Yes | Yes, set in the app | Varies by app and volume | An hour or so, once |
Method 1: An email platform that generates Shopify codes
Some email platforms connect to Shopify's discount API and create a code for each recipient at send time. You set up a parent discount (the rules: amount, minimum, eligibility), and the platform creates a child code under it for each person who receives the email.
Klaviyo is the best-known example. Its unique coupon codes for Shopify feature lets you set an expiry as a fixed date or a number of days or hours after the code is created, and its help center notes that Shopify caps each store at 20 million unique codes. Seguno Email has this built in as well, per Seguno's documentation.
Strengths: works in flows as well as campaigns, no code pool to manage, per-person expiry.
Watch for: the expiry options are only as flexible as the platform makes them, and code dates may follow a different time zone than your Shopify store. Klaviyo's help center notes that its dates are set in UTC, so expiry times in Shopify can look different from what you set.
If you're weighing Klaviyo for this, our Shopify Email vs Klaviyo comparison and Audienceful vs Klaviyo page cover the wider trade-offs.
Method 2: Bulk-generate codes, import them, use a merge tag
This method works with any email platform that supports custom fields and merge tags, including Audienceful. You generate a batch of single-use codes in Shopify, give one to each contact, and insert the right one into each email.
Step 1: Generate the codes
Shopify's admin doesn't have a bulk code generator, so use an app. Bulk Discount Code Bot, made by Seguno, generates or imports unique codes for a Shopify discount and exports them to CSV. Its listing shows a free plan with three discount sets, Basic at $19 a month for unlimited generation, and Grow at $99 a month with reporting and integrations.
- In Shopify, create the parent discount under Discounts: amount, minimum purchase, eligibility, combinations and an end date if you want one.
- In the app, create a discount set for that discount with at least as many codes as you have recipients, plus a margin.
- Export the codes to CSV.
Step 2: Match codes to contacts
- Export the audience you're sending to from your email platform as a CSV.
- In a spreadsheet, paste the codes into a new column next to the email addresses, one code per row.
- Save the file with two columns:
emailanddiscount_code.
Step 3: Import the codes as a custom field
In Audienceful, import the CSV into the same audience and create a discount_code field from the import dialog, as described in our custom fields guide. Spot-check a few contacts afterwards to confirm each one has a code.
Step 4: Add the merge tag to your email
In the editor, type { and choose the discount_code field. Each recipient sees their own code. If you link the button to Shopify's discount URL format (yourstore.com/discount/CODE), use the merge tag in the link too, so the code applies at checkout without typing. Send a test to yourself before the campaign goes out (how merge tags work).
Strengths: works with almost any platform, cheap, and the code rules live in Shopify where you can see them.
Limits: it's a manual process per batch, best suited to campaigns such as a VIP offer or a birthday month send. For automations, you'd need to keep refilling the pool as new people enter the flow, which is where Method 3 is better.
Method 3: A coupon app that passes a code per person
Coupon-delivery apps create a unique Shopify code when something happens (a signup, a purchase, a tag) and pass it to your email platform. Coupon Carrier, for example, lists integrations with Shopify, Zapier, Mailchimp, ActiveCampaign, HubSpot and Brevo, and includes single-use codes on every plan. Its pricing page loads the dollar figures dynamically, so check the current rates there.
In Audienceful, the code arrives as an event property. The flow looks like this:
- Something triggers the code. A new subscriber, a first order, a birthday date or a customer going quiet.
- The coupon app creates a unique Shopify code under your parent discount, with the expiry you set.
- Zapier or the API sends an event to Audienceful with the person's email and the code as an event property. See custom automation events and our Zapier integration.
- The automation starts. Type
%in the editor to insert the code from the event into any email in the flow, including the reminders.
This is the method to use for purchase-triggered codes and flows that run every day, because nothing needs refilling. The forum question that ranks for this topic, a merchant needing unique, expiring codes emailed after a purchase, is exactly this pattern.
Settings by use case
| Use case | Discount | Expiry per code | Method | Read more |
|---|---|---|---|---|
| Welcome (popup signup) | 10% off first order | 7 days | 1 or 3 | Welcome discount popup |
| Birthday | 15% off or a gift | 14 days, starting on the birthday | 1 or 3 (2 for a monthly birthday campaign) | Shopify email flows |
| Win-back | 15% to 20% off | 10 days | 1 or 3 | Shopify win-back email |
| Review thank-you | 10% off next order | 30 days | 1 or 3 | Review request email |
| VIP offer | Free shipping or 20% off | End of campaign | 2 | VIP customer email |
With per-person expiry, the reminder email can tell the truth: "Your code expires in 48 hours." That reminder is often the email that converts, which is why unique codes pay off most in welcome and win-back flows. For the full welcome series around the code, see our Shopify welcome email guide.
Gotchas
- Searching for a code in Shopify admin. Codes created in bulk sit inside their parent discount. If searching the Discounts list for a single code finds nothing, open the parent discount and look at its codes.
- Combining with other discounts. Set combinations on the parent discount. A welcome code that stacks with a sitewide sale can cost more than you meant.
- The code pool running out. With Method 2, a flow that keeps sending after the imported codes run out sends emails with an empty code. Compare the number of unused codes with the number of people due to receive one, and refill the pool before it empties.
- Shopify's code limit. Each store can hold up to 20 million unique discount codes, per Shopify's discount code documentation. Busy stores generating codes for every email should clean up expired ones occasionally.
- Time zones. Shopify sets discount dates in your store's time zone. Apps and platforms that set expiry in UTC can make a code expire a few hours earlier or later than the email says. Round deadlines to the day.
- Test the full path. Send yourself the email, use the code at checkout, then try it again. The second attempt should fail.
Which method should you pick?
- You send a few campaigns with codes each year: Method 2. It's cheap and needs no new tools.
- You want unique codes in welcome, win-back or post-purchase flows: Method 1 if your platform supports it, otherwise Method 3.
- You're on Shopify Email: Method 2 or 3 means moving the emails to another platform. Our Shopify Email alternatives guide and Audienceful vs Shopify Email page compare the options.
Whichever method you choose, Audienceful's revenue attribution credits each Shopify order to the email that drove it, so you can see whether the unique-code version of a flow earns more than the shared-code one. The AI agent can draft the emails and the reminder from a one-line brief, and a purchase check before each reminder means nobody gets nagged after they've used the code.
FAQs
Can Shopify Email send unique discount codes?
No. Shopify Email can include one shared code that you create in Shopify, but it can't insert a different code for each recipient. Use an email platform that generates codes, a CSV of codes with a merge tag, or a coupon app.
How do I create bulk unique discount codes in Shopify?
Create the parent discount in Shopify, then use an app such as Bulk Discount Code Bot to generate codes under it and export them to CSV. Shopify's admin doesn't generate bulk codes on its own.
How do I add unique codes to email automations?
Use a platform that creates codes at send time, or a coupon app that creates a code when the flow is triggered and passes it in. In Audienceful, send the code as an event property through Zapier or the API and insert it in any email in the automation.
Do unique codes expire per customer?
They can. Codes created at send time, or by a coupon app, can each carry their own expiry, such as 7 days after the email. Codes generated in one batch share the parent discount's end date.
Why can't I find my unique codes in Shopify admin?
Bulk codes usually sit inside their parent discount rather than appearing as separate discounts. Open the parent discount and search its list of codes.
Are unique codes better than a shared code?
For flows with a deadline or for stores with leaking codes, yes. They stop leaks and allow honest expiry reminders. For a small store starting out, a shared code limited to one use per customer is simpler and works fine.
Send unique Shopify codes through your flows and campaigns: start with Audienceful, free up to 1,000 contacts.
