Skip to main content
Solved

Abandoned Checkout Flow - Items not showing

  • February 14, 2025
  • 5 replies
  • 35 views

Forum|alt.badge.img+1

Hi there,

 

I am trying to create an abandonded checkout flow which is triggered off the checkout started trigger. 

 

I duplicated the new flow from the Shopify Abandonded Cart Flow. When testing the checkout flow the images and product information is not appearing. 

 

This is the code

img: {{ event.URL }}

description: 

{{ event|lookup:'Product Name'|default:'' }}

 

Price: {% currency_format event|lookup:'Price'|floatformat:2 %}

link: {{ event.URL }}

 

What are the correct codes to show someone what was in their checkout and take them directly to checkout? 

 

Cheers

Best answer by annasophiefc

Hi ​@kellycous93 

 

Thank you for posting in the Community!

 

First of all, is your flow being triggered of the Added to Cart or the Started Checkout metric in Shopify?

 

If it is the Added to cart you can try setting in these variables:

Image URL: {{ event.ImageURL|default:'' }}

Product Name: {{ event.Name|default:'' }}

Product URL: {{ event.URL|default:'' }}

Price: {{ event.Price|default:'' }}

 

If it is the Started checkout metric it will dynamically pull in all products in the cart, therefore you should setup a table with row collection and row alias as shown below. From there, you can pull in the attributes:

Image URL: {% if item.product.variant.images.0.src %}{{item.product.variant.images.0.src}}{%else%}{{item.product.images.0.src|missing_product_image}}{%endif%}

Product Name: {{item.product.title}}

Product URL: {{ organization.url|trim_slash }}/products/{{ item.product.handle }}

Price: {{ item.price|default:'' }}

 

I sincerely hope this helps you - otherwise I am happy to assist further!

 

View original
Did this topic or the replies in the thread help you find an answer to your question?

5 replies

Amos Peace
Problem Solver III
Forum|alt.badge.img+5
  • Problem Solver III
  • 62 replies
  • February 14, 2025

Hello ​@kellycous93,

You're on the right track, but the issue is likely that the event data structure for "Checkout Started" is different from "Abandoned Cart" in Klaviyo. The correct variables depend on how Shopify sends the data. Try using the following:

1. Correct the Image, Product Name, Price, and Checkout Link

Replace your current code with this:

{% for item in event.extra.line_items %} **Product:** {{ item.product.title }} **Price:** {% currency_format item.line_price %} **Image:** <img src="{{ item.product.images.0.src }}" alt="{{ item.product.title }}" width="200"/> **Link to Checkout:** [Return to Checkout]({{ event.extra.checkout_url }}) {% endfor %}

2. Explanation of Fixes:

  • event.extra.line_items → Loops through all products in the abandoned checkout.
  • item.product.title → Displays the product name.
  • item.line_price → Formats the price correctly.
  • item.product.images.0.src → Grabs the first product image.
  • event.extra.checkout_url → Directs the user back to their checkout.

3. Next Steps

  • Test this in Klaviyo's "Preview" mode to confirm the correct data is pulling in.
  • If images still don’t appear, check Shopify’s event data to ensure images are included in the webhook.

 Kindly reach out if you need adjustments.

 

Best Regards,


Forum|alt.badge.img+1
  • Author
  • Contributor II
  • 4 replies
  • February 14, 2025

Hi, thanks for your response but that didn’t work for me :( 

 

 


Adunni
Active Contributor II
Forum|alt.badge.img+1
  • Active Contributor II
  • 21 replies
  • February 14, 2025

Hi ​@kellycous93,

Great question! The issue is that the event data in your abandoned checkout flow is different from the abandoned cart flow. The correct way to display product details in your abandoned checkout emails is to use the right event properties. Try this updated version:

Image:

<img src="{{ event.extra.line_items.0.product.image.src }}" alt="Product Image">

Product Name:

{{ event.extra.line_items.0.product.title }}

Price:

{{ event.extra.line_items.0.line_price | money }}

Checkout Link:

{{ event.extra.checkout_url }}

This will dynamically pull in the first product from the abandoned checkout and link the customer back to their checkout session. If you want to show multiple products, you need to loop through event.extra.line_items.

Let me know if you need further clarification!

Cheers,
Adunni


Forum|alt.badge.img+1
  • Author
  • Contributor II
  • 4 replies
  • February 16, 2025

I don’t know what I am doing wrong, but that’s not working either :( 

 

 


annasophiefc
Partner - Platinum
Forum|alt.badge.img+22
  • 2025 Champion
  • 100 replies
  • Answer
  • February 17, 2025

Hi ​@kellycous93 

 

Thank you for posting in the Community!

 

First of all, is your flow being triggered of the Added to Cart or the Started Checkout metric in Shopify?

 

If it is the Added to cart you can try setting in these variables:

Image URL: {{ event.ImageURL|default:'' }}

Product Name: {{ event.Name|default:'' }}

Product URL: {{ event.URL|default:'' }}

Price: {{ event.Price|default:'' }}

 

If it is the Started checkout metric it will dynamically pull in all products in the cart, therefore you should setup a table with row collection and row alias as shown below. From there, you can pull in the attributes:

Image URL: {% if item.product.variant.images.0.src %}{{item.product.variant.images.0.src}}{%else%}{{item.product.images.0.src|missing_product_image}}{%endif%}

Product Name: {{item.product.title}}

Product URL: {{ organization.url|trim_slash }}/products/{{ item.product.handle }}

Price: {{ item.price|default:'' }}

 

I sincerely hope this helps you - otherwise I am happy to assist further!