Skip to main content

Domain Message Flow

As built

Derived from network/model/model.yaml. This context's service is built (IQVO/customer-returns, decided by ADR 0012); the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses. Where the model left a choice open, the service's own ADRs 0001 to 0005 record what it does.

Following ddd-crew Domain Message Flow Modelling. Every arrow is a message from the model, prefixed cmd:, evt: or qry:. Quantities and identifiers in the notes are illustrative. Full types are on Domain Events.

1. A physical return​

1a. The facts arrive, then the shopper asks​

1b. Label and restock​

The first three steps are what happens today: the label route of shipping-and-tracking is not in its develop contract. The last three show the model's edge to offer-availability; nothing triggers ApplyOutcome until vendor-connectivity publishes the graded outcome.

2. A returnless return​

3. Cancellation and expiry​

4. An agent reads a return authorization (MCP or A2A)​

One flow for both agent surfaces: the MCP tool get_return_authorization and the A2A skill of the same name front the GetReturnAuthorization use case the REST GET answers. Nothing is written on either path.

Source: internal/adapters/inbound/mcp/tools.go and resources.go, cmd/mcp/router.go, internal/adapters/inbound/a2a/skills.go and server.go, cmd/a2a/router.go (service develop 5f2d5e6, read 2026-12-02); the routes from the chart's mcp-route.yaml and a2a-route.yaml (Agent Router, warehouse-infra ADR 0014 and 0015). Omits: the list_return_authorizations tool (the same ListReturnAuthorizations use case as the REST list), the Kong edge on localhost:8000, which serves neither route (the Agent Router's host edge is localhost:8010), the A2A one-line summary text part, and the REST GET that answers the same view.

Derived from: model.yaml → contexts[customer-returns].policies (DispositionDecidedAtAuthorization, ReturnlessKeep, ReverseLabelCall, FirstFittingOutcomeCompletes, LazyExpiry), .publishes, .consumes; contexts[offer-availability].policies[RestockOnReturnCompleted]; section 4 from the service's MCP and A2A adapters (service ADRs 0006, 0009, 0011).