Skip to main content

Hi community!

I am trying to set up an abandoned cart email with a “Go to cart” button that directly applies a 1 time coupon discount code.

These are the codes that I tried to apply under the button

{{ event.extra.checkout_url }}/&discount={% coupon_code 'OFF15' %}
{{ event.extra.checkout_url }}?discount={% coupon_code 'OFF15' %}

 

However when I tested it out the link brings me directly on my main page instead of send me on the abandoned cart page with the discount code already applied.

I don’t understand were I messed up.. pls help me :)


Notes:

-Coupon tested and it works alone in the preview

-{{ event.extra.checkout_url }} code also works alone

 

 

Hey @tangusco 

Welcome to the Klaviyo Community! Thanks for asking the community about adding a discount  to your abandoned cart email.

It looks like you might be using shopify? 

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 add 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).

Hope this helps!


Reply