Skip to content
Event storming templates

Event Storm — Order Fulfilment

Retail order fulfilment across ordering, warehouse and delivery contexts, with two cross-context policies and an uncommanded delivery event the storm leaves on the wall.

Template previewEvent storming
Order fulfilment — big picture stormBounded contexts3Domain events6Event coverage83.3%Hotspots3Model smells1Domain eventCommandActorAggregatePolicyRead modelExternal systemHotspotOrdering2 events · 2 commands · 1 policy · 1 hotspotOrderWarehouse2 events · 2 commands · 2 policies · 1 hotspotReservationReservationDelivery2 events · 1 command · 0 policies · 1 hotspotShipmentCustomerPlace orderOrder placedOrder confirmationCustomerApply promotion codePromotion appliedStripe paymentsWho owns the basketonce payment hasstarted?When order placed,reserve stockFulfilment serviceReserve stockStock reservedWhen stock reserved,pick and packWarehouse operativePick and packParcel packedA reserved SKU isdamaged in the aisleWhen parcel packed,book courierDespatch serviceBook courierCourier bookedWhere is my orderParcel deliveredCarrier tracking APIFailed delivery —refund or redeliver?Workshop checksEvents with no producing command1Parcel deliveredCommands with no resulting event0noneCommands with no aggregate0noneAggregates with no events0nonePolicies with a missing trigger event0nonePolicies with a missing command0noneHotspots per context3Ordering 1 · Warehouse 1 · Delivery 1Cross-context flows2Ordering → Warehouse · Warehouse → Delivery

Make it your own.

title "Order fulfilment — big picture storm"

context "Ordering"
  actor Customer
  aggregate Order
  # `emits` is the mirror of the event's `from` — either dialect links the pair.
  command "Place order" by Customer on Order emits "Order placed"
  event "Order placed"
  readmodel "Order confirmation"
  command "Apply promotion code" by Customer on Order
  event "Promotion applied" from "Apply promotion code"
  external "Stripe payments"
  hotspot "Who owns the basket once payment has started?"
  policy "When order placed, reserve stock" then "Reserve stock"

context "Warehouse"
  aggregate Reservation
  command "Reserve stock" by "Fulfilment service" on Reservation
  event "Stock reserved" from "Reserve stock"
  policy "When stock reserved, pick and pack" then "Pick and pack"
  command "Pick and pack" by "Warehouse operative" on Reservation
  event "Parcel packed" from "Pick and pack"
  hotspot "A reserved SKU is damaged in the aisle"
  policy "When parcel packed, book courier" then "Book courier"

context "Delivery"
  aggregate Shipment
  command "Book courier" by "Despatch service" on Shipment
  event "Courier booked" from "Book courier"
  readmodel "Where is my order"
  event "Parcel delivered" on Shipment
  external "Carrier tracking API"
  hotspot "Failed delivery — refund or redeliver?"