Skip to main content
Question

Omit Out of Stock Items from Product Browse Flow

  • March 24, 2026
  • 6 replies
  • 44 views

Forum|alt.badge.img

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.

6 replies

whereisjad
Expert Problem Solver IV
Forum|alt.badge.img+18
  • Expert Problem Solver IV
  • March 24, 2026

@long in order to answer this question effectively could you indicate what type of catalog for this example (Shopify, WooCommerce, custom, etc...) ?  Does the out of stock item appear as unpublished in the Klaviyo catalog? Since you want to do this for a Browse Abandon flow then the pre-requisite is that the Viewed Product event include the Variant Id which you could reference in the catalog tag to make that determination.  I don’t believe Shopify by default fires the Viewed Product event with Variant ID, you would need to add customizations that would trigger off the swatch changes for product changes eg size or color for product in question.


Forum|alt.badge.img
  • Author
  • Contributor I
  • March 24, 2026

It’s for Shopify. It’s products that are out of stock, but have the notify when back in stock button. Products are in the catalog im sure as all go there. Has to be a way to prevent this. it’s such a horrible user experience.


whereisjad
Expert Problem Solver IV
Forum|alt.badge.img+18
  • Expert Problem Solver IV
  • March 25, 2026

@long again you will need to edit the Viewed Product event to pass Variant ID

Then you could use logic like below to short-circuit send of the email using the approach below:

{% catalog variantId integration='shopify' %}

{% if catalog_item.inventory_quantity  ==  0 %}

{% catalog '0' unpublished="cancel" %}

{% endcatalog %}
{% endif %}

{% endcatalog %}

the inner catalog tag intentionally references an ID that does not exist if its reached.

Hope this makes sense.


Forum|alt.badge.img
  • Contributor II
  • March 25, 2026

Hey! This usually happens because of a Metric Mapping error between Shopify and Klaviyo. In 2026, the fix is to check your 'Integration Settings' and ensure the Custom Event is properly triggered.

I just sent you a DM with the specific '2-click' fix I used for a $7k/month store last week. Happy to send over a screenshot of the settings if you're still stuck!

 


ArpitBanjara
Principal User II
Forum|alt.badge.img+37
  • Principal User II
  • March 25, 2026

Hey ​@long 

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


NicolineLage
Partner - Gold
Forum|alt.badge.img+8
  • Partner - Gold
  • March 25, 2026

Hi ​@long

We experience this with several of our clients.

Klaviyo also built a guide specifically for this problem: Shopify and Klaviyo browse abandon flow.

You can find the article here: How to configure out-of-stock items for automated flows on Shopify https://help.klaviyo.com/hc/en-us/articles/115005253188

Test the flow afterwards by viewing an out of stock item on your site and make sure this triggers on your profile in Klaviyo. 

I hope this helps you along with all the other tips from the community.

 

Cheers