Solved

Add to cart & Coupon codes that auto apply.

  • 2 March 2021
  • 8 replies
  • 595 views

Badge +4

Hi All,

 

I have managed to get a coupon code to auto apply in shopify checkout which is perfect. I am trying to do the same on a add to cart flow (Add to Cart Metric not checkout started metric) The problem is I can’t seem to get it to work with the {{ evet.url }}?/discount/Coupon name.

Anyone got any ideas how I can get this to work.

Many thanks

Dave

icon

Best answer by caroline 3 March 2021, 17:05

View original

8 replies

Userlevel 5
Badge +8

Hi there,

Our Help Center article, “How to Add Link that Applies a Coupon Code to a Shopify Cart,” outlines the structure of the URL needed to auto-apply the discount.

Best,

Caroline

Badge +4

Hi Caroline,

I have already looked at these and tried every variation possible. What I am trying to is this mysite.com/discount/{% coupon_code 'Basket10' %}&redirect=/{{ event.URL }} of the back of an add to cart triggered flow. To apply the discount and link back to the event.URL back I have tried all of the combinations on that page and somethings not right with what I am doing. Any additional help would be appreciated.

My basket abandonment is working perfectly mysite.com/123456789//checkouts/{{ event.extra.token }}?discount={% coupon_code 'Basket10' %}.

I have tried this in the add to cart triggered flow but that doesn’t seem to work presumably because the checkout point doesn’t appear in the dynamic content.

 

Many Thanks

Dave

Userlevel 5
Badge +8

Hi there,

Thanks for sharing those additional details. Can you clarify if the coupon code is static or dynamic? Auto-applying both types should be possible even outside of an Abandoned Cart flow, but whether it is static or dynamic determines the syntax that should be used.

Best,

Caroline

 

Badge +4

Hi Caroline it is a dynamic code but I would be interested to see what the different syntax would be for both dynamic and static for future reference.

Userlevel 5
Badge +8

Hi there,

The syntax for auto-applying dynamic coupons should be:

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

You might find our Help Center article, “How to Add a Link that Applies a Unique Coupon Code at Checkout,” helpful.

Have you tried following the above syntax?

The syntax for static coupons is outlined here, but I would definitely try the above syntax since your coupon is dynamic.

Hope this helps!

Best,

Caroline

 

Badge +4

Hi Caroline unfortunately it didn’t work. It works with Checkout started trigger just not with add to cart trigger. We have decided to go without it auto applying for now.

Dave

Badge +2

Can the syntax be used for woocommerce as well? Or only shopify?

Userlevel 6
Badge +54

Hi @Akathma

 

Thanks for sharing your question with the Community! 

 

Unfortunately, yes the coupon syntax @caroline shared above was specially to be used for Shopify in the abandon cart flow. If you want to include static coupons in your emails, I would check out our help center documentation explaining the workflow. While dynamic coupons are not able to be used in Klaviyo currently, there have been a lot of chatter about getting this into production! It is definitely something that can be created in the future and is not an impossible feature. 

 

One of our Community users @JayH does share how to create bulk static coupons in Woocommerce as we are waiting for the possible feature product of dynamic Woocommerce coupons within Klaviyo.

 

Thanks for your participation in the Community!

-Taylor 

Reply