How to Customize your Klaviyo Preorder notifications with Variables

When you use Klaviyo as your email or SMS provider in STOQ, preorder notifications are sent to Klaviyo as events. Each event carries a set of variables (also called properties) that you can reference inside your Klaviyo email and SMS templates to personalize messages. STOQ sends three types of preorder events to Klaviyo: Preorder confirmed , Preorder shipping update, Preorder payment failed. Each event includes order details, customer information, product data, shipping timelines, and actionable links. This guide lists every variable STOQ sends and shows how to use them in your Klaviyo templates.


Why Customize Preorder Notifications with Variables


Using STOQ's event variables in your Klaviyo templates gives you full control over what customers see.


  • Personalize every message. Address customers by name, reference their specific order number, and show the exact products they preordered.
  • Display shipping timelines. Include per-product shipping estimates so customers know when to expect their items without contacting support.
  • Handle multiple notification types. Use email type flags (shipping_update, payment_collection) and conditional logic to build a single Klaviyo template that adapts its content for confirmations, shipping updates, and payment failure alerts.
  • Show product images and details. Loop through the products array to display product titles, variant names, images, and selling plan descriptions in a branded layout.
  • Match your brand. Because you control the Klaviyo template HTML and CSS, you can style preorder notifications to match your store's look and feel while pulling dynamic data from STOQ.
  • **Reduce support tickets. **When customers receive detailed, accurate preorder information automatically, they have fewer reasons to reach out for order status.



Why You Might Not Need Custom Variables


In some cases, STOQ's default preorder templates may be sufficient.


  • Using STOQ as the email provider. If Klaviyo is not your email provider, STOQ sends preorder emails directly using its own templates. Variables are handled automatically through Liquid templating.
  • **Simple notification needs. **If you only need basic order confirmation messages without advanced conditional logic or custom layouts, the default STOQ preorder email template may cover your needs.
  • **No Klaviyo account. **You need an active Klaviyo account connected to STOQ to use these variables. Without Klaviyo, this guide does not apply.


Prerequisites


Before customizing Klaviyo preorder notifications with variables, confirm the following.


  • The STOQ app is installed and active on your Shopify store.
  • Klaviyo is connected to STOQ as your email provider, SMS provider, or both.
  • Klaviyo integration is set up and verified in STOQ (the setup flow has been completed from the Notifications tab).
  • You have at least one active preorder offer with products.
  • You have access to your Klaviyo account to edit Flow templates.



How STOQ Sends Preorder Events to Klaviyo


STOQ creates three Klaviyo metrics (event types) for preorders. Each metric triggers a separate Klaviyo Flow.


Klaviyo Metric Name

When It Fires

Use Case

Preorder confirmed (STOQ)

Customer places a preorder

Order confirmation email/SMS

Preorder shipping update (STOQ)

You send a shipping update from the STOQ dashboard

Notify customers of shipping timeline changes

Preorder payment failed (STOQ)

Final payment collection fails

Ask customers to update payment method


Each event includes the full set of variables listed below. Your Klaviyo Flow template can reference any of these variables using {{ event.order_name }} syntax.



Email Template Variables


When STOQ sends a preorder email event to Klaviyo, the following variables are available in your Klaviyo 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

{{ event.customer_country }}

The customer's country code (e.g., "US")

{{ event.customer_country_name }}

The customer's full country name (e.g., "United States of America")


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 pre-resolved content from STOQ's notification settings. The values change depending on the type of notification being sent.


For a preorder confirmation, the subject, header, and description contain the default preorder template text. For a shipping update or payment collection failed notification, these variables contain the corresponding text (e.g., "Shipping update: ..." or "Action required: ...").


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 Flags


Use these for conditional logic in your templates to display different content depending on the notification type.


Variable

Description

{{ event.email_type }}

The type of preorder email: "default", "shipping_update", "payment_collection_failed", or "payment_collection_url"

{{ event.shipping_update }}

Boolean -- true if this is a shipping update email

{{ event.payment_collection }}

Boolean -- true if this is a payment collection failed email



SMS Template Variables


When STOQ sends a preorder SMS event to Klaviyo, the following variables are available in your Klaviyo 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


How to Edit Your Klaviyo Preorder Flow Template


Follow these steps to access and edit your preorder notification templates in Klaviyo.


  1. Log in to your Klaviyo account.
  2. Navigate to Flows in the left sidebar.
  3. Find the Flow named STOQ - Preorder confirmed (STOQ) (or the shipping update / payment failed Flow).
  4. Click on the email or SMS action in the Flow.
  5. Click Edit Template (for email) or Edit SMS (for SMS).
  6. Use the variables listed above with Klaviyo's {{ event.variable_name }} syntax to reference STOQ event data.
  7. Click Save when done.
  8. Make sure the Flow status is Live for notifications to be sent.


Tip : After editing your template, use STOQ's Send dummy events feature from the Klaviyo integration page to send test data to Klaviyo and preview how your template renders with sample values.



Template 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 using {% for product in event.products %}.
  • Leverage email type flags ({{ event.shipping_update }}, {{ event.payment_collection }}) to build a single adaptive template with conditional logic rather than creating separate templates.
  • Always include the order link ({{ event.order_link }}) so customers can view their order status directly.
  • Use {{ event.email_subject }}, {{ event.email_header }}, and {{ event.email_description }} as fallback content. These variables are pre-resolved by STOQ and change based on the notification type.
  • Check product.show_shipping before displaying product.shipping_text to avoid showing empty shipping information.


For SMS Templates


  • For multiple products, use {{ event.first_product }} and {{ event.other_count }} for brevity instead of listing all products.
  • Always include the shipping timeline when available using {{ event.shipping_timeline }}.
  • Use conditional logic to handle single vs. multiple product orders ({{ event.products_count }}).
  • Keep SMS messages concise. SMS has character limits and each segment incurs charges.


Known Limitations


Keep these points in mind when using STOQ variables in Klaviyo preorder templates.


  • STOQ sends preorder events to Klaviyo only when Klaviyo is configured as the email or SMS provider. If you use STOQ's built-in email provider, variables are handled through Liquid templates in STOQ, not Klaviyo.
  • The products array is only available in email templates. In SMS templates, products are sent as a comma-separated string ({{ event.products }}), not as an iterable array.
  • Shipping text variables (product.shipping_text, {{ event.shipping_timeline }}) depend on your selling plan configuration. If shipping display is disabled in the selling plan or no shipping text is configured, these values may be empty.
  • Klaviyo Flows must be in Live status for notifications to be delivered. Draft or paused Flows will not send.
  • STOQ must verify both the Klaviyo setup and the specific Flow before events are sent. If verification fails, notifications are blocked and an error is logged.
  • SMS variables are a subset of email variables. Not all email variables (e.g., order_link, cancel_link, unsubscribe_link) are available in SMS events.
  • The email_type flag values are strings. Use exact string matching in Klaviyo conditions (e.g., event.email_type == "shipping_update").


Troubleshooting


Problem

Solution

Variables show as blank in Klaviyo preview

Use STOQ's Send dummy events button on the Klaviyo integration page to send sample data. Klaviyo previews require at least one event to populate variables.

Preorder Flow not triggering

Confirm the Flow is in Live status. Check that STOQ shows the Flow as verified (green checkmark) on the Notifications tab.

Products array is empty

Ensure the preorder has valid product variants with matching Shopify IDs. Check that products exist in your store and are not deleted.

Shipping text not appearing

Verify that Show shipping is enabled in the selling plan settings. Check that shipping text is configured for the selling plan or the specific product variant.

Email type flags not working

Ensure you compare as strings. Use {% if event.shipping_update %} for boolean checks or {% if event.email_type == "shipping_update" %} for string comparison.

Klaviyo SMS not receiving events

Confirm Klaviyo SMS setup is verified in STOQ. Check that the customer has a valid phone number. The SMS Flow must also be verified and Live.

"Klaviyo preorder flow not verified" error

Go to the Notifications tab in STOQ, click Customize email for the preorder notification, and complete the Klaviyo Flow verification step.


FAQs


Q : What Klaviyo metrics does STOQ create for preorders?

A : STOQ creates three preorder metrics: Preorder confirmed (STOQ), Preorder shipping update (STOQ), and Preorder payment failed (STOQ). Each metric triggers a separate Klaviyo Flow. For SMS, STOQ creates Preorder SMS confirmed (STOQ).


Q : Can I use the same Klaviyo template for all three preorder notification types?

A : Yes. Use the email type flag variables ({{ event.shipping_update }}, {{ event.payment_collection }}) with conditional logic ({% if event.shipping_update %}) to display different content in the same template. However, each notification type triggers a different Klaviyo Flow, so you would need to apply the same template to each Flow.


Q : How do I loop through products in a Klaviyo email template?

A : Use Klaviyo's {% for %} syntax: {% for product in event.products %}. Inside the loop, reference individual product variables like {{ product.title }}, {{ product.image_url }}, and {{ product.shipping_text }}. This only works in email templates; SMS templates receive products as a comma-separated string.


Q : Are preorder variables different from back-in-stock variables?

A : Yes. Preorder variables include order-level data (order ID, order name), a products array with selling plan details, shipping timelines, and email type flags. Back-in-stock variables focus on a single product variant with fields like price, vendor, checkout link, and product page link.


Q : How do I test my Klaviyo template with real-looking data?

A : Use the Send dummy events button on the STOQ Klaviyo integration page. This sends sample event data to Klaviyo with realistic placeholder values (sample product names, order numbers, etc.) so you can preview your template rendering in Klaviyo.


Q : Do SMS templates support the products array loop?

A : No. In SMS events, {{ event.products }} is a comma-separated string of product titles, not an iterable array. Use {{ event.first_product }} and {{ event.other_count }} to handle multi-product preorders concisely in SMS.


Q : What happens if I change my email provider from Klaviyo to STOQ?

A : If you switch from Klaviyo to STOQ as your email provider, preorder events are no longer sent to Klaviyo. STOQ will use its built-in templates with Liquid variables instead. Your Klaviyo Flows will stop receiving events but remain in your Klaviyo account.


Q : Can I use Klaviyo variables in STOQ's built-in email template editor?

**A : **No. Klaviyo variables ({{ event.variable_name }}) only work inside Klaviyo Flow templates. STOQ's built-in email editor uses Liquid variables with a different syntax. If you want to use Klaviyo-style variables, set Klaviyo as your email provider in STOQ.




Updated on: 05/03/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!