Getting Started
Email Notification
An Email Notification is a configuration rule that binds a system event trigger (like a completed challenge or streak about to break) to a specific Email Template. When the defined event occurs, the platform automatically resolves the associated template, merges recipient data, and sends the transactional email.
How it works
- Design a template — set up an Email Template containing the subject line, HTML copy, and brand styling.
- Create a notification rule — map a system event trigger (
eventCode) to your template (emailTemplateId). - Activate the rule — set the status to
live. The system will now listen for that event. - Trigger email — when a member triggers the target event (e.g. completes a milestone), the platform runs the notification rule, renders the template, and sends the email to the member's registered email address.
- Log delivery — each dispatch attempt creates a record in the Email Notification Log for debugging and auditing.
Fields
Basic information
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
eventCode | enum | ✅ | — | The system event code that triggers the email. See Trigger Events below. |
emailTemplateId | UUID | ✅ | — | The unique identifier of the Email Template to use. |
status | enum | ✅ | draft | The rule status: draft · live · paused. Only live notifications trigger outgoing emails. |
Trigger events
The eventCode determines which platform action triggers this notification rule:
| Event Code | Trigger Condition |
|---|---|
streak_progress_broken | Sent when a user fails to maintain their streak and it resets |
streak_progress_to_be_broken | Sent as a warning reminder before a streak period expires |
streak_progress_completed | Sent when the user completes the overall target streak |
streak_progress_non_milestone_completed | Sent when the user completes a non-milestone in a streak |
streak_progress_milestone_completed | Sent when the user completes a milestone in a streak |
streak_progress_in_progress | Sent when the user makes a progress in a streak but does not complete any non-milestone or milestone |
challenge_progress_failed | Sent when a challenge window ends and target is not met |
challenge_progress_to_be_failed | Warning warning before a challenge window closes |
challenge_progress_completed | Sent when the user completes the challenge target |
challenge_progress_milestone_completed | Sent when the user reaches a milestone in a challenge |
challenge_progress_in_progress | Sent when the user makes a progress in a challenge but does not complete any milestone |
Real-world examples
🛍️ E-commerce — Challenge Completed Notification
Automates sending a congratulatory email when a challenge is successfully finished:
Code
Access & permissions
| Caller | Allowed operations | Notes |
|---|---|---|
| Admin | CREATE · GET · LIST · UPDATE · DELETE | Full control over notification rules |
| End user | (none) | No access |
| Guest user | (none) | No access |
Related resources
| Resource | Description |
|---|---|
| Email Template | The subject line and body layout linked to this notification trigger |
| Email Notification Log | Read-only delivery logs recording the execution history of notifications |
| Member | The recipient of the outgoing email notification |
API reference
See the API Reference for full request/response schemas and interactive examples for:
GET /schema/email_notification/record— list email notificationsPOST /schema/email_notification/record— create an email notificationGET /schema/email_notification/record/{id}— get an email notification by IDPATCH /schema/email_notification/record/{id}— update an email notificationDELETE /schema/email_notification/record/{id}— delete an email notification
Last modified on