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, PrestaShop, Shopware, and SFCC integrations, as well as accounts with inventory-aware catalogs sync via custom catalog feed or API. 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.

Before you begin

Before you configure back in stock emails for your back in stock flows, you must have set up back in stock for your ecommerce store:

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:

An example of a content block with the image and text using dynamic event variables next to the same block populated with content in a preview
An example of a content block with the image and text using dynamic event variables next to the same block populated with content in a preview

Additional resources

Check out other articles on back in stock flows

  • How to build a back in stock flow

    Learn how to build a Klaviyo back in stock flow to alert customers about inventory if you are using the Shopify, BigCommerce, Magento 2, PrestaShop, SFCC, or Shopware platforms, or if you have an inventory-aware catalog synced via custom catalog feed or API.

  • Understanding how back in stock flows work

    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.

  • How to use SMS in your back in stock flows

    Learn how to use SMS in your back in stock flows with Klaviyo.

  • How to use event data to personalize email and SMS flows

    Learn what dynamic event data is, when to use it, where to find it, and how to include it in your flow messages. Learn about the different actions your customers take, and how you can use that data for creating personalized messaging flows in Klaviyo. For instance, you could use event data in an abandoned cart flow message to show individuals what product they left behind, an image of the item, and more. This allows for a more personalized experience for the customer, as well as a higher chance of conversion.

Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Partners
Hire a Klaviyo-certified expert to help you with a specific task, or for ongoing marketing management.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type