Unique Coupon Codes for Shopify

read
Last updated at:

Overview

Klaviyo can create one-time use coupon codes for use in Shopify stores so that each customer receives his/her own unique coupon code. This feature provides an alternative to creating a generic coupon code for a given promotion, which means you don't have to worry about codes being shared.

These are examples of using unique coupon codes in campaigns: 

  • Discount codes for email subscribers: Reward your subscribers by running an exclusive, email-only promotion using coupon codes.
  • Pre-sale discounts for VIP customers: Send your VIPs unique codes that they can use to purchase from a brand-new collection.
  • Shipping delay discount: If some items are back-ordered or you're experiencing delays in order fulfillment, send impacted customers a unique code to thank them for their patience.

These are examples of using unique coupon codes in flows:

  • Abandoned Carts: Send a discount code to cart abandoners that haven't bought before -- a code that is only active for two to four days will create a sense of urgency and help convert casual browsers into paying customers
  • Winbacks: Send a discount to buyers who haven't come back recently, incentivizing them to purchase again
  • Welcome series: Give new subscribers a discount code as soon as they join your email list -- you can even increase the savings available through the code if they haven't bought after two weeks
Shopify enforces a limit of 20,000,000 unique discount codes for each Shopify store. If you reach this limit of 20M codes, you will need to delete unique codes from your Shopify Admin before Klaviyo can resume generating new unique codes.

Create Your Coupon Code in Klaviyo

First, navigate to the Coupons tab in your Klaviyo account and click Add Coupon in the upper right-hand corner.

If you haven't given Klaviyo the proper permissions to create Shopify coupons for your account, you may need to click a button and update your integration settings. When you click to update your integration settings, we will re-authenticate with Shopify and then you will be brought back into Klaviyo. If you click to update, and then click the back button or navigate elsewhere before this authentication process completes, this will cause your integration to be disabled.

2018-06-20_14-10-30.gif

For each coupon, you can set the following properties in Klaviyo:

  • Name
    This is how the coupon will be identified in Klaviyo.
  • Prefix
    Klaviyo will generate a random code for each person, but you can also specify a prefix that will go before every code (e.g., WELCOME).
  • Discount Type
    Choose whether the coupon is a fixed amount off, a percentage, or free shipping.
    • Free Shipping
      For free shipping coupons, you can limit the coupon so it only applies to certain shipping rates, or only when shoppers are shipping to specific countries.
    • Fixed Amount & Percentage Off
      For coupons where you're offering a fixed amount or percentage off an order, you can specify that the coupon only applies to certain products or collections.
  • Minimum Order Subtotal
    Choose whether the coupon is limited to orders meeting a certain subtotal (e.g., 20% off orders over $50).
  • Activation Date
    This is the date the discount offer becomes active -- you can choose to pick a start date, or alternatively select an option where generated coupon codes will become active as they are sent out. Please note that dates are set in the UTC time zone, so you may see a different activation date in Shopify.
  • Expiration
    Choose when you would like your coupon to expire. There are different options for coupons used in campaign emails versus flow emails. Please note that dates are set in the UTC time zone, so you may see a different expiration date in Shopify.
    • Campaigns
      You have two choices for expiration:
      1. Generated coupon codes will never expire
      2. If you want your discount to have a defined end date, after which generated codes will expire, you can select a firm expiration date
    • Flows
      You have three choices for expiration:
      1. Generated coupon codes will never expire
      2. Generated coupon codes will expire after a certain number of days/hours
      3. If you want your discount to have a defined end date, after which generated codes will expire, you can select a firm expiration date
      Coupons that expire after a certain number of days/hours have variable expiration dates. Although you can create coupons with variable expiration dates for flows, you cannot create coupons with variable expiration dates for campaigns.

Use Your Coupon in a Flow Email

Unique coupon codes for live flow emails are generated automatically in batches of 100. When coupon codes are depleted below 100, Klaviyo will generate another 100 coupon codes. This ensures that there are always enough codes available for live sending flow emails. Because coupon codes for flows are replenished automatically, you won't need to manually add batches of coupon codes via the Add Codes option.  

If your flow is connected to a list that you intend on adding a large number of contacts to, we suggest that you take a different approach and follow instructions for sending a coupon code in a campaign instead. You will need to add as many codes as the number of contacts that you will upload to this list. For example, if you're going to upload 10,000 people to a list, be sure to create 10,000 coupon codes in advance. This is especially important for large list uploads to ensure that your emails send out in a timely manner.

Once a coupon is created, you can insert it into a flow email using the following dynamic placeholder variable:

{% coupon_code 'NAME_OF_YOUR_COUPON' %}

where you replace NAME_OF_YOUR_COUPON with the coupon name (must be an exact match of the name -- capitalization matters). For example:

When emails are sent out, this variable will be dynamically replaced with a unique discount code for each recipient. When you preview the email directly in Klaviyo, you will not see a unique coupon code populate. Additionally, you will not be able to preview coupon codes with variable expiration dates because you are not able to manually add codes to these types of coupons.

You are manually able to add codes to coupons without variable expiration dates. For emails that include coupons without variable expiration dates, you may generate a live code if you send a preview email to yourself or a member of your team. If you wish to do this, it's important to ensure that you have sufficient codes in your account. Otherwise, you will not see a unique code in your preview and you will need to add codes before being able to send a preview with a live coupon code.

Any flow that contains a coupon that does not expire will send the same code to a customer each time they enter the flow path. If you expect a customer to navigate through a flow multiple times, you may want to consider using a coupon that expires so that each time they enter the flow, they receive a new code.

If multiple people are included in the preview send, they will all receive the same code. As such, if multiple previews are sent within the same minute, these previews will all contain the same code.

Use Your Coupon in an Email Campaign

While Klaviyo generates coupon codes for flow emails automatically, you must manually generate coupons for campaign emails. Once you create the parameters for your coupon, you'll need to specify the number of coupon codes that you want to generate. This must be done before you schedule your campaign. When doing this, key things to keep in mind are:

  • You must generate at least as many codes as expected recipients. This means that if you generate fewer codes than the number of estimated recipients, you will not be able to send or schedule the campaign.
  • If your scheduled campaign is set to "Determine recipients at send time," and the actual number of recipients is greater than the number of codes you generate at send time, the extra recipients will be skipped and will not receive the email.
  • If you generate a large number of codes, be sure to allow time between your campaign's desired send time and when you create the codes. Generating a large number of coupon codes may take up to several hours. Because of this, use the estimated number of recipients of the campaign as a framework and do not significantly overestimate the number of codes you need.

You can generate coupon codes for a particular coupon by clicking the dropdown menu and selecting Add Codes.

2018-06-20_13-38-23.png

Once you select Add Codes, you will be prompted to input the number of codes you would like to generate. Again, be sure to generate at least as many codes as you have expected recipients for your campaign, otherwise, you will not be able to send or schedule it.

Coupons with variable expiration dates cannot be used in campaigns. As such, you will not see the option to add codes if you have selected a variable expiration date for your coupon.
VariableCoupon.png

The "Estimated time to create" area will give you an idea of how long it will take to generate the number of codes you've specified.

2018-06-20_13-49-30.png

Once you click Submit, Klaviyo will begin generating coupon codes for your campaign. A progress bar will appear beneath the coupon name to display progress. You can also track the number of codes that have been created in the Available/Total column.

After the codes have been generated, you can include the coupon tag in your campaign template.

{% coupon_code 'NAME_OF_YOUR_COUPON' %}

Be sure to replace NAME_OF_YOUR_COUPON with the coupon name (must be an exact match of the name -- capitalization matters). For example:

2018-06-20_14-39-27.png

When emails are sent out, this variable will be dynamically replaced with a unique discount code for each recipient. When you preview the email directly in Klaviyo, you will not see a unique coupon code populate.

However, if you send a preview email to yourself or a member of your team, a live code will be generated. For this reason, it's important to ensure that you have sufficient codes in your account. Otherwise, you will not see a unique code and you will need to add codes before being able to send a preview with a live coupon code.

If multiple people are included in the preview send, they will all receive the same code. Additionally, if multiple previews are sent within the same minute, these previews will all contain the same code.

Once you're ready to send or schedule your campaign, navigate to the final page of the campaign scheduling wizard by clicking Review & Send Campaign. Here, you will see a Coupon Codes area. If you have fewer coupon codes available than expected recipients, you will not be able to schedule or send your campaign and will need to add more codes.

2019-08-05_10-54-24.png

When you schedule or send your campaign, each recipient will receive a unique coupon code. You can see which code an individual recipient received by navigating to their profile and scrolling to the Coupons section as outlined in the FAQs.

Unique Coupons for SMS

Unique coupons are also available for your SMS/MMS messages. Generate the codes just like you would for email. Then, use the template tag below to add the coupon code to your SMS or MMS message:

{% coupon_code 'CouponName' %}.

In the snippet, change CouponName to the name of the coupon you want and add it into the message (either flow or campaign).

2020-06-16_17-58-37.png

Unlike in emails, you can only use one coupon code per SMS message. With email, you have access to hidden blocks to send different coupons based on where someone lives or what they’ve done. If you try to add multiple coupons to an SMS message, you will see an error message.

Best Practices

If you use unique coupons in campaigns and flow emails, there are a few best practices you should stick to:

  • Don't use the same coupon for flows and campaigns. Because you need to specify the number of codes to be generated for campaigns, but not flows, it's a best practice to use different coupons for flows vs. campaigns.
  • Create a separate coupon for each campaign. This way, it will be easier to specify the number of codes you will need for each campaign and you don't risk running out of codes, which would result in some recipients being skipped.
  • Create a separate coupon when changing the categories or products applicable for the coupon. We will by default try to assign all pre-existing codes, so customers may receive and be able to use codes with outdated rules.

Take Me to Shopify Coupon FAQs

x
Was this article helpful?
1014 out of 1334 found this helpful