Skip to main content
Version: 2.0.0

Email Templates

Navigate to yStore → Marketing → Email Templates.

Email Templates is yStore's central hub for managing all customer-facing emails. You can create fully custom templates, override the built-in system emails (order confirmation, account approval, etc.), and reference templates from automation flows so your designs stay consistent and are managed in one place.


What email templates do

Every email yStore sends — order confirmations, abandoned cart reminders, gift card delivery, watchdog alerts — is backed by a template. By default, yStore uses its own built-in templates. The Email Templates system lets you:

  • Override any built-in email with your own design — same data, your look
  • Create marketing templates referenced by Flow Manager actions
  • Scope templates by site in multi-site stores
  • Schedule templates with a date window so seasonal designs activate and deactivate automatically
  • Customise CSS, header, and footer per template without touching the global email layout

Template fields

FieldDescription
NameInternal label — not shown to customers (max 50 characters)
SubjectEmail subject line — supports Twig variables (max 50 characters)
ContentFull email body — Twig template with access to all relevant variables
Override handleWhen set, this template replaces the built-in email for that handle (e.g. new-order)
SiteWhich site this template applies to in a multi-site setup
EnabledActive / inactive toggle
Valid from / Valid toDate window — leave blank for always active
Custom CSSPer-template CSS injected into the email <style> block
Style overrideSelects an alternative global email style/theme for this template
Header HTMLReplaces the global email header for this template only
Footer HTMLReplaces the global email footer for this template only
VariablesJSON object of custom variables accessible in the template body
Subject line variables

The subject field supports Twig. For example: Your order {{ incrementId }} is confirmed or {{ name }}, you left something in your cart.


Built-in email types you can override

yStore ships default templates for all system emails. Set the Override handle on your custom template to replace the default.

HandleWhen it sends
new-orderOrder confirmation sent to customer after successful checkout
paid-orderPayment confirmed notification
payment-failed-orderPayment failure notification
completed-orderOrder completion / fulfilment notification
update-order-statusOrder status change notification
order-invoiceOrder invoice email
Only one active override per handle per site

If multiple templates have the same override handle and site, yStore uses the one with the most recent dateUpdated. To safely test a new design, disable the existing override before activating the new one.


Template variables

The variables available in the template body depend on which email type it is used for. All templates have access to:

VariableDescription
{{ name }}Customer's display name
{{ storeEmail }}Store's support email address
{{ storeName }}Store name from settings

Order templates (new-order, paid-order, etc.)

VariableDescription
{{ incrementId }}Order number shown to customers
{{ createdAt }}Order date
{{ storeCurrency }}Currency code
{{ emailCustomerNote }}Customer note from checkout
{{ formattedBillingAddress }}Pre-formatted billing address HTML
{{ formattedShippingAddress }}Pre-formatted shipping address HTML
{{ paymentMethod }}Payment method name
{{ paymentInstructions }}Payment instructions (e.g. for bank transfer)
{{ shippingMethod }}Shipping carrier name
{{ shippingExtra }}Extra shipping info (e.g. pickup point details)
{{ orderItems }}Array of line items — name, SKU, qty, unit price, row total
{{ totals }}Array of order totals — subtotal, shipping, taxes, discounts, grand total
{{ accountUrl }}Link to the customer's account page

Abandoned cart template (abandoned-cart-reminder)

VariableDescription
{{ email }}Customer's email address
{{ recoverLink }}URL that restores the customer's cart
{{ orderItems }}Cart line items
{{ totals }}Cart totals

Gift card template (gift-card-codes-generated)

VariableDescription
{{ code }}The generated gift card code
{{ amount }}Card value with currency
{{ purchaser }}Name of the person who bought the card
{{ recipient }}Name of the intended recipient
{{ expiresAt }}Expiry date, or null if no expiry

Using templates in flows

In the Flow Manager, use the Send Email Template action to send a template by name. This is the recommended approach for flow-triggered emails because:

  • The template is managed centrally — update it once, all flows reflect the change
  • Subject and content can reference flow variables (order, customer, coupon, etc.)
  • Templates can be scheduled with date windows for seasonal campaigns

To connect a template to a flow:

  1. Create the template in yStore → Marketing → Email Templates.
  2. In your flow, add a Send Email Template action.
  3. Select the template by name from the dropdown.
  4. Flow variables are automatically merged with the template variables at send time.

See Flow Manager for flow building details.


Creating a template

  1. Go to yStore → Marketing → Email Templates.
  2. Click New Email Template.
  3. Enter a name (internal) and subject line (customer-facing, supports Twig).
  4. Write the content body using Twig — use the variable reference above for available data.
  5. To replace a system email, enter the matching override handle.
  6. Set the site if running a multi-site store.
  7. Optionally set a date window for seasonal templates.
  8. Add custom CSS, header HTML, or footer HTML if deviating from the global layout.
  9. Enable and save.
Test before enabling the override

Before activating an override handle, send a test email using your staging store. Place a test order or trigger the flow action manually to verify the rendered output — especially check that all variables resolve correctly and no null values appear in the subject or body.


Scheduling seasonal templates

Use the Valid from / Valid to fields to automatically switch templates during campaigns without manual intervention:

TemplateOverride handleValid fromValid to
Default order confirmationnew-order
Black Friday order confirmationnew-order2026-11-282026-12-01
Christmas order confirmationnew-order2026-12-202026-12-26

During the date window, the seasonal template activates automatically. Outside the window, the default template applies. No manual toggling required.


Multi-site templates

Each template is scoped to a site. In a multi-site setup, you can have different designs per locale or region:

  • new-order template for site en — English design
  • new-order template for site sk — Slovak design with different branding

yStore selects the template matching the order's site ID at send time.