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
| Field | Description |
|---|---|
| Name | Internal label — not shown to customers (max 50 characters) |
| Subject | Email subject line — supports Twig variables (max 50 characters) |
| Content | Full email body — Twig template with access to all relevant variables |
| Override handle | When set, this template replaces the built-in email for that handle (e.g. new-order) |
| Site | Which site this template applies to in a multi-site setup |
| Enabled | Active / inactive toggle |
| Valid from / Valid to | Date window — leave blank for always active |
| Custom CSS | Per-template CSS injected into the email <style> block |
| Style override | Selects an alternative global email style/theme for this template |
| Header HTML | Replaces the global email header for this template only |
| Footer HTML | Replaces the global email footer for this template only |
| Variables | JSON object of custom variables accessible in the template body |
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.
- Orders
- Customer Accounts
- Marketing
- Security
| Handle | When it sends |
|---|---|
new-order | Order confirmation sent to customer after successful checkout |
paid-order | Payment confirmed notification |
payment-failed-order | Payment failure notification |
completed-order | Order completion / fulfilment notification |
update-order-status | Order status change notification |
order-invoice | Order invoice email |
| Handle | When it sends |
|---|---|
new-account | Welcome email after account registration |
new-account-approval-needed | Notification to admin when an account needs approval |
customer-approved | Notification to customer when their account is approved |
customer-rejected | Notification to customer when their account is rejected |
reset-password-request | Password reset request with link |
reset-password | Password reset confirmation |
| Handle | When it sends |
|---|---|
abandoned-cart-reminder | Abandoned cart recovery email — triggered by Flow Manager |
gift-card-codes-generated | Gift card delivery email with code and PDF attachment |
gift-card-code-extend-request | Gift card extension request notification |
watchdog-notification | Back-in-stock / price-drop alert sent by Watchdog |
share-cart-notification | Notification when a Shared Cart link is created |
share-wishlist-notification | Notification when a wishlist is shared publicly |
| Handle | When it sends |
|---|---|
otp-code | One-time password / two-factor authentication code at checkout |
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:
| Variable | Description |
|---|---|
{{ name }} | Customer's display name |
{{ storeEmail }} | Store's support email address |
{{ storeName }} | Store name from settings |
Order templates (new-order, paid-order, etc.)
| Variable | Description |
|---|---|
{{ 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)
| Variable | Description |
|---|---|
{{ 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)
| Variable | Description |
|---|---|
{{ 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:
- Create the template in
yStore → Marketing → Email Templates. - In your flow, add a Send Email Template action.
- Select the template by name from the dropdown.
- Flow variables are automatically merged with the template variables at send time.
See Flow Manager for flow building details.
Creating a template
- Go to
yStore → Marketing → Email Templates. - Click New Email Template.
- Enter a name (internal) and subject line (customer-facing, supports Twig).
- Write the content body using Twig — use the variable reference above for available data.
- To replace a system email, enter the matching override handle.
- Set the site if running a multi-site store.
- Optionally set a date window for seasonal templates.
- Add custom CSS, header HTML, or footer HTML if deviating from the global layout.
- Enable and save.
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:
| Template | Override handle | Valid from | Valid to |
|---|---|---|---|
| Default order confirmation | new-order | — | — |
| Black Friday order confirmation | new-order | 2026-11-28 | 2026-12-01 |
| Christmas order confirmation | new-order | 2026-12-20 | 2026-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-ordertemplate for siteen— English designnew-ordertemplate for sitesk— Slovak design with different branding
yStore selects the template matching the order's site ID at send time.