- Use unique codes anywhere the offer is meant for one person: welcome, birthday, abandoned checkout, win-back. A shared code is fine for a public sale.
- Flows create codes on their own. Campaigns don't: you must generate at least as many codes as expected recipients, or Klaviyo won't let you send.
- Each code can be redeemed once, but a person can still share theirs.
- Keep your offers tiered: non-customers get the welcome offer and never a bigger one.
- Unique codes don't work on subscription orders, such as those run through Recharge.
This is for Shopify founders who are tired of seeing their welcome code on coupon sites and want to know how to set unique codes up without breaking a flow or a send.
When should I use unique coupon codes instead of one static code?
A static code like WELCOME10 is one code for everyone. It's simple, and it's also the code that ends up on a coupon extension within a week. Anyone who never signed up can use it, and you can't tell who did.
A unique code is tied to one profile. Klaviyo says "each code can be redeemed once, but the recipient can still share it with someone else." So it won't stop all sharing, but it caps the damage at one order per code, and you can see on each profile which code they were given.
My rule of thumb:
- Unique codes for anything personal or automated: the welcome series, birthday flow, abandoned checkout if you discount there, and win-back.
- A static code for a public promotion you'd happily see shared, like a sitewide sale.
Whichever you use, keep the ladder straight. Non-customers get the welcome offer and never a bigger one. If your birthday email gives a first-time subscriber more than your welcome popup did, you've just taught people that waiting pays. I cover how I structure offers in email discount strategy.
How do I set up unique coupon codes in Klaviyo for Shopify?
Go to Content > Coupons and click Create Shopify Coupon. The settings, per Klaviyo's guide:
- Name: you'll use this exact name when you add the coupon to a message, so make it clear (for example,
welcome-10-pct). - Prefix: optional text added to every code, like WELCOME. Klaviyo adds 8 random letters and numbers after it.
- Discount type: a fixed amount off, a percentage off, or free shipping. Free shipping can be limited to certain rates or countries.
- Applies to: the entire order, specific products or specific collections.
- Minimum purchase: the cart has to reach a set amount before the code works.
- Combinations: which other discount types it can stack with in one order.
- Activation date: a set date, or have codes activate at send time.
- Expiration: campaign codes can expire after 1 year or on a specific end date. Flow codes can also expire after a set number of days or hours.
That last one is worth knowing. A flow code set to expire after a number of hours gets a grace period: Klaviyo's example is that a code set to expire after 4 hours has a validity window of 28 hours. So "expires in 4 hours" in your copy is true, but the code will quietly work longer. Klaviyo also notes all dates are in UTC, so Shopify may show a different date than you expect.
How do unique coupon codes work in Klaviyo flows?
Flows are the easy part. Klaviyo generates and refills flow codes automatically. To add one to an email, insert a text block, click the personalization icon, choose Coupons, and pick your coupon.
Two things to watch:
- The same person gets the same code while it's unexpired, even if they've already used it. After it expires, they get a new one.
- Preview shows a placeholder. In the editor the code appears as
CouponName-PREVIEW. A test send uses a real code if one is available, and that code is reserved for preview use.
How do unique coupon codes work in Klaviyo campaigns?
This is where people get stuck. For campaigns, Klaviyo says "you must generate at least as many codes as expected recipients," or you can't schedule or send. Open the coupon's 3-dot menu, click Add Codes, enter a number, and watch the Available/Total count.
Do it early. Large batches "may take up to several hours." And if your campaign is set to determine recipients at send time and the segment grows past the codes you made, the extra recipients without a code are skipped.
Two more rules from Klaviyo's guide:
- If you put multiple coupon blocks in an email, codes may be assigned to everyone, even recipients who end up seeing a hidden block. Don't use hidden blocks as a way to give different offers.
- Changing a coupon's discount settings removes the old version's unused codes from your supply, and you can't edit a coupon while a scheduled campaign or live form is using it. Make a new coupon instead.
Can I use Klaviyo unique coupon codes in SMS and sign-up forms?
Yes to both.
SMS: use the tag {% coupon_code 'CouponName' %} with the exact coupon name. Klaviyo allows only one coupon code per SMS message.
Sign-up forms: Klaviyo keeps about 600 codes ready per live form and generates more when fewer than 400 are left. You can add a static fallback coupon that shows if the unique codes run out. You have to create that static code in Shopify first.
What are the limits on Klaviyo unique coupon codes?
- Klaviyo says Shopify enforces a limit of 20 million unique discount codes per store. If you hit it, you'd need to delete unique codes in Shopify before Klaviyo can generate more.
- Klaviyo coupon codes only work for one-time orders, not subscription orders such as those run through Recharge.
- Klaviyo's coupon types are fixed amount, percentage and free shipping. Shopify also offers buy X get Y discounts, but that isn't one of Klaviyo's unique coupon options.
- Shopify applies discounts to the order subtotal before taxes.
What offer should go on the code?
The setup is the easy part. The offer is what makes money.
Start with a test. An offer test I like is percent off vs dollars off, split 50/50 over a weekend, judged on revenue, not clicks.
And question whether it needs to be a discount at all. One alternative I like on a signup popup is cash back claimed as store credit, not a gift card, so the brand isn't paying out a gift card. Brands that offer cash back on the signup popup instead of a discount see 10 to 20% higher first-order profit, because the first order goes through at full price.
FAQ
Where do I create unique coupon codes in Klaviyo?
In Content > Coupons, click Create Shopify Coupon. Set the name, optional prefix, discount type, what it applies to, minimum purchase, combinations, activation and expiration.
Why can't I schedule my Klaviyo campaign with a coupon?
Campaigns need codes generated in advance. Klaviyo requires at least as many codes as expected recipients. Use Add Codes in the coupon's 3-dot menu, and give large batches time to finish.
Can a Klaviyo unique code be used more than once?
No. Each code can be redeemed once. The person can still share it, but it only works for one order.
Do Klaviyo unique codes work with subscriptions?
No. Klaviyo says its coupon codes only work for nonrecurring orders, not subscription orders like those enabled by Recharge.
Why does my coupon show as CouponName-PREVIEW?
That's how Klaviyo shows coupons in preview. Real codes are inserted when the message sends. A test send uses a real code if one is available.