Customer Ordering
Derived from network/model/model.yaml. This context's service is built; the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses.
Customer Ordering (customer-ordering, code CO, tier commerce) turns
a shopper's cart into a customer order. At checkout it calls
delivery-promise synchronously to obtain one promise per shipment group,
then records the order with the shopper and the ship-to address. That
address is synthetic PII and is held only here. The context publishes
CustomerOrderPlaced, which carries the promise snapshot of every group, so
order-sourcing can queue the work from one event without correlating it with
the promise stream. Afterwards it follows fulfilment, promise and package
events into a customer-facing status and tracking view; on the day of delivery
the view also shows each package's day-of delivery window (at most two
hours, current only while the package is out for delivery) and, when the
delivery point has been flagged, a delivery-point advisory — a reason
code for the storefront to word, never driver prose. It also derives the opaque consolidation key that lets order-sourcing
merge the groups of one shopper and one address, stores the shopper's chosen
delivery day for the opt-in CONSOLIDATED tier, and lets one tracking number
close several groups. It handles customer
cancellation only while no shipment group is locked. The same storefront API
is what the e2e-tests and the console remote (/mfes/customer-ordering/) drive. shipping-and-tracking
is the only other context that ever reads the ship-to address: it calls the
restricted, in-organization route GET /orders/{orderId}/ship-to to print a
label.
This context's pages
| Page | What it holds | ddd-crew tool it follows |
|---|---|---|
| Business Context | The problem, actors, decisions, relation to the real fulfillment networks, out of scope | (narrative) |
| Ubiquitous Language | Terms, code identifiers, terms not to confuse | Bounded Context Canvas (UL section) |
| Core Domain Chart | Why this context is Generic | Core Domain Charts |
| Bounded Context Canvas | Purpose, classification, roles, inbound and outbound messages, decisions, metrics | Bounded Context Canvas v5 |
| Context Map | Every neighbour, direction and pattern | Context Mapping |
| Aggregate Design Canvas | CustomerOrder and Shopper, states, invariants, commands | Aggregate Design Canvas v1.1 |
| Domain Events | Published and consumed CloudEvents, with an example envelope | Domain Message Flow Modelling (message catalogue) |
| Domain Message Flow | Checkout, expired offer, fulfilment to delivery, cancellation | Domain Message Flow Modelling |
| EventStorming | Process-level boards with hotspots | EventStorming glossary & cheat sheet |
| Use Cases | One section per command: trigger, flow, errors, events, idempotency | (application layer, fleet convention) |
| Class Diagram | Proposed domain model and hexagonal ports and adapters | (UML, fleet convention) |
| Entity Relationship | Proposed Postgres schema | (fleet convention) |
| Sequence Diagrams | Adapter to Kafka for every command use case | (UML, fleet convention) |
Service and operations
- Service:
IQVO/customer-orderingondevelop(03a2d27, 2026-10-26): binariescmd/api(REST) andcmd/mcp(read-only MCP), and the console remote inweb/. - Deployment: wired in warehouse-infra develop: a
terraform/apps.yamlentry (database: true,frontend_remote: customer_ordering_mfe) andhelm-values/customer-ordering.yaml(MCP enabled, gateway path/api/mcp/customer-ordering). The cluster itself was not checked in this refresh. - Observability: service ADR 0007,
Adopt the fleet observability standard, Accepted 2026-10-25. Logs, metrics and traces leave
over OTLP to the otel-collector (
OTEL_EXPORTER_OTLP_ENDPOINT, chart defaultotel-collector.observability.svc.cluster.local:4317;OTEL_SERVICE_NAME). The Tier-2 business counter isordering.orders.placed(unit{order}, ininternal/adapters/outbound/telemetry/order_metrics.go), with attributeoutcome=placedorrejectedandreasonon the outcomes that are not a success. The dashboard queries it asordering_orders_placed_totalin warehouse-infra'sterraform/dashboards/contexts/customer-ordering.json, byoutcome.
Elsewhere
- Read-only MCP server (service ADR 0005):
cmd/mcp, a second binary serving Streamable HTTP on:8090with no auth; it sources this context's own reads and nothing that writes. Three tools:get_order,get_order_tracking,get_ship_to. The gateway (Kong) exposes it at/api/mcp/customer-ordering, rewritten to the server's/mcpmount. - Console remote (service ADR 0006):
web/, a Vite + React Module Federation remote — federation containercustomer_ordering_mfe, gateway mount/mfes/customer-ordering/, dev/preview port4012— read-only screens over the existing REST reads, calling only this context's API. - REST contract (as built, from the service repository):
apis/customer-ordering/openapi.yaml, rendered under the API reference. - ADR 0006: PII confinement explains why the
ship-to address lives here and is read by
shipping-and-trackingonly. - ADR 0002: promise and assignment are separate
explains why checkout talks to
delivery-promiseand never toorder-sourcing. - The network-wide Context Map and Subdomain Classification.