ADR-004: Enrich basket items from Catalog at read time
Basket persistence stores book references and quantities, while current book presentation data is resolved from Catalog when a basket is read.
1. Context & Problem
When customers view their BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs, they need to see book titles and current prices. However, CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs is the authoritative owner of BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs information and pricing. Storing copies of titles and prices inside the basket database would create duplicate data that quickly goes out of date and causes ownership conflicts whenever catalog details change.
2. Business Value
- Always-current presentation: Shoppers see the latest book names, regular prices, and sale prices whenever they review their cart.
- Single source of truth: Keeps product metadata owned strictly by CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs with zero background synchronization needed.
- Lean storage footprint: Basket storage stays small and focused because it saves only product references and quantities.
- Efficient scaling: Fetching all distinct book details in one combined request keeps cart loading fast even as baskets grow larger.
3. How It Works
The Cart SystemSystemv1.0.0Cart SystemInternal system that owns customer-scoped baskets throughout the pre-order journey, including basket management, Catalog...Ownercommerce-fulfillment-teamDiagramOpen docs saves only the customer’s chosen book identifiers and positive requested quantities—it never stores quoted prices or reserved inventory. Whenever a customer reads their basket, the cart service collects all unique book identifiers in the cart and asks CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs for their current names, regular prices, and sale prices in a single batch lookup.
If a book record cannot be found in the catalog, the cart service does not invent missing details or silently remove the item from the customer’s saved basket; missing presentation fields simply remain absent. Importantly, the prices shown in the basket are for current display only—they are not a price guarantee, inventory reservation, or checkout snapshot.
4. Trade-offs & Lessons Learned
- Catalog read dependency: Showing complete product details in the basket depends on CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs being reachable when the basket is read.
- Checkout must re-verify prices: Downstream checkout workflows must independently validate final product eligibility and pricing at purchase time rather than treating the basket’s displayed price as an accepted price.
- Unprescribed fallback behavior: This decision does not define stale-data caching or specific error-handling behavior when Catalog communication fails; those policies must be defined explicitly in the service contract and implementation.
5. Technical Reference
- Persisted fields: Cart SystemSystemv1.0.0Cart SystemInternal system that owns customer-scoped baskets throughout the pre-order journey, including basket management, Catalog...Ownercommerce-fulfillment-teamDiagramOpen docs persists only BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs identifiers and positive requested quantities per line item.
- Read-time enrichment: Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets,
Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs collects distinct BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs IDs from the basket and calls Catalog’s batch gRPC query (avoiding N+1 per-item lookups) to populate
name, regular price, and sale price. - Missing records behavior: Unmatched Catalog records remain omitted from presentation without mutating the stored basket or fabricating product details.
- Out of scope: Stale-data caching and Catalog transport-failure response policies must be specified explicitly in service contracts and implementation.