Basket Item
Child entry within a Basket pairing a Catalog book identifier with a positive requested quantity.
Domain Role & Boundary
Basket Item is a child object owned by the BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs Aggregate Root in the ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs bounded context, recording a single requested book identifier and its desired quantity. Stored embedded inside the parent basket payload by 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, it is enriched at read time with live titles and prices from Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs. It explicitly does not store or lock book titles, descriptions, or prices—those remain owned by CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs until checkout locks them onto an Order ItemEntityv1.0.0Order ItemChild entity within an Order capturing a purchased book identifier, positive quantity, and locked checkout-time unit pri...Ownercommerce-fulfillment-teamOpen docs.
Entity Profile
| Property | Value |
|---|---|
| Bounded Context / Domain | ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs |
| Owning Service | 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 |
| DDD Role | Child Entity / Value Object (embedded in BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs) |
| Identifier Strategy | Scoped by Catalog bookId within parent BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs |
| Persistence Store | Embedded inside parent basket:{customerId} key-value payload |
| Deletion Semantics | Removed by replacing parent items without the entry, or when parent BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs is deleted |
| Concurrency Control | Governed by parent BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs whole-set replacement |
| PII / Data Classification | Internal pre-order item reference (non-PII) |
Attributes & Constraints
| Name | Type | Required | Description | Reference |
|---|---|---|---|---|
| bookId | UUID | required | Cross-context identifier of the requested Catalog Book. | bookProperty: id |
| quantity | integer | required | Positive number of copies requested (must be greater than zero). | — |
| Attribute | Business Rule / Constraint | Sensitivity / Notes |
|---|---|---|
bookId | Required non-empty UUID referencing a BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs in CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs. | Cross-context ID reference |
quantity | Required integer strictly greater than zero (> 0). | Domain invariant |
Domain Invariants & Lifecycle
- Positive quantity: Zero or negative quantities are rejected; removing an item requires submitting the updated basket without that item.
- No persisted price snapshot: Basket items intentionally omit prices so customers always see current CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs pricing while browsing.
- Read-time enrichment: When reading a basket, 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 batches distinct
bookIdvalues into a single lookup against Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs to attachname,price, andpriceSaleto the response.
If Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid
discovery, and authoritative book metadata.
PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs returns no match for a bookId during read-time enrichment (for example, if the book was soft-deleted), the item remains in the basket response with unpopulated display fields rather than inventing metadata.
Relationships & Associated Operations
| Category | Resource | Role / Interaction |
|---|---|---|
| Parent Aggregate | BasketEntityv1.0.0BasketCustomer-scoped, mutable pre-order collection of requested books and quantities managed prior to checkout.Ownercommerce-fulfillment-teamOpen docs | Embedded child item within the customer’s basket |
| Cross-Context References | BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs | Referenced strictly by bookId for live price/title enrichment |
| Mutating Commands | Create basketCommandv1.0.0Create basketCreates a basket containing the supplied item identifiers and quantities.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs, Update basketCommandv1.0.0Update basketReplaces a basket's item collection with the supplied items.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs | Replaced as part of parent basket mutations |
| Read Queries | Get basketQueryv1.0.0Get basketReturns the current basket and its item details.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs, Get basket over gRPCQueryv1.0.0Get basket over gRPCReturns the current basket through the basket.v1 gRPC contract.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs | Returned enriched to storefront or raw to checkout |