Notification Placeholders
A placeholder is a dynamic token inside a notification template that gets replaced with real values at send time. Placeholders let one template serve every customer without hand-editing copy.
This page covers the available tokens, how to add them to a template, fallback values, localization, and how to test a template before it goes live.
When to Use
- Personalize emails, SMS, and push messages with customer name, plan, or amount.
- Inject subscription and order details into operational notifications.
- Localize messages by combining placeholders with per-locale templates.
- Build operator alerts that include diagnostic context (event id, customer id, error code).
Placeholder Syntax
Placeholders use double curly braces. The path is a dotted accessor into the template's data context.
Hi {{customer.firstName}},
Your subscription to {{bundle.name}} renewed on
{{subscription.renewedAt | date: "long"}} for
{{order.totalAmount | money}}.
A pipe (|) applies a filter (date, money, upper, lower, default).
Available Tokens
The data context depends on which event triggered the notification. Common groups:
customer
| Token | Description |
|---|---|
customer.id | Unique customer identifier. |
customer.firstName | First name. |
customer.lastName | Last name. |
customer.email | Email address. |
customer.locale | BCP-47 locale (for example en-US, de-DE). |
customer.membershipLevel | Membership tier (Bronze, Silver, Gold, etc.). |
subscription
| Token | Description |
|---|---|
subscription.id | Subscription identifier. |
subscription.bundleName | Display name of the active bundle. |
subscription.state | Lifecycle state (active, paused, cancelled, ...). |
subscription.renewedAt | Last renewal timestamp. |
subscription.nextRenewalAt | Next scheduled renewal timestamp. |
subscription.cancelledAt | Cancellation timestamp (if applicable). |
bundle
| Token | Description |
|---|---|
bundle.name | Bundle display name. |
bundle.description | Bundle description. |
bundle.billingPeriod | monthly, annual, etc. |
order / payment
| Token | Description |
|---|---|
order.id | Order identifier. |
order.totalAmount | Total amount including tax. |
order.currency | ISO-4217 currency code. |
payment.method | Payment method label (for example Visa •••• 4242). |
payment.failureReason | Provider failure reason on a failed payment. |
tenant
| Token | Description |
|---|---|
tenant.name | Tenant display name. |
tenant.supportEmail | Tenant support contact. |
tenant.supportUrl | Tenant support URL. |
Filters
| Filter | Example | Output |
|---|---|---|
date: "short" | {{subscription.renewedAt | date: "short"}} | 5/26/26 |
date: "long" | {{subscription.renewedAt | date: "long"}} | May 26, 2026 |
money | {{order.totalAmount | money}} | $19.99 |
upper | {{customer.firstName | upper}} | ALICE |
lower | {{customer.email | lower}} | alice@example.com |
default | {{customer.firstName | default: "there"}} | there |
Use default for any field that may legitimately be missing (no first name on record, anonymous customer, etc.).
Add a Placeholder to a Template
- Sign in to the portal.
- Open Settings → Notifications → Templates.
- Pick the template and the channel (email, SMS, push, in-app).
- Click the Insert Placeholder button in the editor.
- Pick a token from the dropdown. The editor inserts the correct syntax.
- Add a
defaultfilter for any optional field. - Click Save Draft.
Localize a Template
Templates are localized per locale. Each locale has its own subject and body but shares the same placeholder set.
- Open the template.
- Pick a locale from the Locales dropdown (or click Add Locale).
- Translate the copy. Keep placeholder names unchanged - only translate the surrounding text.
- Save the locale variant.
At send time Azotte picks the locale matching customer.locale and falls back to the tenant default if no match is found.
Test a Template
- Click Send Test in the template editor.
- Pick a target customer record (or enter a test email/phone).
- Azotte renders the template with that customer's real data and delivers the message.
- Verify every placeholder resolved correctly. Empty values rendered as
{{...}}indicate a missing field or wrong token name.
For automated tests, use the preview API:
curl -X POST https://api.azotte.com/v1/notifications/templates/<template-id>/preview \
-H "x-tn: <your-tenant-id>" \
-H "Authorization: Bearer <api-key>" \
-H "Content-Type: application/json" \
-d '{ "customerId": "cust_01HX...", "locale": "en-US" }'
The response contains the rendered subject and body.
Common Pitfalls
- Typos in the token path render literally.
{{custmoer.firstName}}shows up in the email as-is. - Missing optional fields render as empty strings unless a
defaultfilter is applied. - Currency formatting depends on
order.currencyplus the customer locale. Do not hard-code currency symbols inside the template. - HTML-unsafe values are auto-escaped in email body. Wrap a placeholder in
{{value | raw}}only when you control the source and need to inject HTML. - Don't put secrets, API keys, or internal IDs in customer-facing templates.
Related
- Webhooks - events that drive notification sending.
- Terminology -
Notification,Notification Template,Placeholder,Localizationdefinitions.