Customer Returns
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.
Customer Returns (customer-returns, code CR, tier commerce) is the
shopper-facing returns front door of the network. After an order group has
shipped or been delivered, the shopper asks to return it. The context
creates a return authorization, decides the disposition itself (keep
the goods, bring them to the nearest returns centre of the region, or send
them back to the node that fulfilled the group), links the reverse labels
and closes the authorization when a returns centre grades what came back.
It holds no money, no address and no free text: the reason is an enum, unit
prices are the caller's facts and never leave the context, and only the
postal prefix of the group's destination is kept.
Two seams reach other contexts, and both are built on both sides. The
reverse-label route of shipping-and-tracking (POST /return-labels) and the
return advices and outcomes of vendor-connectivity are in those services'
develop contracts, so the model draws both. The label call stays
config-gated and off by default: unset, a label request answers
label-unavailable. See Context Map.
Pages
| Page | What it covers | ddd-crew tool |
|---|---|---|
| Business Context | The problem, the actors, the decisions, what is out of scope | — |
| Ubiquitous Language | Terms (return authorization, disposition, returnless return, graded outcome...) and code identifiers | — |
| Core Domain Chart | Why this context is Supporting | core-domain-charts |
| Bounded Context Canvas | Purpose, roles, inbound and outbound messages, decisions | bounded-context-canvas |
| Context Map | Every neighbour with direction and pattern, and the two returns seams | context-mapping |
| Aggregate Design Canvas | ReturnAuthorization and the three read models | aggregate-design-canvas |
| Domain Events | Four published events, ten consumed | — |
| Domain Message Flow | A physical return, a returnless return, cancellation and expiry, and an agent read over MCP or A2A | domain-message-flow-modelling |
| EventStorming | Process-level boards with hotspots | eventstorming-glossary-cheat-sheet |
| Use Cases | One section per command, errors mapped to HTTP | — |
| Class Diagram | Domain types and the hexagonal layout | — |
| Entity Relationship | The tables the service's ADRs name, as a logical view | — |
| Sequence Diagrams | One runtime sequence per key command | — |
Service and operations
- Service:
IQVO/customer-returnsondevelop(5f2d5e6, checked 2026-12-02): binariescmd/api(REST, the outbox relay and the four consumers),cmd/mcp(read-only MCP server),cmd/a2a(read-only A2A agent),cmd/projectorandcmd/reports(the analytics read side, switched off in warehouse-infra). The repository carries no console remote. - Release: the MCP server and the A2A agent are released at
v0.1.10(tag1740c60, 2026-12-02), with the same two tools, one resource, one prompt and one skill asdevelop. The chart's routes through the Agent Router (no Kong plugins, no route timeout) are built ondevelopafter that tag. - Deployment: applied to the k3s cluster (api and agents pods checked 2026-12-02). Wired in
warehouse-infra develop (
d12d05f): aterraform/apps.yamlentry andhelm-values/customer-returns.yamlwithmcp.enabled: true,a2a.enabled: trueandagents.colocate: true, socmd/mcpandcmd/a2arun as the two containers of onecustomer-returns-agentsDeployment (container ports 8090 and 8093, both probed on/healthz). The edge routes are REST through Kong at/api/customer-returns, and MCP and A2A through the Agent Router (Envoy Gatewayagent-routerinenvoy-gateway-system, warehouse-infra ADR 0014 and 0015) at/api/mcp/customer-returns(rewritten to/mcp) and/api/a2a/customer-returns(rewritten to/); the host edge of the Agent Router ishttp://localhost:8010. No auth on REST, MCP or A2A: the in-cluster boundary is the access control. - MCP (service ADR 0006,
authority levels per ADR 0011):
cmd/mcp, Streamable HTTP (stateless, no session id) on the official Go SDK, port 8090, open/healthz, no auth. Two tools, both L1 (_metacom.warehouse/authority: L1,readOnlyHint, idempotent, closed-world):get_return_authorizationandlist_return_authorizations, over the same read use cases as the two RESTGETs. One resource templatewarehouse://customer-returns/return-authorizations/{authorizationId}and one prompt,review_return_authorization(the operator SOP; it names tools and never calls them). Authorizing, labelling and cancelling stay REST-only. - A2A (service ADR 0009,
authority per ADR 0011):
cmd/a2a, JSON-RPC 2.0 over HTTP on the official A2A Go SDK (a2a-go/v2), port 8093, open/healthz, no auth. The agent card is at/.well-known/agent-card.json(namecustomer-returns, provider IQVO, JSON-RPC transport, no streaming). One skill,get_return_authorization("Read one return authorization", tagauthority:L1, one required argumentauthorizationId): a message-only agent, one request and one answer, nothing persisted. A2A is delegation only: facts still travel as CloudEvents on Kafka, and the skill never proxies another context's data. - Observability: service ADR 0008,
Adopt the fleet observability standard. The Tier-2 business counter is
customer_returns.return.authorized(unit{return}), with attributeoutcome=authorizedorrejected.
Elsewhere
- The decision: ADR 0012, customer returns is a bounded context.
- The REST contract (as built, from the service repository):
network/apis/customer-returns/openapi.yaml, rendered under the API reference: five operations on/return-authorizations, plus liveness and readiness. - The agent surfaces as built, MCP (service ADR 0006) and A2A (service ADR 0009), authority levels per ADR 0011: the MCP and A2A bullets under Service and operations. Fleet level: the Agentic Standard v2, the Agent catalogue and A2A agents.
- The two seams to
shipping-and-trackingandvendor-connectivity: Context Map. - Where the context sits among the twelve: Context Map.