Push Notification Template
A Push Notification Template defines the content, messaging structure, and optional deep link for push notifications dispatched to your mobile or web app users. When bound to an active Notification rule, the platform dynamically resolves template variables and sends push alerts via integration providers such as Firebase Cloud Messaging (FCM).
The notificationTitle, notificationBody, and deepLink fields are localisable. Pass a languageCode query parameter when managing templates to support multi-language push notifications for international users.
How it works
- Create a push notification template — set a name, description, and select a
sampleEventCodeto preview runtime event payload structure. - Define title and body — craft the push notification header (
notificationTitle) and main message (notificationBody). - Set deep link — optionally provide a
deepLinkURL or app scheme (e.g.gamopanda://rewards/{{rewardId}}orhttps://myapp.com/challenges) to direct users to specific screens upon tapping the notification. - Use template variables — insert dynamic placeholders using double curly braces
{{ }}(e.g.{{$account_user.firstName}}or{{$helpers.periodText}}). - Attach to notification rules — link the template to a Notification rule with
templateType: push_notification_templateto automate dispatch.
Fields
Basic information
| Field | Type | Required | Max length | Description |
|---|---|---|---|---|
name | string | ✅ | 256 | Unique name of the push notification template |
description | string | ❌ | 1 024 | A brief description of the template purpose |
sampleEventCode | enum | ✅ | 64 | Sample event code used to load mock payload data during design |
status | enum | ✅ | — | draft · live · paused |
Content & display
| Field | Type | Required | Max length | Description |
|---|---|---|---|---|
notificationTitle | string | ❌ | 256 | Header/title of the push notification. Supports variables and localisation. |
notificationBody | text | ❌ | — | Main body content of the push notification. Supports variables and localisation. |
deepLink | string | ❌ | 256 | Target URL or app URI scheme triggered on click/tap. Supports variables and localisation. |
Event codes
The sampleEventCode field maps mock event structures 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.streakProgress.currentStreak}} |
{{$helpers.*}} | Formatted helper variables | {{$helpers.formattedStreakToBeBrokenAt}}, {{$helpers.remainingValue}} |
Real-world examples
📱 Mobile App — Streak Expiry Warning
A push notification alerting a user before their active streak resets:
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 templates |
| Notification Log | Delivery audit trail for push notifications |
| Member | Push recipient record |
API reference
See the API Reference for full schemas and examples:
GET /schema/push_notification_template/record— list push notification templatesPOST /schema/push_notification_template/record— create a push notification templateGET /schema/push_notification_template/record/{id}— get a push notification template by IDPATCH /schema/push_notification_template/record/{id}— update a push notification templateDELETE /schema/push_notification_template/record/{id}— delete a push notification template