SMS Template
An SMS Template defines the text message body dispatched for automated SMS alerts (such as streak status updates, challenge deadlines, or milestone completion rewards). When attached to an active Notification rule, the platform resolves dynamic variables and delivers text messages via integrated provider gateways like AWS SMS.
The message field is localisable. Pass a languageCode query parameter when managing templates to support internationalised SMS content.
How it works
- Create an SMS template — define a unique name, description, and assign a
sampleEventCodefor mock payload context. - Write the SMS copy — populate the
messagefield with concise, engaging text copy. - Insert dynamic variables — embed variable tokens in double curly braces
{{ }}(e.g.{{$account_user.firstName}},{{$helpers.periodText}}). - Attach to notification rules — map the template to an active Notification rule with
templateType: sms_templateto automate dispatch.
Fields
Basic information
| Field | Type | Required | Max length | Description |
|---|---|---|---|---|
name | string | ✅ | 256 | Unique name of the SMS template |
description | string | ❌ | 1 024 | A brief description of the SMS template |
sampleEventCode | enum | ✅ | 64 | Sample event code used to load mock payload data |
status | enum | ✅ | — | draft · live · paused |
Content & display
| Field | Type | Required | Description |
|---|---|---|---|
message | text | ❌ | The body text of the SMS message. Supports variables and localisation. |
Event codes
The sampleEventCode maps mock event structure for designing templates across:
- Streak Events:
streak_progress_broken·streak_progress_to_be_broken·streak_progress_completed·streak_progress_milestone_completed·streak_progress_non_milestone_completed·streak_progress_in_progress - Challenge Events:
challenge_progress_failed·challenge_progress_to_be_failed·challenge_progress_completed·challenge_progress_milestone_completed·challenge_progress_in_progress - Mission Events:
mission_progress_failed·mission_progress_to_be_failed·mission_progress_completed·mission_progress_milestone_completed·mission_progress_in_progress - Reward Unlocked Events:
streak_reward_unlocked_on_milestone_completion·challenge_reward_unlocked_on_milestone_completion·mission_reward_unlocked_on_completion·mission_reward_unlocked_on_milestone_completion
Template variables
The template engine replaces double curly braces {{ }} with runtime event context:
| Variable Namespace | Description | Example |
|---|---|---|
{{$account_user.*}} | Member variables | {{$account_user.firstName}} |
{{$event_log.payload.*}} | Context event log payload | {{$event_log.payload.challengeProgress.completionTargetValue}} |
{{$helpers.*}} | Formatted helper variables | {{$helpers.remainingValue}}, {{$helpers.formattedChallengeToBeFailedAt}} |
Real-world examples
💬 Transactional SMS — Challenge Completed Alert
An SMS template congratulating a member on finishing a challenge:
Code
Access & permissions
| Caller | Allowed operations | Notes |
|---|---|---|
| Admin | CREATE · GET · LIST · UPDATE · DELETE | Full management access |
| End user | (none) | No access |
| Guest user | (none) | No access |
Related resources
| Resource | Description |
|---|---|
| Notification | Active notification rules linking events to SMS templates |
| Notification Log | Delivery audit trail for dispatched SMS messages |
| Member | SMS recipient record |
API reference
See the API Reference for full schemas and interactive examples for:
GET /schema/sms_template/record— list SMS templatesPOST /schema/sms_template/record— create an SMS templateGET /schema/sms_template/record/{id}— get an SMS template by IDPATCH /schema/sms_template/record/{id}— update an SMS templateDELETE /schema/sms_template/record/{id}— delete an SMS template