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.
Before you begin
Section titled “Before you begin”| 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 action | Open the flow’s Email action in your Klaviyo dashboard to edit its template. |
Insert a variable
Section titled “Insert a variable”-
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.
-
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.
Product variables
Section titled “Product variables”| 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 |
Link variables
Section titled “Link variables”| 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 |
Shop variables
Section titled “Shop variables”| Variable | What it is |
|---|---|
{{ event.shop_name }} |
Your store’s name |
{{ event.shop_logo_url }} |
Your store’s logo image |
{{ event.shop_domain }} |
Your store’s myshopify domain |
Customer variables
Section titled “Customer variables”| 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 customer’s two-letter country code |
{{ event.customer_country_name }} |
The customer’s country, spelled out |
Notification variables
Section titled “Notification variables”| 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 |
Branch your flow by product tag
Section titled “Branch your flow by product tag”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.
-
Add a Trigger Split to the flow
In your flow, drag a Trigger Split in after the trigger, before the email action.
-
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 examplepreorder. Tags match exactly as they are written in Shopify, including capitalization. -
Add an email to each branch
Put the tag-specific email on the Yes branch and the standard email on the No branch.
Check your setup
Section titled “Check your setup”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?
Yes. The same event properties are available whether the flow’s action sends email or SMS.
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.
Related guides
Section titled “Related guides”Thanks for letting us know.
Still stuck? Ask Quinn or chat with support