Solved

How Do I Prevent Browse Abandonment Flow Emails from Showing an Out-of-Stock Product?

  • 29 March 2022
  • 7 replies
  • 229 views

Badge +1

Hi there,

 

I’ve looked all over and can’t seem to find the right answer, so hoping some good tips may surface here! 

I can’t figure out how to adjust my Browse Abandonment email to not fire when a user has browsed an out of stock product. I really don’t like that we’re sending emails to people about a product they can’t buy! 

How do I make it so that the Browse Abandonment flow (using WooCommerce) filters out of stock products to not trigger the flow? Or, better yet, filters such that a different flow occurs calling for recipients to Join Waitlist for the product to come back in stock?

 

Really appreciated any guidance!

 

Thanks

 

icon

Best answer by Taylor Tarpley 29 March 2022, 23:43

View original

7 replies

Userlevel 6
Badge +51

Hi @jack1234,

 

Thanks for sharing your question with us. Happy to help here! 

 

Definitely agree that something needs to be done about this as this is not a great user experience! If you want to prevent a browse abandonment flow from sending when the dynamically displayed item is out of stock, you will need to make a small update to the code in those templates, explained in our Help Center Documentation here. This is a one-time update that will prevent the abandonment emails from sending moving forward.

 

First, click on this table block and navigate to Rows. Next, toggle Column 1 from Image to Text.

2020-01-07_14-15-57.png

Here, delete the text "First Column" and click into the Source of this text block. In the Source area, copy and paste the following snippet:

{% 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 %}

After pasting this snippet, make sure to click Source again before clicking Save Changes to save this snippet in your text block.

This will ensure that:

  • Before a given email in your flow is scheduled to send, Klaviyo will look up the item that will dynamically populate in the individual email
  • If this item is "unpublished" in your catalog at the time of lookup, the email will be skipped
  • For a given flow email, you can navigate to Analytics > Recipient Activity > Other and you will see a category labeled: Skipped: Catalog Item Unavailable
  • This is where you can view all emails that were canceled -- i.e. skipped -- because an item featured in the email was out-of-stock or otherwise unavailable (if the item is no longer in your catalog)

 

Hope this helps! Thank you for participating in the Community!

-Taylor 

Badge +1

Thanks so much for the quick and helpful response Taylor! I will try this out!

Badge +1

Thanks again Taylor. Just implemented and will be monitoring.

 

Got a follow up question here -- we have a ‘waitlist’ feature on our site where people can join a product Waitlist for out of stock items, and receive notification when the item comes back in stock (that piece sent via a non-Klaviyo system).

 

I was wondering if I’d be able to clone my Browse Abandonment flow, and adjust it to be a “Waitlist” flow.

 

Could I take that snippet you shared and change it so that it the emails fire only when an item is out of stock? I’d then change the email body of course to have a call to action to join the Waitlist.

 

Would it look something like this?

{% catalog event.ProductID unpublished="send" %} <a href="{{ catalog_item.url }}"><img src="{{ catalog_item.featured_image.full.src }}" style="width: 200px;" width="200px" /></a> {% endcatalog %}

 

Or would the change target the unpublished piece of the snippet?

 

Really appreciate your help!

  • If this item is "unpublished" in your catalog at the time of lookup, the email will be skipped

 

I’m going to try this out but In my case I need to leave all products published and active on sales channels so they can still display on our website and users can see the previous items in the collection, though they are limited-time exclusive drops that will never re-stock. Will this still work for my scenario or is there something that can be done specifically for products with 0 quantity?

 

Thanks!

Userlevel 6
Badge +51

Hi @jack1234

 

I think you’re talking about a Building a Back in Stock Flow. There is specific documentation and configuration needed to create this flow  that I would encourage you to investigate that already exists!

 

To answer your question @CodyGG, yes  if a product is out of stock ie the quantity is 0 this code will still prevent emails from sending in the browse abandonment flow. 

 

Happy to help!

-Taylor

Hello @Taylor Tarpley.

 

We’ve been working through this flow and it works great except for variants that are out of stock. It appears that it only works if every variant is out of stock, not just one. Is it possible to make it so that it skips the email if the specific variant the customer added to cart is out of stock? Any help or guidance would be greatly appreciated.

 

Best,

Abby

Badge +2

Hi,

I’ve run into this problem as well and don’t find the solution works for me; I don’t want to ‘unpublish’ any of my products because they need to exist in order for my customers to sign up for restock notifications. It seems like bad practice to advise people to unpublish temporarily out of stock products.

Are there any plans for Klaviyo to add “stock” to their list of dimensions? 

I wouldn’t regard this issue as solved.

Reply