How to Use Coupon Codes in Klaviyo



Coupons or discounts can be a great way to bring your customers back if they haven't returned recently or to reward them for subscribing to your newsletter.

This guide explains how to leverage both unique coupon code generation, as well as static coupon codes, in Klaviyo emails.

Unique Coupon Code Generation

Klaviyo can auto-generate unique coupons in emails for both Shopify and Magento 1.x stores.

Upload Your Own Coupon Codes to Klaviyo

There are a few ways to add coupon codes into Klaviyo.

Create and use a single code for everyone (easiest option)
For small stores or for certain discounts, you may just want to paste the code straight into the email content being used. If you're worried about the code getting spread, you can change it every couple of months.

The first step would be to create a coupon code in your ecommerce platform. To use that in Klaviyo, simply copy/paste the code into your email template. 

Use a customized code for each person
The best way to make sure codes aren't reused is to give each person their own code. There are two ways to do this on your own with Klaviyo:

  • Non-Technical
    First, create a list of everyone who will be getting the coupon, then export that list of emails to a CSV. Next, create coupon codes for each person in your ecommerce platform. You will then need to create a spreadsheet/CSV that has a list of emails in one column (labeled "Email") and a list of coupon codes next to each person's email in the second column (with a unique label for the code). Upload this new file into Klaviyo as a new list. Once that list is loaded, the coupon code property will be assigned to each person's profile in Klaviyo as a custom property.  Use the coupon by using person property tags. For example, if you're coupon column was called "Winter 2015 coupon", in an email template you could use {{ person|lookup:"Winter 2015 coupon" }}
  • Technical (Advanced) 
    Alternatively, you can dynamically add coupon codes for each person via the Klaviyo API. To do this, create a unique discount code on your end, assign that coupon code to a person using Klaviyo's People API, then segment on these codes within Klaviyo.  For more advanced use cases, it is also possible to add coupon codes to each person's profile as properties using the event API


Klaviyo doesn't let you paste in a list of codes that aren't yet assigned to people - you have to assign them to a person when they are added to Klaviyo. This means you can't send unique codes in triggered emails when the recipients are not known in advance (i.e. no uploaded unique coupon codes for those who have abandoned their carts, etc.)

Set Up Coupon / Discount Code Reminders

A great use of Klaviyo's automated flows is to automatically follow-up with people who haven't used a coupon code to remind them about it. Follow these steps to add coupons to a flow:

  1. Add an additional email to the same flow that was triggered to give out the initial coupon, but set this additional email to go out a few days later. 
  2. Add an Additional Filter to this new email that checks whether or not that person has placed an order that used that discount code. Only allow this follow up email to send if someone hasn't yet placed an order.

See Who Used Specific Discount Codes in Shopify and Magento

For Shopify and Magento stores, Klaviyo has the ability to pull in specific coupon codes being used on each purchase.

This feature lets you easily create a dynamic segment of everyone who used a particular coupon code.

  1. Create a new segment and name it "Used a coupon".
  2. Select What someone has done (or not done) from the dropdown.
  3. Select the Placed Order event and then click the Add Filter option to specify the discount codes to select.

This is a great way to understand if coupons are getting forwarded on to others, shared among friends, etc.


If you are using a custom platform or a platform like Volusion, BigCommerce, Symphony, or others, you may also be able to pull coupon information. Use the Add Filter option to see if a "Coupon" or "Discount Codes" option appears. 

Was this article helpful?
4 out of 7 found this helpful