How to configure back in stock alert emails

read
Last updated at:

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, and Magento 2 integrations, as well as accounts with inventory-aware custom catalog feeds. The instructions below covers Shopify, BigCommerce, and Magento 2 integrations. 

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 Template Library. 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

Additional resources

Check out other articles on back in stock flows

Learn more about dynamic variables in Personalize flow emails with dynamic event data

x
Was this article helpful?
54 out of 88 found this helpful