Solved

How to add Dynamic Coupon Code in Abandoned checkout

  • 1 November 2023
  • 1 reply
  • 285 views

Badge

Hi chat!

Is there anyone who knows how to add a dynamic coupon code created in Klaviyo into a button linking customers back to their checkout process?

For further explanation: I am splitting my abandoned checkout flow for those who are going through my welcome flow. The trigger is set for when a lead from the welcome flow creates “checkout started”, they’ll be moved to the abandoned checkout flow and segmented based on how far in the welcome flow they’ve gone. It’s a little complicated but that’s not the case for today - I am only in search of how to link the buttons so that those who have their welcome flow coupon, can have that coupon linked directly in the checkout. 

I have been searching around on the web and in the community pages but I can’t really find a good answer. The best link example I found was this: “https://www.mysite.com/STOREFRONT_ID/checkouts/{{ event.extra.token }}?discount={% coupon_code 'NAME_OF_YOUR_COUPON' %}”

Now the only tricky part about this link is that I can’t really find my storefront ID, is this suppose to be my store name, some random numbers or a specific url? Would love if anyone could help out here!

I use Shopify and my domain url is: www.ninjaprotector.com

Have a great day!

icon

Best answer by Taylor Tarpley 1 November 2023, 17:36

View original

1 reply

Userlevel 7
Badge +60

Hi there @SamanSaffari,

 

Thanks for sharing your question with us! 

 

Essentially, your storefront ID is a grouping of numbers, you can find yours by navigating to your  Dashboard > Activity Feed > Filtered it by "Checkout Started " > Clicked on the timestamp and find your checkout URL link. In the URL, the storefront ID should be the first string of numbers in the URL. I’d also check out a similar thread of a user asking a similar question.

 

However, I would also check out our documentation on on how to apply a discount code and link to checkout as well! 

 

Hope this helps!

-Taylor 

Reply