Skip to main content

Hi everyone,

I’m currently trying to build an abandoned cart email using a Dynamic Table block in Klaviyo.

I’ve noticed two issues and would love some clarification:

  1. When I use the Added to Cart metric (the custom event with the gear icon), I don’t see any array called line_items in the Preview & test when editing email in the flow — only generic event properties. As a result, my dynamic table can’t display multiple products.
  1. I read in Klaviyo documentation that the “Added to Cart” event is considered a single-product event, and that dynamic tables aren’t recommended for it. However, what if a customer abandons a cart that contains multiple items? Is there an official best practice for this?

My goal is simply to show all products in the abandoned cart using a dynamic table block.

Any guidance or best practices from Klaviyo experts or devs who’ve solved this would be greatly appreciated! 🙏

-Steven

Hey ​@megahuy2,

Welcome to the community! Happy to explain why you’re seeing this issue with your Added to Cart events.

While it’s definitely possible for somebody to add multiple items to their cart and abandon it, each “Added to Cart” event only contains data on that one specific item the person added to their cart in that moment. To explain further, the “Added to Cart” event sends information from Shopify to Klaviyo when somebody clicks the Add to Cart button on a specific product page. Information about that one product is gathered in the event data and sends to Klaviyo in the Added to Cart event. If you add 3 products to your cart, then start a checkout, you’ll record 3 Added to Cart events, and 1 Checkout Started event. An individual Added to Cart event isn’t going to have information on other items a person previously added to their cart; just that one item.

  1. It’s expected you won’t see line_items in the Added to Cart event data. You’ll see info on the one product a person added to their cart.
  2. The best practice for people who add multiple items to their cart, but don’t start a checkout is to have an Abandoned Cart flow anyway. Add filters to that flow that say, “Added to Cart zero times since starting this flow AND Checkout Started zero times since starting this flow” The message within the flow will only contain information on the last item a person added to their cart, but if you have a link to the person’s cart (like mystore.com/cart), they’ll be returned to their cart with all the items in it, as long as they’re on the same device, and their session has not expired.

Let me know if this makes sense, or if I can answer any additional questions!


Hey ​@megahuy2,

Welcome to the community! Happy to explain why you’re seeing this issue with your Added to Cart events.

While it’s definitely possible for somebody to add multiple items to their cart and abandon it, each “Added to Cart” event only contains data on that one specific item the person added to their cart in that moment. To explain further, the “Added to Cart” event sends information from Shopify to Klaviyo when somebody clicks the Add to Cart button on a specific product page. Information about that one product is gathered in the event data and sends to Klaviyo in the Added to Cart event. If you add 3 products to your cart, then start a checkout, you’ll record 3 Added to Cart events, and 1 Checkout Started event. An individual Added to Cart event isn’t going to have information on other items a person previously added to their cart; just that one item.

  1. It’s expected you won’t see line_items in the Added to Cart event data. You’ll see info on the one product a person added to their cart.
  2. The best practice for people who add multiple items to their cart, but don’t start a checkout is to have an Abandoned Cart flow anyway. Add filters to that flow that say, “Added to Cart zero times since starting this flow AND Checkout Started zero times since starting this flow” The message within the flow will only contain information on the last item a person added to their cart, but if you have a link to the person’s cart (like mystore.com/cart), they’ll be returned to their cart with all the items in it, as long as they’re on the same device, and their session has not expired.

Let me know if this makes sense, or if I can answer any additional questions!

thank you so much for this information. I really appreciate that


No problem!