Skip to content

Personalize Klaviyo back in stock emails with variables

The product, customer, and shop details STOQ sends with each back in stock event, and how to insert them in your Klaviyo template.

Last updated

When you send back in stock alerts through Klaviyo, STOQ passes product, customer, and shop details as event properties on the metric event. This is the full reference of what’s available, so you can personalize your flow’s email template beyond the basics.

This reference covers the email events. SMS through Klaviyo uses separate events with a slightly different set of properties, listed in SMS variables.

Requirement Detail
Alerts routed through Klaviyo This only applies once you’ve selected Klaviyo as your sending platform. See Send back in stock alerts through Klaviyo.
A flow with an email or SMS action Open the flow’s Email or SMS action in your Klaviyo dashboard to edit its template.
  1. Open the email template in Klaviyo

    In your Klaviyo dashboard, open the flow for your back in stock alert or reminder, then open its Email action to edit the template.

  2. Add the variable to a text block

    Click into a text block and type the variable using its property name from the tables below, for example {{ event.product_title }}. STOQ’s own generated templates use this same syntax, so you can copy the pattern directly from a block that already has one.

Variable What it is
{{ event.product_title }} The restocked product’s title
{{ event.variant_title }} The variant title, like “Medium / Blue”
{{ event.title_incl_variant }} Product and variant combined, like “Sample Product - Medium / Blue”
{{ event.sku }} The variant’s SKU, blank if the variant has none
{{ event.vendor }} The product’s vendor
{{ event.product_type }} The product’s type
{{ event.product_handle }} The product’s URL handle
{{ event.product_tags }} The product’s Shopify tags, as a list, like ["preorder", "summer"]
{{ event.product_id }} The Shopify product ID
{{ event.variant_id }} The Shopify variant ID
{{ event.image_url }} The product image
{{ event.price }} The variant’s price
{{ event.compare_at_price }} The variant’s compare-at price exactly as set in Shopify. Empty if the variant has none
{{ event.currency }} The shop’s currency code, like USD
{{ event.market_id }} The Shopify market ID, when the alert is for a specific market
Variable What it is
{{ event.product_page_link }} Link to the product page
{{ event.checkout_link }} Direct link to check out with this product in the cart
{{ event.unsubscribe_link }} The customer’s unsubscribe link
Variable What it is
{{ event.shop_name }} Your sender name, as set in STOQ’s email settings
{{ event.shop_logo_url }} The logo from STOQ’s email settings
{{ event.shop_domain }} Your store’s domain
Variable What it is
{{ event.customer_name }} The customer’s name
{{ event.customer_email }} The customer’s email
{{ event.customer_locale }} The customer’s locale code, like en
{{ event.customer_country }} The two-letter country code, in capitals, of the country the customer signed up from, like US
{{ event.customer_country_name }} The customer’s country, spelled out
Variable What it is
{{ event.is_reminder }} true if this event is a reminder rather than the first alert
{{ event.template_position }} The position of this notification in your sequence, 0 for the first alert, 1 for the first reminder
{{ event.email_message_id }} STOQ’s ID for this email message

Product tags are included on email events only. The SMS events don’t carry product_tags.

product_tags carries the product’s Shopify tags on every back in stock and reminder event, so one flow can send different emails for different kinds of products. For example, a product tagged preorder can get a “preorder now open” email while everything else gets the standard restock email.

  1. Add a Trigger Split to the flow

    In your flow, drag a Trigger Split in after the trigger, before the email action.

  2. Set the condition on the tag

    Choose Properties about someone’s trigger, pick product_tags, and set the condition to contains with the tag you want to match, for example preorder. Tags match exactly as they are written in Shopify, including capitalization.

  3. Add an email to each branch

    Put the tag-specific email on the Yes branch and the standard email on the No branch.

SMS through Klaviyo fires its own events, Back in stock SMS alert (STOQ) and a numbered event for each reminder, like Back in stock SMS reminder 1 (STOQ). They carry these properties:

Variable What it is
{{ event.product_title }} The restocked product’s title
{{ event.variant_title }} The variant title
{{ event.title_incl_variant }} Product and variant combined
{{ event.sku }} The variant’s SKU
{{ event.vendor }} The product’s vendor
{{ event.product_type }} The product’s type
{{ event.product_handle }} The product’s URL handle
{{ event.product_id }}, {{ event.variant_id }}, {{ event.market_id }} The Shopify product, variant, and market IDs
{{ event.image_url }} The product image
{{ event.price }}, {{ event.compare_at_price }}, {{ event.currency }} The price, compare-at price, and currency
{{ event.purchase_link }} The link for the customer to buy the product
{{ event.shop_name }} Your sender name, as set in STOQ’s email settings
{{ event.shop_domain }} Your store’s myshopify domain
{{ event.customer_name }} The customer’s full name
{{ event.customer_first_name }} The customer’s first name
{{ event.customer_last_name }} The customer’s last name
{{ event.customer_phone }} The customer’s phone number
{{ event.customer_locale }}, {{ event.customer_country }}, {{ event.customer_country_name }} The customer’s locale code, country code, and country name
{{ event.is_reminder }}, {{ event.template_position }} Whether it’s a reminder, and its position in the sequence
{{ event.sms_message_id }} STOQ’s ID for this SMS message

In your flow’s Email action, use Klaviyo’s preview or send yourself a test to confirm each variable renders with real data instead of showing as literal text. If a variable prints as {{ event.property_name }} instead of a value, double check the property name matches one of the tables above exactly.

Why is a variable showing up blank in my email?

The property may be empty for that event, for example customer_locale when a customer’s language wasn’t captured at signup, or you may have misspelled the property name. Compare it against the tables above.

Can I use these variables in the subject line and preview text too?

Yes. Klaviyo variables work the same way in the subject line, preview text, and body of the email.

Do these variables work for SMS through Klaviyo too?

Not all of them. SMS through Klaviyo uses its own events with a different set of properties. See SMS variables. These are email only: product_tags, checkout_link, product_page_link, unsubscribe_link, shop_logo_url, customer_email, and email_message_id. SMS uses purchase_link for the buy link.

Are these the same variables available in STOQ's built-in email editor?

No. STOQ’s built-in editor has its own variable set, covered in Customize the back in stock email notification. These are the event properties available once you’re sending through Klaviyo instead.

Was this page helpful?

Still stuck? Ask Quinn or chat with support