Customize your Klaviyo preorder notifications with variables
Customize your Klaviyo Preorder notifications with variables
When creating custom Klaviyo templates for Preorder notifications, STOQ provides rich event data that you can use to personalize and customize your messages. This guide covers all variables that STOQ sends to Klaviyo for use in your Preorder email and SMS templates.
Email template
When STOQ sends Preorder-related notifications to Klaviyo, these variables are available in your email templates:
Order details
Variable | Description |
---|---|
| The Shopify order ID |
| The order name (e.g., "#1001") |
Customer details
Variable | Description |
---|---|
| The customer's name |
| The customer's email address |
| The customer's locale/language preference |
Store information
Variable | Description |
---|---|
| Your store's display name |
| The URL of your store's logo |
Products array
The {{event.products}}
variable contains an array of all preordered products. You can loop through them using Klaviyo's template syntax:
{% for product in event.products %}
<div class="product">
<h3>{{product.title}}</h3>
<p>{{product.selling_plan_name}}</p>
{% if product.selling_plan_description %}
<p>{{product.selling_plan_description}}</p>
{% endif %}
{% if product.show_shipping and product.shipping_text %}
<p>Shipping: {{product.shipping_text}}</p>
{% endif %}
{% if product.image_url %}
<img src="{{product.image_url}}" alt="{{product.title}}">
{% endif %}
</div>
{% endfor %}
Each product in the array contains:
Product Variable | Description |
---|---|
| The complete product title including variant |
| The base product title |
| The variant title (e.g., "Medium / Blue") |
| The product image URL |
| The product handle/slug |
| The Shopify product ID |
| The Shopify variant ID |
| The name of the selling plan (e.g., "Pre-order - Ships in 2-3 weeks") |
| Description of the selling plan |
| The resolved shipping text (e.g., "Expected to ship by March 15, 2024") |
| Boolean indicating if shipping info should be displayed |
Links
Variable | Description |
---|---|
| Link to view the order details in the customer's account |
| Link to unsubscribe from preorder notifications |
| Link to cancel the preorder |
Email content
These variables contain information about the notification. For example, if a customer places an order, the subject, header and description here will be tailored to inform customers that they just placed a preorder.
If you send a "Shipping update" or "Payment collection failed" notification through STOQ's dashboard, these variables will contain information related to that - such as "Shipping update: ...." or "Action required: ....". Use the "Email type" variables to understand the type of notification being sent.
Variable | Description |
---|---|
| The resolved email subject line |
| The resolved email header text |
| The resolved email description text |
| The resolved button text |
Email type
Use these for conditional logic in your templates:
Variable | Description |
---|---|
| The type of preorder email ("default", "shipping_update", "payment_collection_failed") |
| Boolean indicating if this is a shipping update email |
| Boolean indicating if this is a payment collection failed email |
SMS template
When STOQ sends Preorder SMS events to Klaviyo, these variables are available in your SMS templates:
Order details
Variable | Description |
---|---|
| The Shopify order ID |
| The order name (e.g., "#1001") |
| The order number |
Store information
Variable | Description |
---|---|
| Your store's display name |
| Your Shopify store domain |
Customer details
Variable | Description |
---|---|
| The customer's name |
| The customer's phone number |
| The customer's locale/language preference |
Preorder-specific details
Variable | Description |
---|---|
| Comma-separated list of all preordered product titles |
| The title of the first preorder product in the order |
| Number of additional products beyond the first (as string) |
| Total number of products in the preorder (as string) |
| Expected shipping timeline text of the first preorder product |
Examples
Preorder confirmation email
<h1>Thank you for your preorder, {{event.customer_name}}!</h1>
<p>We've received your preorder {{event.order_name}} and will keep you updated on shipping.</p>
<div class="products">
{% for product in event.products %}
<div class="product">
{% if product.image_url %}
<img src="{{product.image_url}}" alt="{{product.title}}">
{% endif %}
<h3>{{product.title}}</h3>
<p>{{product.selling_plan_name}}</p>
{% if product.show_shipping and product.shipping_text %}
<p class="shipping-info">{{product.shipping_text}}</p>
{% endif %}
</div>
{% endfor %}
</div>
<a href="{{event.order_link}}" class="cta-button">View Order Details</a>
Shipping update email
{% if event.shipping_update %}
<h1>Shipping Update for Order {{event.order_name}}</h1>
<p>Hi {{event.customer_name}}, we have an update on your preorder shipping timeline.</p>
<div class="update-info">
<h2>{{event.email_header}}</h2>
<p>{{event.email_description}}</p>
</div>
{% else %}
<h1>{{event.email_header}}</h1>
<p>{{event.email_description}}</p>
{% endif %}
<div class="products">
{% for product in event.products %}
<div class="product">
<h3>{{product.title}}</h3>
{% if product.show_shipping and product.shipping_text %}
<p><strong>Expected shipping:</strong> {{product.shipping_text}}</p>
{% endif %}
</div>
{% endfor %}
</div>
<a href="{{event.order_link}}">{{event.email_button_text}}</a>
Payment collection failed email
{% if event.payment_collection %}
<h1>Action Required: Payment Issue with Order {{event.order_name}}</h1>
<p>Hi {{event.customer_name}}, we encountered an issue processing payment for your preorder.</p>
<div class="payment-issue">
<h2>{{event.email_header}}</h2>
<p>{{event.email_description}}</p>
</div>
<a href="{{event.order_link}}" class="cta-button urgent">{{event.email_button_text}}</a>
{% endif %}
Basic Preorder SMS
Thanks {{event.customer_name}}! Your preorder for {{event.products}} is confirmed.
{% if event.products_count == "1" %}
Expected shipping: {{event.shipping_timeline}}
{% else %}
{{event.products_count}} items total. Expected shipping: {{event.shipping_timeline}}
{% endif %}
Multi-product Preorder SMS
Hi {{event.customer_name}}! Preorder {{event.order_name}} confirmed:
{{event.first_product}}{% if event.other_count != "0" %} + {{event.other_count}} other item{% if event.other_count != "1" %}s{% endif %}{% endif %}
Est. shipping: {{event.shipping_timeline}}
Best practices
For email templates
- Use the products array to display all preordered items with images and details
- Leverage email type flags (
{{event.shipping_update}}
,{{event.payment_collection}}
) for conditional messaging
For SMS templates
- For multiple products, use
{{event.first_product}}
and{{event.other_count}}
for brevity - Always include shipping timeline when available using
{{event.shipping_timeline}}
- Use conditional logic to handle single vs. multiple product orders
By leveraging these STOQ-provided variables effectively, you can create dynamic, personalized Preorder notifications that keep customers informed and engaged throughout the preorder process.
Updated on: 15/09/2025
Thank you!