Notifications Implementation
These procedures cover transient shell presentation and durable customer communication. The owning MFE and backend decide the domain outcome; the shell only presents in-product messages, while Customer Collaboration and Pigeon own durable channel delivery and outcomes.
Present an in-product notification
- Complete or acknowledge the domain operation in the owning MFE and BFF.
- Update the MFE’s local query and mutation state; do not move that state into the shell.
- Call the shell-provided notification service with bounded presentation data: severity, localization key, safe parameters, and an optional correlation ID.
- For an asynchronous operation, present acknowledgement separately and wait for the backend completion event before presenting success.
- Keep retry and error-shape decisions in the MFE. The shell must not infer a domain outcome or invalidate another MFE’s cache.
Send an adaptive card
- Confirm the template ID exists in Pigeon
(
incident.new@v3, etc.). If not, work with Pigeon to author it. - Build a notification request with
templateId, tenant-scopedrecipientScope, boundedtemplateParameters,correlationId,priority, and an idempotency key. Do not include credentials, tokens, customer secrets, or complete domain payloads. - Publish to the
notifications.requestsService Bus topic using the platform SDK. - Trust Pigeon for delivery. Do not retry publication.
- Observe delivery via the notification dashboard (per correlation ID).
How to add a new notification template
- Draft the template JSON (Adaptive Card) — respect content guidelines (no PII, safe for shared channels, actionable endpoints via APIM).
- Add to Pigeon’s template repo with a new versioned ID
(
<domain>.<event>@vN). - Add localisations for supported locales.
- PR-validate: template lint + render preview.
- Merge → Runway deploys the template to Pigeon.
- Coordinate with the producing service to reference the new template ID.
How to send a status update to a customer channel
- Determine whether the update is
informational(batched digest OK) oractionable / critical. - Use an appropriate template — do not free-text the body.
- Publish through the standard notification path.
- For sustained status (e.g. an ongoing incident), prefer updating the source incident card (via card update) over posting new cards.
How to test a card without spamming the customer
- Use the Alpha environment — customer channels are mirrored to a test channel in a dedicated Ontinue tenant.
- Send the notification with a test tenant scope.
- Verify rendering in Teams manually.
- Confirm actionable card requests reach the intended BFF through APIM and that the BFF validates the user’s token and capability. Never record the JWT in test output.
- Promote through Beta → Prod.
How to throttle noisy notifications from a service
- Confirm the noise is at the producer (event storm) or the template (fan-out too wide).
- If producer: add domain-side deduplication or coalescing before publishing.
- If template: mark the notification as
informationalso Pigeon can batch / digest it. - If neither works: request a Pigeon-side per-service throttle rule via IaC PR.
- Measure post-change signal:noise ratio.
How to handle a customer action on a card
- Card action calls the target BFF endpoint via APIM with the user JWT + capability header.
- BFF re-validates capability — the card is not a trust boundary.
- BFF idempotently applies the action against the domain aggregate (Watchtower / Cogs / etc.).
- Emit a domain event and an audit event for the action.
- Optionally send a confirmation notification back to the channel (updating the source card is preferred).
How to onboard a new customer channel
- Create the shared channel in the Ontinue tenant.
- Add the customer’s authorised users to the channel.
- Register the channel in Pigeon’s tenant / channel registry via IaC.
- Verify a test notification reaches the channel.
- Enable the templates the customer’s contract covers.
How to respond to a Teams delivery outage
- Confirm via Pigeon’s dashboard: DLQ growth, circuit breaker state, tenant-specific vs. global.
- If tenant-specific: check the customer tenant’s Teams health and channel state.
- If global (Teams / Graph API outage): Pigeon retries with backoff; verify Service Bus backlog is within limits.
- Communicate to customers via email fallback for critical status.
- Post-incident: reconcile the delivery ledger against audit events; catch up on failed deliveries.
How to add a webhook channel for a customer (planned)
- Register the customer’s endpoint + auth in Pigeon’s channel registry.
- Add a webhook adapter template — Pigeon renders per customer’s contract schema (e.g. their SOAR’s ingest format).
- Confirm signed delivery + retry semantics.
- Test in Alpha with the customer’s staging endpoint.
How to audit “did the customer see the notification?”
- Query the audit table for
notification.sent@v1events bycorrelationIdorresource.id. - Query Pigeon’s delivery ledger for the delivery outcome (Teams accepted / rejected).
- If actionable, query for the corresponding
notification.action.taken@v1audit event. - Compose the timeline; deliver to the requesting customer / auditor.
How to retire a template version
- Announce the deprecation with a sunset date.
- Update all producing services to reference the new template version.
- Keep the old template active until no producer references it (verify via Pigeon usage metrics).
- Remove the old template via IaC.
- Log the retirement as an audit event.
Related
- Architecture, Guidelines
- Capabilities: Audit Logs, Observability, API management
- ADRs: 0008, 0024