Skip to main content
456 Topics
Help Center

Understanding how back in stock flows work

You will learn Learn about how back in stock flows work, how contacts move through them, and how they appear different from most other metric-triggered flows. For instance, they have the back in stock delay component, which is unique to this type of flow. If you haven't set up back in stock in your Klaviyo account or store yet, learn How to build a back in stock flow. Klaviyo currently supports back in stock flows for accounts with Shopify, BigCommerce, Magento 2, or PrestaShop integrations, as well as accounts with inventory-aware custom catalog feeds. Triggering the flow When a customer subscribes to an out of stock product on your site, you'll see an event tracked on their profile: Subscribed to Back in Stock. Those that subscribe to a back in stock alert will automatically enter your flow triggered off this Subscribed to Back in Stock event. Back in stock delay component After triggering the flow, you will see the contact added to the Waiting list of recipients at the back in stock delay component. To explore who is waiting at this step, click View details in the Performance section of the details sidebar for this delay. Sending to back in stock subscribers When a product comes back into stock, you'll see those waiting on this item move into the "Moved to Next Step" category. Depending on your back in stock settings, some or all of the contacts will receive a message alerting them that the item is available. Your flow's message status must be set to live or manual for subscribers to be added to the waiting list for the back in stock delay. If the message after the delay is set to draft, no one will be put in the waiting list. To view recipient activity around your stock alert email or SMS, click on the message itself. Here, in the Performance section of the sidebar, you will see a summary of activity over the last 30 days. Click View details to explore activity over a longer, or custom, timeframe. Note that it's not possible to check if the item is still in stock before sending a second message. After the initial message is sent, Klaviyo cannot check the inventory for the item to see if the item has gone out of stock again. Adding past profiles to back in stock flows Adding past profiles to back in stock flows typically won't bring in new people. Back in stock flows are triggered by the Subscribed to Back in Stock metric, and metric-triggered flows add past profiles based on time delays. Since back in stock flows are best without time delays (and the back in stock delay functions differently), adding past profiles won't have any effect. If you wish to reach out to those in a back in stock report, we recommend sending a campaign.  That said, if your back in stock flow does contain a time delay, adding past profiles will work similarly to how other metric-triggered flows add past profiles. The only difference is that with back in stock flows, someone in the waiting queue will be notified as soon as the product is back in stock. Additional resources Learn more about back in stock flows How to create a back in stock flow How to configure back in stock emails How to add SMS to a back in stock flow Read about How contacts move through a flow

Help Center

How to configure back in stock alert emails

You will learn Learn how to use pre-built templates or configure a custom template for a back in stock flow email. When creating a back in stock flow email, it's important to set up the message so that it shows the right product data. Klaviyo supports back in stock flows for accounts with Shopify, BigCommerce, Magento 2, and PrestaShop integrations, as well as accounts with inventory-aware custom catalog feeds. The instructions below cover Shopify, BigCommerce, and Magento 2 integrations.  If you are using a custom integration, learn how to set up back in stock via API. Use pre-built templates The pre-built back in stock flows you'll find in the Flow Library come configured with default email content. If you've built your own flow, to help get you started, you will find a pre-built back in stock email template in the Email templates tab. Simply search "back in stock" when configuring your stock alert email. Create your own back in stock email To configure your email content, you will need to use a specific set of dynamic event variables. Given it may be days, weeks, or even months before an item is restocked, we realize that details about the item (for example, images or price) may change. For this reason, Klaviyo uses a special set of dynamic event variables for this email that will look up the restocked product in your catalog at send time and populate the most up-to-date details available. Note that the table block within the email template must be set to static, not dynamic, in order to function. Shopify stores Product Detail Dynamic Event Variable (Shopify Stores) Product Title {% catalog event.VariantId integration='shopify' %} {{ catalog_item.title }} {% endcatalog %} Product URL {% catalog event.VariantId integration='shopify' %}{{ catalog_item.url }}{% endcatalog %} Product Price {% catalog event.VariantId integration='shopify' %}{% currency_format catalog_item.variant.price|floatformat:2 %}{% endcatalog %} Variant Image {% catalog event.VariantId integration='shopify' %} {{ catalog_item.variant.featured_image.full.src|default:catalog_item.featured_image.full.src }} {% endcatalog %} Variant Title {% catalog event.VariantId integration="shopify" %} {{ catalog_item.variant.title }} {% endcatalog %} Variant URL {% catalog event.VariantId integration='shopify' %}{{ catalog_item.url }}?variant={{ catalog_item.variant.id }}{% endcatalog %} BigCommerce stores If you are having an issue with incorrect items appearing in your BigCommerce back in stock emails, it could be caused by some of your products having a VariantID that matches another item's ProductID in BigCommerce. To solve this, replace VariantID with ProductID when using the dynamic event variables below in your emails. Making this replacement should solve the incorrect item issue, though variant-specific information will no longer be shown. Product Detail Dynamic Event Variable (BigCommerce Stores) Product Title {% catalog event.VariantId integration='bigcommerce' %} {{ catalog_item.title }} {% endcatalog %} Product URL {% catalog event.VariantId integration='bigcommerce' %}{{ catalog_item.url }}{% endcatalog %} Product Price {% catalog event.VariantId integration='bigcommerce' %}{% currency_format catalog_item.metadata.price|floatformat:2 %}{% endcatalog %} Variant Image {% catalog event.VariantId integration='bigcommerce' %} {{ catalog_item.variant.featured_image.full.src|default:catalog_item.featured_image.full.src }} {% endcatalog %} Variant Title {% catalog event.VariantId integration="bigcommerce" %} {{ catalog_item.variant.title }} {% endcatalog %} Variant URL {% catalog event.VariantId integration='bigcommerce' %}{{ catalog_item.url }}?variant={{ catalog_item.variant.id }}{% endcatalog %} Magento 2 stores Product Detail Dynamic Event Variable (Magento 2 Stores) Product Title {% catalog event.VariantId integration='magento_two' %} {{ catalog_item.title }} {% endcatalog %} Product URL {% catalog event.VariantId integration='magento_two' %}{{ catalog_item.url }}{% endcatalog %} Product Price {% catalog event.VariantId integration='magento_two' %}{% currency_format catalog_item.variant.price|floatformat:2 %}{% endcatalog %} Variant Image {% catalog event.VariantId integration='magento_two' %} {{ catalog_item.variant.featured_image.full.src|default:catalog_item.featured_image.full.src }} {% endcatalog %} Variant Title {% catalog event.VariantId integration="magento_two" %} {{ catalog_item.variant.title }} {% endcatalog %} Variant URL {% catalog event.VariantId integration='magento_two' %}{{ catalog_item.url }}?variant={{ catalog_item.variant.id }}{% endcatalog %} Example Here's what a template will look like inside the Template Builder with dynamic event variables, with a comparison of what this same template will look like when previewed with real event data: Additional resources Check out other articles on back in stock flows How to create a back in stock flow Understanding how back

Help Center

How to install Back In Stock for BigCommerce

You will learn Learn how to install Klaviyo's Back in Stock feature on your BigCommerce store. This feature has two key components - a flow, and a button on your website.  Back in Stock flow: When someone subscribes to a restock alert, a "Subscribed to Back in Stock" event will be tracked on their Klaviyo profile. This is the event you will use to trigger your Back in Stock Flow. Shoppers will enter the flow when they subscribe to a restock alert and wait at a "Back in Stock Delay" until their item of interest is restocked. Website button: You will need to add a snippet to your BigCommerce theme that will automatically show a "Notify Me When Available" button when items go out-of-stock. When shoppers click this button, they will fill out a form and subscribe to a restock alert. Before you begin This guide will focus on installing Klaviyo's Back in Stock snippet in your BigCommerce script manager so shoppers can subscribe to restock alerts. Before starting, you will want to have a Back in Stock flow already set up in your account to both capture these subscribers and then automate the back in stock alert process. Please note that our Back in Stock button is not supported within the Quick View modal accessed from a Collections page. The button must only be placed on the product page. How does the snippet work? As soon as you install the snippet provided below, the following will occur: When a shopper browses a product and the product is out-of-stock, a "Notify Me When Available" button will appear directly where the "Sold Out" button that would normally show. When someone clicks the "Notify Me..." button, a form will pop up that allows the shopper to sign up to be notified when the item is restocked. As soon as the form is submitted, a "Subscribed to Back In Stock" event will be tracked on that shopper's profile inside Klaviyo. Then, the Back in Stock flow you've already set up will alert shoppers when the item they subscribed to is back in stock. Klaviyo tracks your inventory inside your Klaviyo account and refreshes products every 3 hours, and variants every hour. Because of this delay, there can be instances where products that have gone out of stock in your store are not yet reflected in Klaviyo. There can also be instances where a product that has come back in stock in your store has not been reflected in Klaviyo. Klaviyo also monitors your inventory on a variant level. This means shoppers can subscribe to receive alerts about specific product variants. For example, if a customer finds you're out of their favorite Pink T-Shirt in a Size Medium, they can subscribe to this specific variant and Klaviyo will make sure they will only be notified once you've restocked this size and color. Install the snippet To install the Klaviyo back in stock snippet, you'll add it to a new script in your Script Manager. From your BigCommerce Admin, navigate to Storefront > Script Manager. Click Create a Script. Use the following settings: Name of script: Klaviyo back in stock Location on page: Footer Select pages where script will be added: Store Pages Script type: Script Next, update the script below with your Klaviyo public API key, and paste the updated script into the script box. You can copy your 6-character public API key from Klaviyo. To find it, click your account name in the lower left corner, then navigate to Settings > API keys. In the script, your public API should replace the text reading PUBLIC_API_KEY. <script src="https://a.klaviyo.com/media/js/onsite/onsite.js"></script> <script> var klaviyo = klaviyo || []; klaviyo.init({ account: 'PUBLIC_API_KEY', platform: 'bigcommerce' }); klaviyo.enable("backinstock",{ trigger: { product_page_text: "Notify Me When Available", product_page_class: "button", product_page_text_align: "center", product_page_margin: "0px", replace_anchor: false }, modal: {   headline: "{product_name}",   body_content: "Register to receive a notification when this item comes back in stock.",   email_field_label: "Email",   button_label: "Notify me when available",   subscription_success_label: "You're in! We'll let you know when it's back.",   footer_content: '',   additional_styles: "@import url('https://fonts.googleapis.com/css?family=Helvetica+Neue');",   drop_background_color: "#000",   background_color: "#fff",   text_color: "#222",   button_text_color: "#fff",   button_background_color: "#4787ed",   close_button_color: "#ccc",   error_background_color: "#fcd6d7",   error_text_color: "#C72E2F",   success_background_color: "#d3efcd",   success_text_color: "#1B9500" } }); </script> Click Save. You've now added the

Help Center

How to install Back in Stock for Shopify

You will learn  Learn how to install Klaviyo's back in stock feature for Shopify so that your customers can subscribe to back in stock alerts. Setting up back in stock consists of creating a flow in Klaviyo and adding a customizable code snippet to your Shopify store.  Before you begin Installation of back in stock is only supported for certain free Shopify themes, and not for Shopify stores using custom themes. At this time, Klaviyo support cannot assist with implementing back in stock for stores using custom themes. To check which Shopify theme your store is using, you can use a Shopify theme detector.  Please note that Klaviyo does not provide custom coding assistance. If you need developer assistance, consider reaching out to one of Klaviyo's partners.  About Klaviyo’s Back in Stock feature Klaviyo's Back in Stock feature for Shopify has 2 key components: Back in Stock flowWhen someone subscribes to a back in stock alert, a Subscribed to Back in Stock event will be tracked on their Klaviyo profile. This is the event you will use to trigger your back in stock flow. Shoppers will enter the flow when they subscribe to a product and will be contacted when their item of interest is restocked. Website buttonYou will need to add a snippet to your Shopify theme that will automatically show a "Notify Me When Available" button when items go out of stock. As soon as you install the snippet, the following will occur: When a shopper browses a product and the product is out-of-stock, a "Notify Me When Available" button will appear directly next to, or below, the "Sold Out" button. When someone clicks the "Notify Me" button, a form will pop up that allows the shopper to enter their email to be notified when the item is restocked. As soon as the form is submitted, a Subscribed to Back In Stock event will be tracked on that shopper's profile inside Klaviyo. Klaviyo monitors your inventory on a variant level, which means that shoppers can subscribe to receive alerts about specific product variants. For example, if a customer finds you're out of their favorite pink t-shirt in a size medium, they can subscribe to this specific variant and Klaviyo will make sure they will only be notified once you've restocked this size and color. If you have not already, read our guide on getting started with Shopify for step-by-step instructions on integrating, before continuing with this article. Before installing the snippet Before you install the snippet via the instructions below, do the following: Check that you’ve enabled Klaviyo’s onsite tracking on your Shopify store (including Viewed Product), either via Klaviyo’s app embed or manually.  Make sure that either an Add to Cart button or a contact form need to be present on your product page. Some Shopify themes may remove the Add to Cart button when there is no stock. In this case, confirm that when there is no stock, your Shopify Theme displays a Sold Out button, to ensure that the Klaviyo code will work. Back in Stock for Shopify video Install the snippet Add the code snippet below to your theme.liquid file. These instructions apply to both Shopify 2.0 users and those using vintage themes.  From your Shopify Admin click Online Store > Themes. Click your theme’s Actions dropdown and select Edit Code. Search for the theme.liquid file, and click to open it in the editor. Copy the JavaScript snippet below and paste it into your theme.liquid file directly above the </body> tag.  <script src="https://a.klaviyo.com/media/js/onsite/onsite.js"></script> <script> var klaviyo = klaviyo || []; klaviyo.init({ account: "PUBLIC_API_KEY", platform: "shopify" }); klaviyo.enable("backinstock",{ trigger: { product_page_text: "Notify Me When Available", product_page_class: "button", product_page_text_align: "center", product_page_margin: "0px", replace_anchor: false }, modal: { headline: "{product_name}", body_content: "Register to receive a notification when this item comes back in stock.", email_field_label: "Email", button_label: "Notify me when available", subscription_success_label: "You're in! We'll let you know when it's back.", footer_content: '', additional_styles: "@import url('https://fonts.googleapis.com/css?family=Helvetica+Neue');", drop_background_color: "#000", background_color: "#fff", text_color: "#222", button_text_color: "#fff", button_background_color: "#439fdb", close_button_color: "#ccc", error_background_color: "#fcd6d7", error_text_color: "#C72E2F", success_background_color: "#d3efcd", success_text_color: "#1B9500" } }); </script> You'll need to replace the PUBLIC_API_KEY text in the snippet with your Klaviyo public API key. Learn how to find your account's public API key. If you use multiple Klaviyo accounts, make sure you are using the key from the correc

Help Center

How to style Back in Stock buttons and forms for free Shopify themes

You will learn Learn what key changes to make for each free Shopify theme to quickly ensure your Back in Stock button and form match your theme's styling. The Klaviyo "Notify Me When Available" button and form are highly configurable. You are able to change the colors, fonts, text, and other elements according to your design preferences.  Installation of back in stock is only supported for certain free Shopify themes, and not for Shopify stores using custom themes. At this time, Klaviyo support cannot assist with implementing back in stock for stores using custom themes. To check which Shopify theme your store is using, you can use a Shopify theme detector.  Before you begin If you have not already, read our guide on getting started with Shopify for step-by-step instructions on integrating, before continuing with this article. To learn about more generally about the Back in Stock feature and how to enable it, read our guide on install back in stock for Shopify. How to style your button and form When you're installing your snippet, find the styling snippet for your free theme in this article. The default snippet is shown below. Update (or add) line items within the trigger: {} and modal: {} sections of the default snippet according to what's shown in the styling snippet For example, if you have the Crave theme, you only need to add the the following line within the modal section: font_family: '"Archivo", serif;' Make any other desired styling updates to the line items as you see fit. <script src="https://a.klaviyo.com/media/js/onsite/onsite.js"></script> <script> var klaviyo = klaviyo || []; klaviyo.init({ account: "PUBLIC_API_KEY", platform: "shopify" }); klaviyo.enable("backinstock",{ trigger: { product_page_text: "Notify Me When Available", product_page_class: "button", product_page_text_align: "center", product_page_margin: "0px", replace_anchor: false }, modal: { headline: "{product_name}", body_content: "Register to receive a notification when this item comes back in stock.", email_field_label: "Email", button_label: "Notify me when available", subscription_success_label: "You're in! We'll let you know when it's back.", footer_content: '', additional_styles: "@import url('https://fonts.googleapis.com/css2?family=Roboto+wght@400;700&display=swap');", drop_background_color: "#000", background_color: "#fff", text_color: "#222", button_text_color: "#fff", button_background_color: "#439fdb", close_button_color: "#ccc", error_background_color: "#fcd6d7", error_text_color: "#C72E2F", success_background_color: "#d3efcd", success_text_color: "#1B9500" } }); </script> Crave trigger: { product_page_class: 'button' }, modal: { font_family: '"Archivo", serif;' } Dawn trigger: { product_page_class: 'button' }, modal: { font_family: '"Assistant", sans-serif;' } Studio trigger: { product_page_class: 'button' }, modal: { font_family: '"Electra", serif;' } Colorblock trigger: { product_page_class: 'button' }, modal: { font_family: '"Futura", sans-serif;' } Sense trigger: { product_page_class: 'button' }, modal: { font_family: '"Harmonia Sans", sans-serif;' } Taste trigger: { product_page_class: 'button' }, modal: { font_family: '"Anonymous Pro", sans-serif;' } Craft trigger: { product_page_class: 'button' }, modal: { font_family: '"Quattrocento Sans", sans-serif;' } Ride trigger: { product_page_class: 'button' }, modal: { font_family: '"Avenir Next", sans-serif;' } Refresh trigger: { product_page_class: 'button' }, modal: { font_family: '"Questrial", sans-serif;' } Simple Beauty modal: { font_family: '"PT Serif",serif;' } Pop Bone trigger: { product_page_class: 'btn btn--full' }, modal: { additional_styles: "@import url('https://fonts.googleapis.com/css?family=Raleway');", font_family: '"Raleway","HelveticaNeue","Helvetica Neue",sans-serif;' } Toy trigger: { product_page_class: 'btn btn--large btn--full' }, modal: { additional_styles: "@import url('https://fonts.googleapis.com/css?family=Open+Sans');", font_family: '"Open Sans","HelveticaNeue","Helvetica Neue",sans-serif;' } Black & White trigger: { product_page_class: 'btn btn--large btn--full' }, modal: { additional_styles: "@import url('https://fonts.googleapis.com/css?family=Open+Sans');", font_family: '"Open Sans","HelveticaNeue","Helvetica Neue",sans-serif;' } Vibrant trigger: { product_page_class: 'btn btn--large btn--full' }, modal: { additional_styles: "@import url('https://fonts.googleapis.com/css?family=Open+Sans');", font_family: '"Open Sans","HelveticaNeue","Helvetica Neue",sans-serif;' } Venture Snowboards trigger: { product_page_class: 'btn btn--full' }, modal: { additional_styles: "@import url('https://fonts.googleapis.com/css?family=Karla');", font_family: '"Karla","HelveticaNeue","Helvetica Neue",sans-serif;' } Outdoo