Articles on: Preorders

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

{{event.order_id}}

The Shopify order ID

{{event.order_name}}

The order name (e.g., "#1001")


Customer details


Variable

Description

{{event.customer_name}}

The customer's name

{{event.customer_email}}

The customer's email address

{{event.customer_locale}}

The customer's locale/language preference


Store information


Variable

Description

{{event.shop_name}}

Your store's display name

{{event.shop_logo_url}}

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

product.title

The complete product title including variant

product.product_title

The base product title

product.variant_title

The variant title (e.g., "Medium / Blue")

product.image_url

The product image URL

product.product_handle

The product handle/slug

product.product_id

The Shopify product ID

product.variant_id

The Shopify variant ID

product.selling_plan_name

The name of the selling plan (e.g., "Pre-order - Ships in 2-3 weeks")

product.selling_plan_description

Description of the selling plan

product.shipping_text

The resolved shipping text (e.g., "Expected to ship by March 15, 2024")

product.show_shipping

Boolean indicating if shipping info should be displayed



Variable

Description

{{event.order_link}}

Link to view the order details in the customer's account

{{event.unsubscribe_link}}

Link to unsubscribe from preorder notifications

{{event.cancel_link}}

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

{{event.email_subject}}

The resolved email subject line

{{event.email_header}}

The resolved email header text

{{event.email_description}}

The resolved email description text

{{event.email_button_text}}

The resolved button text


Email type


Use these for conditional logic in your templates:


Variable

Description

{{event.email_type}}

The type of preorder email ("default", "shipping_update", "payment_collection_failed")

{{event.shipping_update}}

Boolean indicating if this is a shipping update email

{{event.payment_collection}}

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

{{event.order_id}}

The Shopify order ID

{{event.order_name}}

The order name (e.g., "#1001")

{{event.order_number}}

The order number


Store information


Variable

Description

{{event.shop_name}}

Your store's display name

{{event.shop_domain}}

Your Shopify store domain


Customer details


Variable

Description

{{event.customer_name}}

The customer's name

{{event.customer_phone}}

The customer's phone number

{{event.customer_locale}}

The customer's locale/language preference


Preorder-specific details


Variable

Description

{{event.products}}

Comma-separated list of all preordered product titles

{{event.first_product}}

The title of the first preorder product in the order

{{event.other_count}}

Number of additional products beyond the first (as string)

{{event.products_count}}

Total number of products in the preorder (as string)

{{event.shipping_timeline}}

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

Was this article helpful?

Share your feedback

Cancel

Thank you!