Solved

Setting up dynamic block for 'Added to Cart' flow

  • 9 September 2022
  • 2 replies
  • 1299 views

Badge +2

Hello!

 

I’m currently trying to set up the dynamic block in the new template editor for the ‘Added to Cart’ flow. I can see in the metrics that the ‘Added to Cart’ metric is working properly, however, I can’t find the solution to actually display the product, which the user added to his/her cart, in the template. It’s fine if only one product is shown, but for me nothing is working in the previews. 

 

I’d be thankful for any help on this. It would be great if someone could show me exactly which formulas to insert in the dynamic table (and where) in order to show the right information. Only the product title and price is fine. 

 

Furthermore, what would be the right formula to insert in the ‘Back to your shopping cart’ button to lead the customer directly back to the shopping cart they filled?

 

Thanks a lot!

icon

Best answer by Dov 12 September 2022, 16:33

View original

2 replies

Userlevel 7
Badge +61

Hi @Konstantin,

Thanks for sharing this question with us.

Klaviyo provides you with a default Abandoned Cart flow for Shopify which uses the Added to Cart metric as its trigger. This will include all of the tags you need to populate item price, name etc. correctly. This can be found in the flows library if you search for Abandoned Cart: 

By default, this flow will use the classic editor emails. But we have a guide here on converting classic template editor emails to the new template editor emails. This will be available to all users by September 15th. Once you create the flow template, you can use the “Switch to New Editor” button within the flow emails themselves to update them to the new editor.

It’s also worth explaining a common problem when people use Added to Cart as their trigger - since Added to Cart only “stores” a single item in the event data, the table block (which is the block used to display items in the cart) needs to be set to Static instead of Dynamic. Using the Dynamic setting is often the culprit when an item isn’t displayed using Added to Cart. This is because a block set to Dynamic is meant to “cycle” through the items in the basket. Think of an Abandoned Cart using Checkout Started as its trigger instead, the Checkout Started event can contain 2,3,4 or more items in the cart. If the same Dynamic setting is applied to an event that only stores a single item i.e. Added to Cart, there’s no items to “cycle” through and so the block doesn’t work. That’s why we use the Static setting for Added to Cart.

From there, it’s a matter of copying and pasting the tags for item name, price etc. into the block. I explain this process in more detail in the threads below:

Of course the first option using the default flow is the most streamlined approach, but you can also populate your table block from scratch for your Added to Cart flow using the guides above for assistance. I hope that’s helpful.

Userlevel 7
Badge +43

@Konstantin,

I think what you're trying to accomplish is that whenever someone presses add to cart you want the entire cart contents to be sent to Klaviyo. Which is possible but needs some coding magic.

This also requires you to basically stop/halt the flow whenever a person adds a new product to their cart which a flow filter could help with. 

I hope this sets you on the right path.

 

Omar Lovert // Polaris Growth // Klaviyo Master Platinum Partner

Reply