How would I make sure out of stock items don’t trigger the product browse flow? Old articles that touched on it are pretty outdated. Can’f seem to figure this out.
Omit Out of Stock Items from Product Browse Flow
Best answer by ArpitBanjara
Hey
I had this same issue a couple of years ago, and I had fixed it with a code block with the help of klaviyo’s chat support. The change happens inside the email template itself. In your browse abandonment email, find the dynamic product table, switch the image column from Image to Text, click into the source code view, and replace whatever is there with this: (also this will just show the image and will link to product page url)
{% catalog event.ProductID unpublished="cancel" %}
<a href="{{ catalog_item.url }}">
<img src="{{ catalog_item.featured_image.full.src }}" style="width: 200px;" width="200px" /></a>
{% endcatalog %}Once this is in place, Klaviyo checks the product's status in your catalog right before the email is scheduled to send. If the item is unpublished at that moment, the whole email gets skipped.
Try to first get the image right. if that works correctly and if you want to add the ‘name of the product + price’ on the second column, try and paste the below code
{% catalog event.ProductID unpublished="cancel" %}
<p style="font-weight: bold;">{{ catalog_item.title }}</p>
<p>{{ catalog_item.price }}</p>
{% endcatalog %}I hope this helps and thank you for sharing your question here in the community. If you are still stuck, feel free to schedule a call with us.
Cheers,
Arpit
Log in to the Community
Use your Klaviyo credentials
Log in with Klaviyo
Use your Klaviyo credentials
Log in with KlaviyoEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

