Skip to content

Templates

Templates define the content delivered to campaign recipients. They support Markdown formatting and variable interpolation for personalized messages.

  1. Navigate to TemplatesCreate Template
  2. Enter a template name
  3. Write your content using Markdown
  4. Define template variables if needed
  5. Save — this creates version 1
const response = await templateClient.createTemplate({
name: "security-update",
body: "# Security Update\n\nHi {{name}},\n\nPlease review the latest security changes...",
variables: [
{ name: "name", source: "AUDIENCE" },
],
});

Templates support standard Markdown syntax:

  • Headings#, ##, ###
  • Bold/Italic**bold**, *italic*
  • Lists — Ordered and unordered
  • Links[text](url)
  • Code — Inline and fenced code blocks

The Markdown is rendered to rich content for push notifications and the mobile inbox.

Variables use {{variable_name}} syntax and are replaced with actual values at render time.

SourceDescriptionExample
AUDIENCEPer-user values from the campaign audience{{name}}, {{department}}
CUSTOMStep-level values from the workflow definition{{deadline}}, {{link}}

Audience variables are provided per-user when creating a campaign:

audience: [
{
userId: "user-uuid",
variables: { name: "Alice", department: "Engineering" },
},
]

Custom variables are defined in the workflow step configuration and apply to all recipients in that step:

{
"type": "SEND_NOTIFICATION",
"config": {
"custom_variables": {
"deadline": "March 15, 2026",
"link": "https://internal.example.com/policy"
}
}
}

Templates use append-only versioning. Each update creates a new version while preserving all previous versions.

  1. Create a template → version 1
  2. Update the template → version 2 is created, version 1 is preserved
  3. Campaigns pin a specific version at creation time
  • Consistency — A running campaign always shows the same content, even if the template is edited
  • Audit trail — See exactly what was sent in historical campaigns
  • Safe iteration — Edit templates without affecting active campaigns
const response = await templateClient.updateTemplate({
id: "template-uuid",
body: "# Updated Security Policy\n\nHi {{name}},\n\n...",
});
// response.template.version === 2

Templates can be categorized by type for organization:

TypeUse Case
PUSHPush notification messages
REMINDERFollow-up reminders for unacknowledged deliveries
GENERALGeneral-purpose templates
  • Keep summaries short — Push notification banners show limited text
  • Use variables for personalization — Avoid generic “Dear User” messages
  • Test with preview — Verify variable interpolation before launching campaigns
  • Pin versions explicitly — Always specify the template version in campaign creation
  • Document variables — Name variables descriptively so campaign creators know what to provide