Skip to main content

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

TokenDescription
customer.idUnique customer identifier.
customer.firstNameFirst name.
customer.lastNameLast name.
customer.emailEmail address.
customer.localeBCP-47 locale (for example en-US, de-DE).
customer.membershipLevelMembership tier (Bronze, Silver, Gold, etc.).

subscription

TokenDescription
subscription.idSubscription identifier.
subscription.bundleNameDisplay name of the active bundle.
subscription.stateLifecycle state (active, paused, cancelled, ...).
subscription.renewedAtLast renewal timestamp.
subscription.nextRenewalAtNext scheduled renewal timestamp.
subscription.cancelledAtCancellation timestamp (if applicable).

bundle

TokenDescription
bundle.nameBundle display name.
bundle.descriptionBundle description.
bundle.billingPeriodmonthly, annual, etc.

order / payment

TokenDescription
order.idOrder identifier.
order.totalAmountTotal amount including tax.
order.currencyISO-4217 currency code.
payment.methodPayment method label (for example Visa •••• 4242).
payment.failureReasonProvider failure reason on a failed payment.

tenant

TokenDescription
tenant.nameTenant display name.
tenant.supportEmailTenant support contact.
tenant.supportUrlTenant support URL.

Filters

FilterExampleOutput
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

  1. Sign in to the portal.
  2. Open Settings → Notifications → Templates.
  3. Pick the template and the channel (email, SMS, push, in-app).
  4. Click the Insert Placeholder button in the editor.
  5. Pick a token from the dropdown. The editor inserts the correct syntax.
  6. Add a default filter for any optional field.
  7. Click Save Draft.

Insert placeholder in template editor

Localize a Template

Templates are localized per locale. Each locale has its own subject and body but shares the same placeholder set.

  1. Open the template.
  2. Pick a locale from the Locales dropdown (or click Add Locale).
  3. Translate the copy. Keep placeholder names unchanged - only translate the surrounding text.
  4. 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

  1. Click Send Test in the template editor.
  2. Pick a target customer record (or enter a test email/phone).
  3. Azotte renders the template with that customer's real data and delivers the message.
  4. 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 default filter is applied.
  • Currency formatting depends on order.currency plus 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.
  • Webhooks - events that drive notification sending.
  • Terminology - Notification, Notification Template, Placeholder, Localization definitions.