Home
Klaviyo

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.

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

RequirementDetail
Alerts routed through KlaviyoThis only applies once you've selected Klaviyo as your sending platform. See Send back in stock alerts through Klaviyo.
A flow with an email actionOpen the flow's Email action in your Klaviyo dashboard to edit its template.

Insert a variable

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.

Product variables

VariableWhat 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.vendor }}The product's vendor
{{ event.product_type }}The product's type
{{ event.product_handle }}The product's URL handle
{{ 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.currency }}The shop's currency code, like USD
VariableWhat 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

VariableWhat 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

VariableWhat 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

VariableWhat 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
Note

Reminder notifications fire their own metric event, so is_reminder lets one shared template branch its wording for a reminder versus the first alert.

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.

FAQ

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.