Ordering
Creates durable Orders from a buyer's current basket, locks purchase-time pricing, and owns order lifecycle transitions from New to Completed or Cancelled.
Business Purpose & Boundary
OrderingDomainv1.0.0OrderingCreates durable Orders from a buyer's current basket, locks purchase-time pricing,
and owns order lifecycle transitions ...Ownercommerce-fulfillment-teamDiagramOpen docs is BookWorm’s Core bounded context for committed customer purchases (BuyerEntityv1.0.0BuyerRepresents a customer's ordering profile and delivery address within the Ordering bounded context.Ownercommerce-fulfillment-teamOpen docs, OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs, 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) and their business lifecycle (New → Completed or Cancelled). It accepts checkouts by locking purchase-time pricing onto immutable order lines, maintains buyer profiles and delivery addresses, projects real-time order summaries, and orchestrates post-checkout basket cleanup and customer email triggers through Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket
cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs. Explicitly out of scope are pre-order mutable baskets (ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books
through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs), live catalog descriptions (CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and
consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs), external payment settlement, physical shipping execution, and email rendering or transport (PlatformDomainv1.0.0PlatformProvides cross-cutting capabilities for recurring scheduled triggers and durable,
idempotent transactional email notific...Ownerplatform-engineering-teamDiagramOpen docs).
Only explicit Ordering commands transition an OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs‘s business status. Post-checkout orchestration retries, timeouts, and PlatformDomainv1.0.0PlatformProvides cross-cutting capabilities for recurring scheduled triggers and durable,
idempotent transactional email notific...Ownerplatform-engineering-teamDiagramOpen docs email delivery outcomes never mark an order Completed or Cancelled.
Core Responsibilities & Capabilities
| Capability | Owning Service / Agent | Primary Entities |
|---|---|---|
| Order Creation & Lifecycle Transitions | Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs, 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 |
| Buyer & Delivery Address Management | Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | BuyerEntityv1.0.0BuyerRepresents a customer's ordering profile and delivery address within the Ordering bounded context.Ownercommerce-fulfillment-teamOpen docs |
| Order Summary Projections | Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs |
| Post-Checkout Saga Orchestration | Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | OrderEntityv1.0.0OrderDurable purchase record owned by a Buyer, capturing immutable purchase-time line items and governing order lifecycle tra...Ownercommerce-fulfillment-teamOpen docs |
Cross-Domain Interactions (Context Map)
| Neighboring Domain | Direction | Integration Mechanism | Business Data Exchanged |
|---|---|---|---|
| ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs | Upstream (Shopping → Ordering) | Sync (gRPC) | Customer basket book IDs and quantities fetched at checkout |
| CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs | Upstream (Catalog → Ordering) | Sync (gRPC) | Current unit and promotional prices locked onto 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 lines |
| ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs | Downstream (Ordering → Shopping) | Async (Commands & Events) | Place orderCommandv1.0.0Place orderShared Finance order-placement command consumed by Notification to render and submit a new-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs for basket cleanup; completion or failure outcome events |
| PlatformDomainv1.0.0PlatformProvides cross-cutting capabilities for recurring scheduled triggers and durable, idempotent transactional email notific...Ownerplatform-engineering-teamDiagramOpen docs | Downstream (Ordering → Platform) | Async (Commands) | Order placement, completion, and cancellation email notification commands |
Checkout Consistency & Compensation: Concurrent checkout submissions are serialized using buyer-scoped distributed locking and request idempotency keys. If post-checkout basket cleanup fails after bounded retries, Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs issues a compensation command so Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs soft-deletes the order and suppresses confirmation emails.
Ubiquitous Language Highlights
- Buyer: The named person associated with one or more orders, holding a delivery address distinct from ShoppingDomainv1.0.0ShoppingCoordinates the customer basket and pre-purchase checkout intent, from selecting books through handing an accepted purch...Ownercommerce-fulfillment-teamDiagramOpen docs‘s customer identifier.
- Order: The durable purchase record beginning in
Newand transitioning once to a terminal state (CompletedorCancelled). - Order Item & Order Total: Each line records a book identifier, positive quantity, and locked purchase-time price; the order total is strictly the sum of all line totals.
- New / Completed / Cancelled: Explicit lifecycle states governing when orders are active versus terminally closed.
Architecture Visualizations
Ordering Context Overview
Checkout Handoff & Cleanup Interaction
Loading graph...
Related Governance & Documentation
- Order SystemSystemv1.0.0Order SystemInternal system that creates and manages accepted customer Orders, preserving purchase-time items and prices while ownin...Ownercommerce-fulfillment-teamDiagramOpen docs — Authoritative order persistence and Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs.
- Finance SystemSystemv1.0.0Finance SystemInternal BookWorm workflow system that coordinates post-checkout basket cleanup and order notifications through Durable ...Ownercommerce-fulfillment-teamDiagramOpen docs — Durable post-checkout workflow and Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs.
- Order Lifecycle and Status TransitionsFlowv1.0.0Order Lifecycle and Status TransitionsCheckout creates a New Order owned by Ordering API, Finance coordinates post-order cleanup and notifications, and explic...Ownercommerce-fulfillment-teamView flowOpen docs — Order state transitions and downstream triggers.
- User CheckoutFlowv1.0.0User CheckoutAn authenticated customer checks out a persisted basket through Ordering API; Finance coordinates asynchronous basket cl...Ownercommerce-fulfillment-teamView flowOpen docs — End-to-end checkout, cleanup, and notification workflow.
- Order LifecycleDiagramv1.0.0Order LifecycleBusiness status lifecycle of an accepted Order showing creation in the New state and irreversible transitions to Complet...Ownercommerce-fulfillment-teamOpen diagram — Order status transition model.
- ADR-BW-006: Keep business state and persistence access capability-ownedDecision Recordv1.0.0ADR-BW-006: Keep business state and persistence access capability-ownedPreserve one accountable owner for each business model and integrate through contracts rather than shared mutable tables...Ownerarchitecture-enabling-teamOpen docs — Service-owned persistence isolation.
- ADR-BW-008: Persist configured broker handoffs with local inboxes and outboxesDecision Recordv1.0.0ADR-BW-008: Persist configured broker handoffs with local inboxes and outboxesUse the shared event framework's per-service durable message storage without claiming exactly-once business effects.Ownerplatform-engineering-teamOpen docs — Durable inbox/outbox message handoffs.
- GlossaryCustom DocGlossaryShared plain-language definitions for BookWorm domain concepts, architecture terms, and recurring acronyms.Ownerarchitecture-enabling-teamOpen doc — Canonical order, buyer, and lifecycle definitions.