Derived from model/model.yaml. The shopping-cart service is built on develop (IQVO/shopping-cart at 95bc5bc, checked 2026-10-27) and not deployed (no warehouse-infra entry). Every Err... name, REST route and CloudEvents type of this context named on this page exists in the service; where the built service differs from the model's design, the page says so (As built) or the context's Service and operations section lists it.
Every event this context publishes and consumes, from
contexts[shopping-cart].publishes and .consumes, with the producer's
entry for each consumed event. The domain-wide rules are on
Event standard: CloudEvents.
Every Kafka message is a CloudEvents 1.0 event in structured JSON mode
(conventions.cloudevents):
Attribute
Value for this context
specversion
1.0
id
a UUID minted once when the event is written to the outbox; a redelivery carries the same id
source
/retailnetwork/shopping-cart
type
com.retailnetwork.storefront.shopping-cart.cart.<EventName> (tier storefront, entity cart from the publishes rows)
subject
the aggregate root id (cartId)
time
the instant the fact happened, UTC
datacontenttype
application/json
dataschema
as builturn:retailnetwork:shopping-cart:analytics:<EventName>:v1 (all four events are analytics-only; service ADR 0004, encoder goldens)
Kafka topic
retailnetwork.shopping-cart.analytics — every published event is analytics-only, so by conventions.integration_rules the .events topic carries nothing from this context
Kafka key
cartId, so one cart's events stay on one partition and in order
Every event is written to outbox_events in the same transaction as the
aggregate save, and a relay publishes it. All four events name their
consumers as "analytics only": they go to the .analytics topic and no
storefront or network context subscribes to a cart fact
(Context Map).
Every consumer is idempotent on the CloudEvents id: the id is inserted
into processed_events in the same transaction as the effect, and a
duplicate is acknowledged without effect. Consumers dispatch on the full
type string, never on a suffix. Consumer group names come from mandatory environment variables (CHECKOUT_CONSUMER_GROUP, OFFER_AVAILABILITY_CONSUMER_GROUP, PRICING_CONSUMER_GROUP; the service refuses to start without them); the names the design suggests:
shopping-cart.offer-availability, shopping-cart.pricing,
shopping-cart.checkout.
From offer-availability (retailnetwork.offer-availability.events, Conformist)
Marks the item discontinued in PurchasabilityView; later AddLine attempts fail ErrItemNotPurchasable. Existing lines stay (the model clears lines for no event).
From pricing (retailnetwork.pricing.events, Customer/Supplier)
Runs CloseOnCheckoutCompleted: OPEN → CHECKED_OUT, publishing CartCheckedOut (analytics).
Ordering. Pricing keys item events by catalogItemId, so per-item
price order holds; the schedule and table events are versioned, and the
cart stores the version it applied. CheckoutCompleted is keyed by
sessionId upstream — not by cartId — so the cart must not assume
per-cart ordering from the partition: the inbox on the CloudEvents id
makes a redelivery safe, and the only ordering that matters (quote before
selection before checkout) is enforced inside the cart, not by the topic.
A CheckoutCompleted for a cart that is not OPEN has no transition in
the model: in practice the session outlives at most minutes while
abandonment needs 30 idle days, and ErrCartClosed guards the terminal
states (see the
Aggregate Design Canvas).
None of the pricing or catalogue events touches the Cart aggregate
itself: the quote and selections are cleared by line or destination
changes only (business decision 3) — a price move never clears a quote;
it moves the labelled estimate and the purchasability verdict.
No shopper reference appears in any cart event: the events carry the cart
id and item ids only, and the optional shopperId never leaves the
aggregate (conventions.no_auth — the storefront stores no PII).