Add a Link that Automatically Applies a Unique Coupon Code at Checkout

read

Overview

Please note that this feature is only available for abandoned cart emails.

Adding a link that automatically applies a unique coupon code to a customer's cart on the checkout page makes it incredibly easy for a customer to click through and place an order. It is also possible to create a link that applies a coupon code to a customer's cart, but this method will take the shopper directly to the checkout page.

Additionally, this will be effective across devices -- this means that if a customer abandons a cart on desktop but receives and clicks through your email on mobile, their cart will be up to date.

Create a Unique Coupon Code

Before you are able to apply the code to a URL, you'll need to build your coupon code in the Coupons tab. To do this, follow the instructions outlined in this article.

Please note that when you preview the email, you will not see a live coupon in the email. Instead, you will see "NAME_OF_YOU_COUPON-Preview." You'll need to actually trigger the flow in order to view a live code.

Add the Discount URL to a Template

When constructing the URL, you will need to use the following format:

https://www.mysite.com/STOREFRONT_ID/checkouts/{{ event.extra.token }}?discount={% coupon_code 'NAME_OF_YOUR_COUPON' %}

This token reconstructs the checkout and is unique in each Started Checkout event in Klaviyo. You will need to fill in "mysite" with your website URL, "STOREFRONT_ID" with your unique storefront ID, and "NAME_OF_YOUR_COUPON" with the coupon name (must be an exact match of the name -- capitalization matters).

You can find your storefront ID by clicking on the event data for a Started Checkout event and grabbing the first part of a checkout_url.

First, navigate to your Metrics tab and select Checkout Started. Here, click on the timestamp for one of the events.

2018-10-29_11-06-09.png

This will open the metadata associated with this event. After your site's URL, you will see the storefront ID associated with your account.

2018-10-29_11-07-20.png

Once you've constructed the token, you can insert it into your abandoned cart email template.

x
Was this article helpful?
13 out of 29 found this helpful