flow

Place an Order

The end-to-end journey from a customer checking out their cart to a confirmed order — spanning the Shopping and Ordering domains, including the checkout saga and its failure path.

Flow

Overview

Place an Order is the headline business flow at Acme Inc. It begins in the ShoppingShoppingDomainv1.0.0The Shopping domain owns the customer's path to purchase — building a cart, applying promotions, and checking out. It co...Ownershopping-platformMapView docs domain, when a shopper checks out their cart, and finishes in the OrderingOrderingDomainv1.0.0The Ordering domain turns a checked-out cart into a confirmed order. It orchestrates checkout — reserving inventory, aut...Ownerordering-platformMapView docs domain, with a confirmed order — or a compensated, cancelled one if a step fails.

How it works

  1. The shopper checks out — the Cart APICart APIServicev1.0.0The public-facing API for shopping carts. Handles commands to add and remove items and to check out, and publishes an ev...Publishescart-checked-out, calculate-discountSubscribesadd-item-to-cart, remove-item-from-cart +1APIsOpenAPIOwnershopping-platformMapRepoView docs prices the cart and publishes Cart Checked OutCart Checked OutEventv1.0.0Published when a customer has checked out their cart. Ownershopping-platformSchemaMapView docs.
  2. The Checkout APICheckout APIServicev1.0.0The entry point to the Checkout System. Receives the checkout command from the Shopping domain and starts the checkout f...Subscribescheckout-cartOwnerordering-platformMapRepoView docs picks this up and hands it to the Checkout OrchestratorCheckout OrchestratorServicev1.0.0Runs the checkout saga. Reserves inventory, authorizes payment and creates the order, coordinating the steps that turn a...Publishesreserve-inventory, authorize-payment +1Ownerordering-platformMapRepoView docs.
  3. The orchestrator runs the saga: Reserve InventoryReserve InventoryCommandv1.0.0Command to reserve stock for the items in a checked-out cart. Ownerordering-platformSchemaMapView docs then Authorize PaymentAuthorize PaymentCommandv1.0.0Command to authorize payment for the total of a checked-out cart. Ownerordering-platformSchemaMapView docs.
  4. On success it sends Create OrderCreate OrderCommandv1.0.0Command to create a new order from a checked-out cart. Ownerordering-platformSchemaMapView docs to the Order ServiceOrder ServiceServicev1.0.0The system of record for orders. Creates and cancels orders, serves order lookups, and publishes events as orders move t...Publishesorder-created, order-completed +1Subscribescreate-order, cancel-order +1APIsAsyncAPIOwnerordering-platformMapRepoView docs, which publishes Order CreatedOrder CreatedEventv1.0.0Published when a new order has been created. Ownerordering-platformSchemaMapView docs.
  5. If any step fails, the orchestrator compensates the earlier steps and the order is cancelled via Order CancelledOrder CancelledEventv1.0.0Published when an order has been cancelled. Ownerordering-platformSchemaMapView docs.