Notifications — Guidelines
These rules cover both transient in-product presentation and durable customer communication.
Ownership boundary
MUST
- Use the shell-provided notification or snackbar service for transient in-product presentation.
- Keep the decision to present success, warning, error, or progress in the owning MFE and its BFF, alongside the domain mutation and local query state.
- Route durable customer-facing communication through Customer Collaboration and Pigeon using the platform notification contract.
- Keep the originating business fact and authorization decision in the owning domain.
MUST NOT
- Put domain rendering, mutation retries, business state, or cross-MFE query invalidation in the shell notification provider.
- Treat a toast, card, channel post, or delivery receipt as the source of domain truth.
- Call Microsoft Teams or Graph directly from a service other than Pigeon.
- Store channel credentials outside Pigeon’s controlled configuration.
- Post to a customer channel outside the approved tenant-scoped model.
Notification request shape
MUST
- Populate:
templateId(versioned),recipientScope(tenant / channel / user set),templateParameters,correlationId,priority(informational | actionable | critical). - Reference a published template ID — templates live in Pigeon, not per service.
- Attach the correlation ID that chains back to the triggering domain event.
MUST NOT
- Embed rendered card JSON in the request — templates own rendering.
- Send free-text bodies for actionable / critical notifications.
Content
MUST
- Keep PII and secrets out of card content — link to the ION portal (Veritas) for deep detail.
- Ensure content is safe to render in a shared channel that may include third-party members (advisors, MSP staff).
MUST NOT
- Include customer secrets, authorization headers, tokens, cookies, credentials, or sensitive request and response payloads.
- Include internal-only system detail in customer-visible cards.
- Copy a complete domain event or exception into template parameters.
Priority + throttling
MUST
- Set priority honestly —
criticalis reserved for events that require immediate customer action. - Assume Pigeon may deduplicate, batch, or throttle informational notifications.
MUST NOT
- Send
criticalfor events that could be batched. - Fire the same request repeatedly to defeat throttling.
Actions and authorization
MUST
- Point durable customer actions at the owning ION BFF through the approved ingress path.
- Authenticate the user and enforce tenant, capability, freshness, and domain checks at the target BFF. The card and shell are not authorization boundaries.
- Make card actions idempotent — a customer clicking twice should not double-execute.
MUST NOT
- Point customer actions at unapproved endpoints.
- Store trust in a card, toast, route state, or embedded action token as a substitute for BFF authorization.
Failure handling
MUST
- Trust Pigeon’s delivery contract — do not retry publication from your service; Pigeon owns delivery retries.
- Publish notification requests transactionally with the domain event where possible (outbox pattern).
MUST NOT
- Fail a domain operation because a notification could not be published; the operation is authoritative in the event store.
Templates
MUST (template owners = Pigeon + owning system team)
- Version templates (
incident.new@v3); never mutate a published version. - Deploy templates via IaC / Runway (§ 25).
- Localise per supported customer locale.
MUST NOT
- Edit templates in the Teams / Bot portal above Alpha.
- Introduce inline HTML that circumvents card safety.
Audit
MUST
- Emit an audit event for notification sent on actionable / critical priority (Pigeon-side).
- Emit an audit event for customer action taken on a card (BFF-side, on action receipt).
MUST NOT
- Skip audit for actionable / critical notifications.
Observability
MUST
- Include the correlation ID on every request; Pigeon propagates it through delivery.
- Emit RED metrics on the notification-producing endpoint (rate, error rate on publish, latency).
Anti-patterns
- Service-direct Teams calls — bypasses throttling, templates, tenant scoping.
- Free-text card bodies — inconsistent UX, unauditable content.
- Trusting the card as authorisation — the BFF enforces the capability check.
- Firing storms of
criticalevents — trains customers to ignore actual criticals. - Retrying publication from the producer — duplicates Pigeon’s retries; amplifies load.
- Skipping audit on actionable cards — invisible security-relevant actions.
Related
- Architecture
- Implementation
- ADR-0023 — MFE UI architecture
- ADRs: 0008, Teams shared channels ADR, 0024
- Principles: § 8, § 15, § 17
- Capabilities: Audit Logs, Identity, API management