You will learn
Learn how to create unique, single-use coupons for your WooCommerce store and use them in flows to incentivize subscribers to make a purchase. To do this, you’ll first create your coupon in WooCommerce, then configure settings for the linked coupon in Klaviyo.
Unique coupons codes for WooCommerce can be used in flow emails only, not campaign emails. If you’d like to include a coupon in a campaign, consider uploading unique codes or using a static WooCommerce coupon.
Use cases for unique coupon codes in flows
-
Abandoned cart
Send a discount code that’s only active for a limited amount of time (e.g., 2 to 4 days) to cart abandoners who haven’t purchased before to create a sense of urgency and encourage conversions from casual browsers. -
Winback
Send a discount code to buyers who haven’t purchased recently to incentivize them to purchase again. Similar to the abandoned cart coupon logic, sending a coupon with a set expiration date can create a sense of urgency and prompt a purchase. -
Welcome series
Send a discount code to new subscribers as soon as they join your email list. You can send another code with increased incentive if they still haven’t made a purchase after 2 weeks.
Before you begin
Make sure that you’ve integrated with WooCommerce and can view the Coupons tab under Content in Klaviyo’s left-hand navigation. If you’ve integrated but do not see the Coupons tab:
- Select your company name in the bottom left corner of Klaviyo’s left-hand navigation, then select Integrations.
- Search for Woocommerce, then select the card.
- Click Update settings to update your integration settings. You should now see the Coupons tab under Content in the left-hand navigation.
You'll need to enable coupons in WooCommerce, if you haven't already:
- Log in to your WooCommerce account.
- Head to WooCommerce > Settings > General and check the box to enable the use of coupons.
- Save your changes.
Create your coupon in Woocommerce
- In your WooCommerce account, navigate to Marketing > Coupons.
- Click Add coupon. Or, if you have not created one yet, click Create your first coupon.
- Next to Coupon Code, name your coupon and add a description for your own use.
- Enter your coupon data. This includes:
- Discount type
- Coupon amount
- Allow free shipping
- Coupon expiry date
- If you have any Usage restrictions or Usage limits, enter them in the respective tabs under Coupon Data.
To enforce uniqueness among your coupon codes, we recommend setting a Usage limit of 1 per coupon, and 1 per user. This is not required; however, it can help deter sharing across customers.
- Once you’re finished editing, click Publish so your coupon is ready to use.
Configure your coupon in Klaviyo
Now that you’ve created your coupon in WooCommerce, configure it in Klaviyo so you can generate codes for your flows.
- Navigate to Content > Coupons in Klaviyo’s left-hand navigation.
- In the menu bar along the top, select the WooCommerce Coupons tab.
- Select Create WooCommerce Coupon.
- Select Add code, then enter the coupon code you created in WooCommerce. It should be the same code name you assigned to the linked coupon in WooCommerce.
- Click Save.
- Set the following properties for your coupon:
-
Prefix
Klaviyo will generate a random code for each person, but you can also specify a prefix to be included before every 10 digit code (e.g., JB20).
Note that WooCommerce stores all coupon codes in lowercase. For example, if you input JB20 as the prefix, a full unique code would show as jb20h3shfr7kgs when it’s created.
-
Quantity
Estimate the minimum number of codes needed daily. Klaviyo will use this number, which must be between 0 and 150,000, to automatically generate a daily inventory of codes. -
Expiry date
Choose when you would like your coupon to expire (either After a certain number of days or On a specific date). Klaviyo will show the timezone associated with your account by default; however, the time zone is configurable. If you set a different expiry date in WooCommerce, the expiry set in Klaviyo will overwrite it.
-
Prefix
- Click Create coupon.
If you change the coupon name in WooCommerce, it will affect the linkage to the coupon in Klaviyo. If the names do not match you will see an error message that Klaviyo is Unable to find the corresponding coupon code in WooCommerce, and you will not be able to finish configuring the coupon or generate codes.
Once you have created your coupon in WooCommerce and configured it in Klaviyo, Klaviyo will begin generating codes automatically for your flow emails.
Use your unique coupon in a flowUse your unique coupon in a flow
Once you’ve created and configured your coupon, insert it into a flow email.
- Navigate to the Flows tab in Klaviyo’s left-hand navigation.
- Open an existing flow or create a new one.
- Select a flow email message inside your flow.
- Add a text block into your flow email template and insert a coupon tag with the following format:
{% coupon_code 'CouponName' %} - Replace CouponName with the name of your coupon (it must match the name exactly, including capitalization).
- Save your changes.
- Optional: Select the 3 dots on your flow email, then click Preview. Note that when you preview your email directly in Klaviyo, you will not see a unique code populate. Rather, you will see your coupon’s name hyphenated to “PREVIEW.” Klaviyo will only create and share a unique code at the actual send time.
If you would like to include a unique coupon code within an SMS/MMS message in your flow, follow this same process by adding the coupon tag and name in the SMS message template within your flow.
When emails are sent out, a unique discount code, consisting of your prefix and 10 random digits, will dynamically replace the variable for each individual recipient. If you include the same coupon tag in multiple flow messages, the recipient will receive the same unique code each time.
Unique coupon codes for live flow emails generate automatically based on how many you specify in the Minimum Inventory section of the Coupon details page. For example, if you create a coupon with a Minimum Inventory of 100, Klaviyo generates a batch of 100 unique codes. These automatically replenish daily; however, if you use all 100 codes before the replenishment, the 101st attempt to assign a coupon will be skipped due to insufficient codes available. This automatically triggers Klaviyo to generate another 100 codes. Because coupon codes for flows are replenished automatically, you do not need to manually add batches of coupon codes via the Add codes option.
Test your flow email’s couponTest your flow email’s coupon
Before you send out the flow with the coupon to your audience, we recommend testing it first.
- In the flow builder, click Review and turn on.
- Change the status to Manual.
- Click Turn on.
- Trigger your flow by performing the trigger action corresponding with your flow (e.g., filling out a sign-up form to join a certain list). Your flow will automatically generate 100 coupons upon you completing the trigger action.
The coupon may take a few minutes to generate codes. Because of this, there’s a short loading buffer, and you may see your test profile under Skipped: Retrying generating codes. This will go away once the coupons have finished generating.
- When the coupons have been generated, your test email that triggered the flow will show under Needs Review for the email.
- Click into the Needs Review bucket under Recipient activity.
- Select Send Now.
- Check your inbox for the email with the unique code.
Troubleshooting common coupon issues
If you are seeing issues with creating unique coupons for WooCommerce in Klaviyo, go through the following recommended troubleshooting steps. If you are still seeing issues after going through the recommended steps, reach out to Klaviyo’s support team for further assistance.
Check your WooCommerce integration settingsCheck your WooCommerce integration settings
If your integration with WooCommerce is not syncing, or your WooCommerce store is unreachable, Klaviyo will not be able to generate new coupon codes.
To view your WooCommerce integration settings:
- Select your company name in the bottom left corner of Klaviyo’s left-hand navigation, then select Integrations.
- Search for WooCommerce, then select the card.
- Click Update settings to update your integration settings.
For more assistance on configuring your Klaviyo integration with WooCommerce, see Getting Started with WooCommerce.
Verify the coupon exists in WooCommerceVerify the coupon exists in WooCommerce
If you receive an error indicating that the coupon cannot be found in WooCommerce, Klaviyo is not able to match the specified coupon to one in your WooCommerce account.
To resolve this, update the coupon name in Klaviyo, ensuring that it matches an existing coupon code in your WooCommerce store.
Check for potential incompatibility with the Jetpack plugin for WooCommerceCheck for potential incompatibility with the Jetpack plugin for WooCommerce
If you notice that the number of codes for your coupons are low, or failing to replenish, this may be due to an incompatibility of Klaviyo’s coupon service with the Jetpack plugin for WooCommerce. If you have this plugin installed, please disable it.
Additional resources