Discount code in Abandoned Checkout Flow

  • 19 July 2022
  • 5 replies

Userlevel 2
Badge +9

Hello Klaviyo Fam,


I’m setting up Abandoned Checkout flow and I want to apply the discount code automatically to checkout page. I use this:{{ event.extra.token }}&discount={% coupon_code 'NAME_OF_YOUR_COUPON' %}

When I send a preview mail it looks like this: 

And the link above it shows like this:


QUESTION: How I can check if my set-up is working?

Thank you!


Best answer by Akers Digital 31 August 2022, 06:03

View original

5 replies

Userlevel 2
Badge +6

Hi @thepowerofcopy , welcome to the Klaviyo community.

I think the snippet code you are using is not correct.

This is the snippet code to use in your abandoned cart emails to take users back to their checkout and automatically add the discount code to the check out as well:

Grab the discount code and add it to the following link:

{{ event.extra.checkout_url }}&discount={%coupon_code ‘AbandonedCartCouponHere’%}

Then, add the URL to the URL part of the abandoned cat reached checkout button within your klaviyo email template editor.

Try this and let me know if this works.


Best regards,


Userlevel 2
Badge +9

Hola @Edgar Emmanuel 

Are you referring to this URL added to that link?



And also How I can check if my set-up is working? Thank you.

Userlevel 7
Badge +36

Is this for a shopify site? @thepowerofcopy 

Userlevel 2
Badge +6

Hey @thepowerofcopy yes I am

Userlevel 3
Badge +10

Here is a great help article by Klaviyo on how to use coupon codes in various situations with Shopify, it includes how to automatically have discount codes applied to checkout, homepage, and other pages.