Customer Collaboration domain implementation
This page describes how the Customer Collaboration domain model is realized at runtime: the three-service topology, the stores and channels, Azure Table Storage partition-key mechanics, the Phoenix Cosmos subscription store, code references, purge operations, and current-vs-target scope.
This domain is not event-sourced. Recovery is operational — mutable records in Table Storage and Cosmos DB that can be rewritten or purged — rather than event-stream replay. The generic V3 event-sourcing pattern used by other domains is documented in Data and events and is included here only as a contrast.
Three-service realization
| Service | Implemented responsibility |
|---|---|
| Pigeon | Outbound contact, channel dispatch, request storage, reply correlation, and unsolicited-message detection |
| Phoenix | Microsoft Graph subscription lifecycle, encrypted Teams webhook ingestion, and normalized Teams reply publication |
| Pigeon Envoy | Routes unsolicited customer messages to Cyber Defenders by issuing a conditional Incident command |
Pigeon contact records
Pigeon stores contact requests and their channel audit, correlates replies, and detects unsolicited messages.
- Request model
- General request model
- Request handling
- Action-card request model
- Action-card queue
- Teams thread tracker
- Incoming message model
- Correlated response
- Unsolicited message
- Correlation service
- Inbound filtering
- Pigeon event constants
- Request example
- Action-card response example
Phoenix Teams ingestion
Phoenix validates and decrypts Microsoft Graph channel notifications and publishes the normalized Teams reply onto the Pigeon ingestion topic.
Pigeon Envoy routing
Pigeon Envoy does not mutate incident state directly; it issues a conditional Incident command after validating the unsolicited-message schema.
Stores and channels
| Store or integration | Purpose |
|---|---|
| Azure Table Storage contact records | Requests, statuses, routing, responses, and send audit |
| Azure Table Storage action-card queue | Card request and response correlation |
| Per-customer Teams thread tables | Incident-to-thread mapping |
| Phoenix Cosmos container | Microsoft Graph subscription state |
| Microsoft Teams / Graph | Shared-channel delivery and inbound message notifications |
| Conveyor/email | Email delivery and replies |
| Phone queues and automated campaigns | Voice contact and response collection |
| Incident event/command boundary | Public comments and unsolicited-message state requests |
| Doppio customer configuration | Workspace/customer mapping, channels, tenant IDs, and ignore rules |
Table Storage partition-key mechanics
For Incident Management, the contact-request table uses workspaceId-incidentName as
the partition key. A timestamp-based row key includes the request type and, for general
requests, the channel method. Action cards use a separate Table Storage queue and
correlation path. Teams thread mappings live in a per-customer Table Storage table.
Phoenix Cosmos subscription store
Phoenix stores Microsoft Graph subscription state in Cosmos DB and manages its lifecycle. Phoenix:
- prevents the same Team/channel from being assigned to another tenant;
- creates a Graph subscription for channel message changes;
- renews subscriptions before expiry;
- reauthorizes subscriptions periodically;
- recreates subscriptions that Graph reports as missing;
- persists updated subscription state in Cosmos DB.
Purge operations
Pigeon exposes customer-data purge operations for contact requests, action cards, phone requests, Teams/email threads, and escalations. Operational records therefore must not be described as a permanent event-sourced audit ledger.
Target versus current scope
A future unified CustomerCollaboration aggregate could add a tenant-scoped
conversation stream, normalized delivery attempts, exact question correlation,
request expiry, and an authorization-aware approval ledger. None of those is the
current source of truth.
Until that model exists, V3 designs must treat:
- action cards as a channel mechanism, not proof of generic approval;
- Teams, email, and phone identities as channel input, not sufficient business authorization;
- Pigeon response events as communication outcomes that the receiving domain must validate;
- Phoenix subscriptions and Teams thread mappings as replaceable integration state.
References
- Original Customer Collaboration reference
- Teams shared-channel decision
- Communication Manager reference
- Microsoft Teams identity reference
- Teams notification security reference