What this will do:
- Before a given email in your flow is scheduled to send, Klaviyo will look up each item that will dynamically populate in the individual email
- If any one item is "unpublished" in your catalog at the time of lookup, the email will not be sent
- 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)
At this time, it is not possible to remove a single out-of-stock item from an email and send the rest of the email as scheduled. If someone abandons 5 items in a cart, and only 1 of the 5 items has gone out-of-stock, this feature will still cancel the full email.
Browse abandonment flow
Klaviyo's default browse abandonment email template features a static table block that is used to populate each email with the specific item a recipient browsed your website.
If you want browse abandonment emails to automatically get canceled if they are going to feature an item that has since gone out-of-stock, you have to adjust the image section of the existing table in a given template.
- Click on your dynamic table in the email template editor.
- In the Content tab, click the left dynamic row.
- Under Cell Content, toggle content from Image to Text.
- Above the text box, click into the
Source
of this text block by clicking the </> button on the right. - 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 }}" width="200" /></a> {% endcatalog %}
-
Make sure to then click Source again before clicking Done in the top left to save this snippet in your text block.
What this will do:
- 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 get 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)
Test the out-of-stock feature
The best way to test out this feature:- Adjust your email templates as explained above
- View an item on your site and/or start a checkout with a single item in your cart
- Wait until you see your tracked event appear in your account's Activity Feed
- Mark this single item out-of-stock in your store's backend
- Navigate to the flow that is triggered by the action you took (Viewed Product or Started Checkout) and has your newly adjusted email templates
- Click to preview one of these emails, and make sure the "choose a recent event to preview with" window features your own recent event
- When you click Preview, you should see a preview where the item's image doesn't populate and instead the following message appears "Item (XXXXXX) is not published and unavailable."
Additional resources
Learn more about the Magento integration: