Communication — Overview
Communication delivers messages to users — email, push, SMS, in-app. It receives "work to send", renders content, selects recipients, sends through providers, and tracks delivery state.
How is Communication different from Platform?
The two parts are connected but have clear roles:
- Platform decides "when to send what" — creates
NotificationJob(work to send) from events or direct commands. - Communication handles "how to send it" — turns
NotificationJobinto real messages sent to the right people, with the right template, and tracks whether delivery succeeded.
Message types
| Type | What it is | Example |
|---|---|---|
| Transactional / manual | One message for one specific event | Welcome email, booking confirmation |
| Reminder | Message based on schedule/threshold | Document expiring soon, invoice due |
| Campaign | Bulk send to many people | Holiday notice to all parents |
| Report subscription | Recurring report | Weekly report sent automatically |
| In-app (UserMessage) | Message displayed in the app | Notification inbox in the app |
Main "objects"
| Name | One sentence |
|---|---|
| NotificationJob | Work to send (input from Platform). |
| OutgoingMessage | One outbound message for each recipient, each channel; carries delivery state. |
| UserMessage | One in-app message per recipient (in-app inbox). |
| MessagingJob + Blob | Coordinates large campaign/report payloads. |
| SmsUsage | Ledger charging per accepted SMS provider (by BusinessUnit). |
| Template | Content template with {{...}} placeholders. |
Suggested reading order
- End-user view — which channels users receive messages through.
- Core concepts — artifacts & send-once principles.
- System architecture — send pipeline & key policy.
- Automation & Reminders — scheduled/threshold reminders, AutomationScheduler.
- Report Subscription — recurring automated reports.
- Codebase flow — workers & files.
- Data & read/write tables — artifacts in SQL/Table/Blob, tables by flow.
- Common cases — template, suppress, seed recipient.