Syntax
We use a Jinja-like syntax (safe, sandboxed). Variables {{ name }}, conditionals {% if ... %}, loops {% for x in list %}, filters {{ total|currency('EUR') }}, {{ date|date('Y-m-d') }}.
Centralise HTML, subject and variables in versioned templates. Your code only sends the variables.
We use a Jinja-like syntax (safe, sandboxed). Variables {{ name }}, conditionals {% if ... %}, loops {% for x in list %}, filters {{ total|currency('EUR') }}, {{ date|date('Y-m-d') }}.
// Template "order_confirmation"
Subject: Order #{{ order.number }} confirmed
HTML:
Hi {{ customer.name }},
Your order #{{ order.number }} is confirmed.
Total: {{ order.total|currency('EUR') }}
Call with: POST /v1/messages + template_id, template_vars.
Every template has a current version (the one in production) and historical versions. For A/B tests you activate two variants (A and B) with a percentage split. Delivery, open and click metrics are tracked separately per variant in the panel.