Articles on: Integrations

How to Customize Email Templates in Klaviyo

When you use Klaviyo as your email provider in STOQ, you customize email templates in Klaviyo using Klaviyo's built-in email editor. STOQ sends product details, customer data, and links to Klaviyo each time a notification fires. You insert these as dynamic variables in your template to create personalized emails.


Overview


STOQ triggers metrics in Klaviyo when a product comes back in stock or a customer places a preorder. Each metric carries event data you can reference in your Klaviyo email template. You control the layout, styling, subject line, and content entirely in Klaviyo's editor.


Prerequisites


  • A paid STOQ plan.
  • A Klaviyo account with access to flows and email templates.
  • Klaviyo connected in STOQ. Go to Back in stock > Notifications > Customize > Email > Send emails through and select Klaviyo.
  • A Klaviyo flow created and verified in STOQ.


Open Your Flow Template


  1. Log in to Klaviyo and go to Flows.
  2. Open the flow triggered by the relevant STOQ metric (e.g., Back in stock alert (STOQ) or Preorder confirmed (STOQ)).
  3. Click the Email action, then click Edit Email to open the template designer.



Tip: If you used STOQ's automatic setup, your flows are already created. Find them in Klaviyo under Flows.


Customize the Subject Line


  1. Click the Subject field at the top of the email editor.
  2. Insert dynamic variables using the format {{ event.variable_name }}.
  3. Enter Preview text below the subject line.


Example subject lines:


  • {{event.product_title}} is back in stock!`
  • Your preorder for {{event.product_title}} is confirmed



Design the Email Body


Use Klaviyo's drag-and-drop editor to build your email. Insert STOQ variables to display dynamic content.


  • Product image: Add an Image block and set the source to {{event.image_url}}.
  • Product details: Add a Text block with variables like {{ event.product.title }}, {{ event.product.price }}, and {{ event.product.variant_title }}.
  • CTA button: Add a Button block and set the URL to {{event.checkout_link}} (direct checkout) or {{event.product_page_link}} (product page).
  • Unsubscribe link: Add a text link at the bottom with the URL set to {{event.unsubscribe_link}}.



Note: STOQ's unsubscribe link only removes the customer from STOQ notifications, not from your Klaviyo list.


Available Variables


Here's our detailed guide on Customize your Klaviyo back in stock emails with variables


Here's our detailed guide on How to customize Klaviyo preorder notifications using variables


Test Your Template


  1. In STOQ, go to Back in stock > Notifications > Customize > Email > Klaviyo settings.
  2. Click Send test event to trigger a test event in Klaviyo.
  3. In Klaviyo, open the email editor and click Preview & Test to see the template rendered with real data.
  4. Send a test email to yourself to verify the final result.



Known Limitations


  • All template design happens in Klaviyo. STOQ's built-in email editor does not apply when Klaviyo is selected.
  • Product titles are sent in your store's default language. Handle translations in Klaviyo if needed.
  • Back in stock and preorder flows use different variables. Make sure you use the correct set for your flow type.
  • Paid STOQ plan required.


Troubleshooting


Symptom

Likely Cause

Fix

Variables show as blank

Incorrect variable path

Use {{event.product_title}}, not product.title. Send a test event to verify

Product image missing

Product has no image in Shopify

Upload an image to the product in Shopify

Checkout link not working

Variable not inserted correctly

Use {{event.product_title}} as the button URL

Email not triggered

Flow is in Draft mode

Set the flow to Live in Klaviyo

Test event not appearing

Klaviyo app not connected

Verify connection in Back in stock > Notifications > Customize > Email > Klaviyo


FAQs


Q: Where do I find the list of available variables in STOQ?

A: In the Klaviyo email settings section within STOQ, click the available template variables link under the flow setup instructions. Go to Back in stock > Notifications > Customize > Email > Klaviyo.


Q: Can I use the same template for back in stock and reminder emails?

A: The alerts and reminders use separate flows triggered by different metrics. However, the event data structure is the same, so you can duplicate your template design across both flows.


Q: Can I use conditional logic in my template?

A: Yes. Klaviyo supports template language. For example, use {% if event.notification.is_reminder %} to show different content for reminder emails, or {% if event.customer.locale == "fr" %} for language-based content.


Q: How do I loop through multiple products in a preorder email?

A: Use Klaviyo's template language: {% for product in event.products %}{{ product.title }}{% endfor %}. This lets you list each product in the preorder.


Q: Do I need to update my template when STOQ adds new variables?

A: No. New variables are added to the event payload automatically. Your existing template continues to work. You can optionally update it to use new variables.

Updated on: 29/04/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!