Communication — Data & read/write tables
Database view for Communication: artifacts live in multiple stores (SQL / Azure Table / Blob / Queue). Convention: 📖 READ, ✏️ WRITE (insert/update).
Related concepts from other domains
| Concept | What it is | Role in Communication | Owning domain |
|---|---|---|---|
| EntityEvent | Event saying "something changed". | Input to event-derived path → creates NotificationJob. | Platform |
| NotificationSetting / NotificationOption | Notification type config by BU + subscribers. | Scheduler step evaluates: is this type enabled, who receives it. | Org/Settings |
| MessageTemplate | Content template with placeholders. | Generator renders template. | Messaging |
| ContactGroup | Recipient group. | Campaign targets groups (MessageJob_ContactGroup). | Attendee/Contact |
| Account / Attendee / Employee | Recipients. | Resolve recipients (customer/staff). | Account/Staff |
| ReportSubscription / ReportSubscriber | Recurring report subscription. | Source of report path (see Report Subscription). | Reporting |
| EmployeeCompliance / Invoice | Reminder source data. | Trigger provider calculates expiry / due date. | Staff / Finance |
Storage map
| Store | Artifact | Note |
|---|---|---|
| Azure SQL | NotificationScheduler, NotificationOption, NotificationSetting(+_Account/_Employee), MessageTemplate, MessagingJob, MessagingJobScheduler, MessageJob_ContactGroup, ReportSubscription, ReportSubscriptionScheduler, ReportSubscriber, ReminderStateLog, NotificationBanner | Queue & configuration. |
| Azure Table | NotificationJob, OutgoingMessage, UserMessage, AutomationJob | High-volume records, partitioned by entity/recipient. |
| Azure Blob | container messaging-job (campaign/report payload) | Large content; SQL only keeps blob name. |
| Azure Queue | queues between workers | Work transport. |
| Azure SQL (automation) | AutomationScheduler | Coordinates due-work reminder/report (see Automation). |
💡
NotificationJob/OutgoingMessage/UserMessageare Azure Table, not SQL tables — that's why they use PartitionKey/RowKey instead of PK/FK.
Tables in each flow
Send flow (Scheduler → Generator → Distributor)
| Step | Tables | Purpose |
|---|---|---|
| Scheduler | NotificationScheduler, MessagingJob 📖 READ; NotificationSetting/NotificationOption 📖 READ | Fetch Ready work; evaluate settings. |
| Generator | MessageTemplate 📖 READ; NotificationJob 📖 READ | Render + resolve recipients. |
| Generator (output) | UserMessage ✏️ WRITE; OutgoingMessage ✏️ WRITE | Create in-app message + outbound message (per recipient/channel). |
| Distributor | OutgoingMessage ✏️ UPDATE (claim → Sending → Sent) | "Claim before send". |
| Webhook & Tracker | OutgoingMessage ✏️ UPDATE (delivered/opened/bounce) | Update state from provider. |
Automation/reminder flow
| Step | Tables | Purpose |
|---|---|---|
| Create work | AutomationScheduler ✏️ WRITE (ensure/deactivate) | Due-work schedule (SchedulerKey UNIQUE). |
| Due execution | AutomationScheduler 📖 READ + claim (Version) | Worker claims processing rights. |
| Trace mirror | AutomationJob ✏️ WRITE (Azure Table) | Thin trace copy. |
| State log | ReminderStateLog ✏️ WRITE | Record reminder state. |
| Delivery | NotificationScheduler ✏️ WRITE (through dispatch guard) | Bridge to send pipeline. |
Campaign flow
| Step | Tables | Purpose |
|---|---|---|
| Create campaign | MessagingJob ✏️ WRITE; blob messaging-job ✏️ WRITE; MessageJob_ContactGroup ✏️ WRITE | Coordinates large payload + recipient groups. |
| Schedule | MessagingJobScheduler, NotificationScheduler ✏️ WRITE | Enters send pipeline. |
Related
- Architecture — send pipeline & key policy.
- History & observability — audit & trace.