Solved

Using {{ event.extra.checkout_url}} to recover abandon carts, but I can't click the link inside the email.

  • 26 January 2022
  • 11 replies
  • 11682 views

Badge +2

Hello everyone,

I hope you are doing well :)

I’m facing a problem inside an account that never happened before: when we send the cart recovery emails with a button that contains “{{ event.extra.checkout_url}}”, we can’t click on the button inside the emails.

It seems like there is no link attached and the button doesn’t get treated as a button.

(the fields are populated, so when I send a test email it should work)

How can I fix this?

Thank you and have a great day,

Luca

icon

Best answer by Dov 26 January 2022, 21:54

View original

11 replies

Badge +2

@espiewak

Thanks for great input! This link lands on checkout process… Anyway to change it to make it land on the cart?

 

Thank you!

Userlevel 7
Badge +61

Hi @lucafo,

Thank you for sharing this with us.

Can you confirm when you’re sending your abandoned cart email containing the checkout URL tag, that it’s being sent from a flow that’s triggered off of Checkout Started? Since Klaviyo emails rely on the event that triggers the flow to populate those event variable tags, if you’re including the checkout tag in a test through another medium like a campaign email, or in a flow triggered off of a different metric, the button will not work.

If you can confirm you’re sending test emails through a flow triggered off of Checkout Started, I would double-check that you’re using the correct tag by previewing the flow email on the left-hand side and searching for “url”. Ensure that the tag for the checkout URL matches what you’ve placed in the button exactly. Even a small error would render the button unusable.

I hope that helps! Let us know how it goes.

Hello,

 

I have a trouble !

 

I want to create a button “apply coupon” from my email.

 

I have already cretae dynamic coupon and creat and flow with “Checkout Started”

 

 

The probleme is : 

{{ event.extra.checkout_url }}&discount={% coupon_code 'CouponName' %} doesn’t work → refer to the home page

 

mysite.com/discount/{% coupon_code 'CouponName' %} doesn’t work → refer to the home page

 

Even, when I just want to creat e button “finalise order” with 

{{ event.extra.checkout_url }}

, it doesn’t work → refer to the home page

 

 

 

Is somebody have a solution for this problem 🤩

 

Best regards,

 

Badge

@nayanisakina99 

I was able to solve this using the following input for the checkout link, which loops to construct a cart URL: 
https://www.yourshopdomain.com/cart/{% for item in event.items %}{{ item.variant_id }}:{{ item.quantity|floatformat:'0' }},{% endfor %}

This adds recurring comma-separated values of product “variant.id”, each followed by a colon and no-decimal quantity integer (hence setting the floatformat to ‘0’), which should reconstruct the cart using the items logged in your event. 

Let me know if that works for you! 

Hello - I tried this with my shop domain and got a 404 error. The button was clickable in the preview email but came to an error on the page. Any help on how I can get it to work correctly? 

Badge +2

Hey Dov,

Thank you for your reply.

I just checked and you are right: we don’t use “Checkout Started” in the flow that is causing problems.

 

We are using, as a trigger, “Add to Cart” – custom event.

 

This is the guide we followed: 

https://help.klaviyo.com/hc/en-us/articles/115001396711-Guide-to-Creating-an-Added-to-Cart-Event-for-Shopify

 

So I suppose in this case we need to use something else instead of “{{ event.extra.checkout_url}}”.

 

Thank you for your support and have a great day,

Luca

Userlevel 7
Badge +61

Hi @lucafo,

Thanks for your reply.

Got it! Yes, that is correct. 

You can find out the correct tag you should be using by navigating into the template in the flow, click “Preview” on the left hand-side. Click on the checkout URL in the preview modal and that will generate the tag you can copy and paste into the button. I explain the process in more detail in the thread below

Once that’s set-up you will be all set.

Thanks for being a member of our community.

Badge +1

@nayanisakina99 

I was able to solve this using the following input for the checkout link, which loops to construct a cart URL: 
https://www.yourshopdomain.com/cart/{% for item in event.items %}{{ item.variant_id }}:{{ item.quantity|floatformat:'0' }},{% endfor %}

This adds recurring comma-separated values of product “variant.id”, each followed by a colon and no-decimal quantity integer (hence setting the floatformat to ‘0’), which should reconstruct the cart using the items logged in your event. 

Let me know if that works for you! 

I LOVE YOU!!!!

Badge +2

@espiewak I have the same question. I want my Abandoned Cart flow emails triggered from “added-to-cart” to redirect to the customer’s cart. Can you please tell me if you found the solution for this?

@Dov - I would appreciate if you could post the solution for this issue here, thanks!
 

Hello im also struggling with this issue.

I wanted to add a link that sends the customer to cart with the product they earlier tried to checkout with as a part of my abandoned email flows.

So far this works to send the customer to cart with the product: {{ event.extra.checkout_url }}

But i want to add an discount code baked into this so the customer gets the discount automatically without doing anything entering the store again.

Does anyone have a solution for this?

Badge

@Dov Appreciate the in-depth review above. 

I’m setting up a similar flow and finding that the “Add to Cart” custom event property list does not include a Checkout URL. Assuming this is an expected property based on your comments above, can you advise on why this property may be missing? Hoping to minimize friction in the consumer experience by directing them to checkout rather than an item or their cart. 

@lucafo can you confirm that this method worked for you? 

Badge

@nayanisakina99 

I was able to solve this using the following input for the checkout link, which loops to construct a cart URL: 
https://www.yourshopdomain.com/cart/{% for item in event.items %}{{ item.variant_id }}:{{ item.quantity|floatformat:'0' }},{% endfor %}

This adds recurring comma-separated values of product “variant.id”, each followed by a colon and no-decimal quantity integer (hence setting the floatformat to ‘0’), which should reconstruct the cart using the items logged in your event. 

Let me know if that works for you! 

Reply