Solved

Saving abandoned cart on Added to Cart trigger where checkout not started on Shopify

  • 27 June 2022
  • 6 replies
  • 672 views

Badge +2

Hi there!

We set up a flow to email customers who have added products to their cart but have not started the checkout process on Shopify using your premade Added to Cart template (see attached screenshots) that’s triggered on the Added to Cart event (we also integrated the necessary code to trigger the add to cart event on our shopify store and it works fine). 

 

I know on the abandoned cart flows that are triggered on the Checkout Started event, Klaivyo includes a link to the shopify checkout screen where the cart items are saved, but for the abandoned cart flow where it’s triggered on the Added to Cart event, it doesn’t have that link to recover their cart.  Instead, the ‘Make Your Purchase’ CTA you include in the Added to Cart flow email is wired to event.URL which in turn just returns a link to the product.

 

In summary, in the flow where the abandoned cart email is triggered on the Added to Cart event, the cart is not saved like it is when it is triggered from the Checkout Started event.   Yes, if the shopper goes back to the cart page, their items would technically be there if they used the same device, but if they used a different device (ie they added the items to their cart on a desktop but later went to the site via their mobile device), their cart would be empty.  

 

Do you guys have a solution for this?  I’ve seen other abandoned cart apps save the cart and create a link to recover the cart without needing the checkout process to be started and I was wondering if Klaviyo handled this as well given that it’s such an obvious use case and a common problem in ecommerce.   

 

Thanks in advance for your help!

 

icon

Best answer by retention 29 June 2022, 02:17

View original

6 replies

Userlevel 2
Badge +15

Hi there,

I hope you’re doing well ?

Unfortunately, I’m still waiting for this feature too haha.

I believe the best option remains to include the event url redirecting to the product page. 

Kindly

Badge +2

Unfortunately redirecting back to the Product page instead of their actual saved Cart is not a solution at all for products that are personalized as the user loses all of the information they entered and will just bounce.  

 

Will be good to hear from someone from Klaviyo about this to see if they’ve developed (or are developing) a proper solution to actually save the user’s cart with the Added to Cart trigger.

Badge +2

@Dov would you be able to help answer this?

Userlevel 7
Badge +57

@SharonSTP - There is a possible a workaround -  but you’d have to do a fair bit of custom coding and implementation on Shopify.  In Shopify, you can use a Shopify cart permalink to “rebuild” a Shopify Cart with a properly formatted link along with the Product Variant IDs.  The link looks like this - and it can append one or more items (along with quantity) when a user visits the cart permalink.

http://{shop}.myshopify.com/cart/#{variant_id}:#{quantity}(,...)

You can see more details on this Shopify documentation here:

So the question is how would you do this in your emails? 

It’s still a bit tricky here.  The “Added to Cart” example from Klaviyo, only sends the event with the most recent item that was added (and not the entire cart itself.) You would have to modify this code to pass in not just the most recent item, but also all existing cart line items.  This is technically possible with the Shopify Cart API to retrieve the Cart items and then pass it to Klaviyo.

Conceptually, with a little bit of template logic/code you can then loop through all the Item’s Variant IDs (and quantities) and append it to the permalink URL for your store with the required syntax above.  Or simply add in the Cart Permalink as one of the Event property to use directly if you want to do it on Shopify’s end before passing it to Klaviyo.

When the user clicks on that link, regardless of which device/browser, it will go back to Shopify with those items in their Cart ready to checkout. 

I realize this is a fair bit of code/work to do, so if I can ever get this properly prototyped I’d be happy to share my findings here later.  If you have developer resources, follow the blueprint above and let us know how it works out!

Badge +2

@retention thanks for the response and for the possible workaround.  I’m curious to see if this cart permalink can also handle custom properties that are collected on the product page as well (our product has customizations).  

 

If you get it prototyped I (and I’m sure a bunch of other people) would be incredibly appreciative to see it!  

 

Question for anyone on the Klaviyo team :

  1.  Are you guys aware of @retention’s possible solution
  2.  If yes to #1, is it on your pipeline, and if so, when can we expect it?

 

Badge

Any update on this? Would appreciate it

Reply