Communication — Overview
Communication is responsible for delivering messages to users — email, push, SMS, and in-app messages. 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 closely connected but have clear roles:
- Platform decides "when to send what" — it creates
NotificationJob(work to send) from events or direct commands. - Communication handles "how to send it" — turning
NotificationJobinto real email/push/in-app messages sent to the right people, with the right template, and knowing 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. |
| 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.