Skip to main content

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!!!

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!

 


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!


Awesome!!! That was super easy to fix 😃


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. 


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.


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


Hi @David To and @ksanfelipe I tried both of these and the button link takes me to a blank https page. Can anyone help me with this?


Hey, I want to send the customers to the cart and not product page or checkout.

I have manage to made an setup that does so: 

https://URL.com/cart/add?id={{ event.extra.line_items.0.variant_id }}

BUT I would like to have an discount code implemented here.

So when the customer comes to cart the code is already activated.

Same as the example: {{ event.extra.responsive_checkout_url }}&discount=12345

Do anyone know how to solve it?

 


@M1999 did you get an answer to this?


Reply