Notifications (Pattern)
Problem
ION producing services (Watchtower, Cogs, Ticket, Investigation) need to communicate with customers and internal audiences — incident alerts, playbook results, status changes, escalations. Two anti-patterns must be avoided:
- Every service calls Teams directly — fragments auth, tenant scoping, throttling, and template versioning across the platform. A single misbehaving service becomes a customer-facing incident.
- No throttling — a domain event storm becomes a Teams flood; customers get trained to ignore.
Notifications need a shared, throttled, templated delivery substrate — with producing services publishing intent, not messages.
Solution
Route all customer-facing notifications through Pigeon via a Service Bus request topic; Pigeon owns delivery.
1. Producer emits intent
Publish a notification request to
notifications.requests:
{
"templateId": "incident.new@v3",
"recipientScope": { "tenantId": "..." },
"templateParameters": { ... },
"correlationId": "...",
"priority": "informational | actionable | critical"
}
Producers do not render cards or call Teams directly.
2. Pigeon resolves + renders + delivers
- Resolves the recipient (customer’s shared Teams channel).
- Renders the versioned template with parameters.
- Applies throttling policy — per-tenant rate limit,
dedup window, digest batching for
informational. - Delivers via Microsoft Teams (primary) or email fallback.
- Records the delivery outcome as a
notification.delivered@v1/notification.failed@v1event.
3. Actionable cards call back through the BFF
- Card actions authenticate via user JWT + capability header at APIM.
- BFF re-validates capability — the card is not the authorisation boundary.
- BFF idempotently applies the action to the domain aggregate; emits a domain event + audit event.
4. Templates versioned and IaC-deployed
- Templates live in Pigeon’s repo, versioned
(
incident.new@v3). - Immutable per version; new versions supersede.
- Localisation per supported locale.
5. Failure handling
- Producers publish once; Pigeon owns retries + DLQ.
- Sustained tenant delivery failure trips a per-tenant circuit breaker in Pigeon.
- Producers do not re-publish on failure — they trust the substrate.
When to use
- Every customer-facing notification.
- Every internal notification whose lifecycle should benefit from templating + audit.
Not for:
- Debug telemetry (that’s observability).
- System-to-system events (that’s Service Bus event backbone).
- Inter-service commands.
Consequences
Positive
- One trusted path from event to customer.
- Uniform throttling + dedup / digest / audit.
- Producers freed from Teams / Graph API concerns.
- Card-action security enforced at BFF, not the card.
Negative
- Extra hop (event → notification request → delivery).
- Pigeon becomes a shared dependency.
- Template ownership shared between Pigeon + producing team.
Failure modes
- Service-direct Teams call — bypasses everything.
- Free-text notification body — inconsistent UX, no audit.
- Trusting the card as auth — BFF must re-check.
- Retrying publication from the producer — duplicates Pigeon retries; amplifies load.
- Storm of
criticalevents — trains customers to ignore.
References
references/Design Pattern- Notifications.mdreferences/Architecture- Communication Manager (Notifications).md- ADRs: 0008.
- Capability: Notifications.
- Domain: Customer Collaboration.
- Related patterns: ECST, Idempotent Write, Audit Logs.
Applied in
- Watchtower — incident lifecycle notifications
- Cogs — playbook / investigation notifications
- Ticket — status change notifications
- All ION producers via the platform notification SDK
- Pigeon — Communication Manager + Teams / email adapters