Stop Flows from sending when product is Out Of Stock

  • 7 February 2023
  • 2 replies

Badge +2



Has anyone had success in pulling through stock levels/inventory through to Klaviyo from Big Commerce so we can exclude flow emails from sending out when products are out of stock? 


This would be great for Abandoned Cart, Price Drop, etc.


Potentially through custom API?


Thanks heaps!


Best answer by In the Inbox 7 February 2023, 15:20

View original

2 replies

Userlevel 6
Badge +26

Hi @Danielle NZ 

Thank you for posting your question in the community and this is a great question. 

While I cannot speak directly to Big Commerce, I have been able to set up a cart abandon email that suppresses an email from being triggered if an item goes out of stock. In this case, I was working with an account that was integrated with Shopify, but I expect the set up would be similar for other ecommerce platforms. 

When you connect your ecommerce platform to Klaviyo, and there is a direct integration with Big Commerce, all of the order and product information is sync’d with Klaviyo. In the left-hand navigation under Content > Products. This is were the integration is syncing published vs. unpublished products. 

In Big Commerce, if a product is OOS (Out of Stock) and becomes unpublished, this information should sync with Klaviyo. 

The set up of suppressing an email is a bit different than you might expect for an OOS item. You actually implement a set of tags in the dynamic table or section within the image block to suppress an out of stock product. 

This might be slightly different depending on your ecommerce, but again, when I set this up for Shopify, we replaced the placeholder image link with the following:

{% catalog item.product_id unpublished="cancel" %} <a href="{{ event.extra.responsive_checkout_url }}"> <img alt="" src="{{ catalog_item.featured_image.thumbnail.src }}" style="width: 150px;" width="200px" /></a> {% endcatalog %}{% endif %}

This code will render the product image if the product is still available and if the item is sold out, this will suppress the email from being sent. 

When this is implemented and active, you’ll find a new Skipped reason in the message analytics called Catalogue Item Unavailable

I realize this might not be the exact answer you are looking for as it relates to Big Commerce pulling in stock levels, but given it is one of the primary ecommerce platforms that Klaviyo integrates with, I suspect the inventory levels are syncing and you can configure your cart abandon emails with the code above.

Good luck!

@In the Inbox 

Userlevel 7
Badge +57

Just to add to @In the Inbox great answer, there’s a similar documentation on this for Magento (again, should work with BigCommerce but you may have to tweak) and some other related docs that might be helpful.

Hope this helps!