Solved

Shopify Discount Code link and Abandon cart

  • 15 January 2021
  • 6 replies
  • 324 views

Badge

Hey Everyone,

Really trying to dial in my abandon cart flow and want to make things as simple as possible for a customer. I don’t want the customer to have to remember a code when they go back to their cart to checkout. My button in Klayvio has:

Link URL: {{ event.extra.checkout_url}}

The Shopify Discount Link is: https://everbloombaby.com/discount/12345

How can I have the button for the event also have the automated discount???

Any insight would be super helpful!!!

icon

Best answer by ksanfelipe 15 January 2021, 17:22

View original

6 replies

Userlevel 7
Badge +5

Hi @EverBloom 

This is a very cool feature that helps customers a lot.
You can find instructions on how to create a link that automatically applies coupon code in our tutorial here.
That should help you understand the basics of how it works and how to apply it in Klaviyo emails.

Now for the abandoned cart email, is a little trickier because the checkout URL is being reconstructed at the site and if you want to auto apply coupon code, you can’t use the {{ event.extra.checkout_url}} in your button.

In this case, you need to use this link format:

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

In your case it will be:

https://www.everbloombaby.com/7900037209/checkouts/{{ event.extra.token }}?discount=12345 %}


You can read more about this specific case in Klaviyo’s documentation here.

Hope this helps!

 

Userlevel 3
Badge +1

Hey @EverBloom ,

If you are using a static code (ie, everyone is receiving the same 12345 code), you can use the following URL to drive them back to checkout with the code auto-applied:

{{ event.extra.responsive_checkout_url }}&discount=12345

Note that you may need to replace the & with ?

 

Reply back if you have any questions!

Badge

Awesome!!! That was super easy to fix 😃

Badge

Hey @retention,

I went through your tutorial about creating and applying dynamic coupon codes and I must say that it was really insightful and I can see a lot of use cases for it in my email flows. 

Thank you for sharing. 

Badge

Hi @EverBloom 

This is a very cool feature that helps customers a lot.
You can find instructions on how to create a link that automatically applies coupon code in our tutorial here.
That should help you understand the basics of how it works and how to apply it in Klaviyo emails.

Now for the abandoned cart email, is a little trickier because the checkout URL is being reconstructed at the site and if you want to auto apply coupon code, you can’t use the {{ event.extra.checkout_url}} in your button.

In this case, you need to use this link format:

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

In your case it will be:

https://www.everbloombaby.com/7900037209/checkouts/{{ event.extra.token }}?discount=12345 %}


You can read more about this specific case in Klaviyo’s documentation here.

Hope this helps!

 

Is this still the way to do it? Every time I try and preview it, it doesn’t work and I’m seeing a COOKIES BLOCKED=1 in the URL.

Userlevel 6
Badge +4

Hello @steez_brand,

The suggest link format provided by @retention would be the correct way to dynamically link your Abandoned Cart email URLs with a coupon code. In addition to the wonderful blog article they linked, you can also find this information in the How to Add Link that Applies a Coupon Code to a Shopify Cart Help Center Article. 

The error message you are receiving seems to indicate that cookies were blocked when previewing. I would suggest opening the link in an incognito mode when previewing to see if that impacts anything. This can often times be caused if you have certain ad blocks, anti-viral softwares, etc. that may be causing these cookies to be blocked; thus preventing this functionality. 

I hope this helps!

David

Reply