Warehouse management (WMS) · Supporting domain · EventStorming board
inbound-receiving
Receives deliveries at the dock: from an announced ASN to a closed, counted receipt.
- events published
- 12
- commands
- 13
- policies
- 17
- read models
- 7
- hot spots
- 4
The story in 5 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventASNRegistered
- Pivotal eventReceipt
Opened - Pivotal eventReceipt
Line Received - Pivotal eventReceipt
Closed - Pivotal eventReceipt
Stow Completed
Listens to (5): contexts whose events this one reacts to
Tells (5): contexts that react to its events
The board, row by row
14 rows, in the order the business story happens: the main path first, then how this context reacts to the others, then the clock. Rows are small stories; read each one left to right.
- Event
- Command
- Actor
- Aggregate
- Policy
- Read model
- External system
- Hot spot
- Opportunity
-
Announce a delivery
A supplier announces what is coming. The ASN is only accepted if every SKU on it is a product the warehouse knows.
ActorSupplierRead modelKnown SKUsCommandRegisterAsn POST /asnsAggregateAsnEventASNRegisteredSystemdock-scheduling PolicyFeeds its ASN view so a door can be plannedSystemyard-management PolicyFeeds its inbound viewsSource: application/usecases/asn.go · domain/asn/asn.go
-
Cancel an announcement
The supplier withdraws the announcement. It only works while nothing has been received yet.
ActorSupplierCommandCancelAsn POST /asns/{asnNumber}/cancellationsAggregateAsnEventASNCancelledSystemdock-scheduling PolicyCancels a booking when all its ASNs are cancelledSource: application/usecases/asn.go · domain/asn/asn.go
-
Keep the appointments copy
The dock booking lives in dock-scheduling. Here a read-only copy follows its bookings, reschedules and door changes, so receiving never has to ask.
Systemdock-scheduling EventDockAppointment Booked PolicyWhenever an inbound appointment is booked, cancelled or moved, update the local copyCommandApplyDock started by the policyAppointment Booked Read model · kept up to dateAppointments copySource: application/usecases/consumers_appointment.go · adapters/inbound/kafka/dock_appointment_consumer.go
-
Keep the product list
Every product that product-master registers becomes a known SKU, so an ASN can be checked without a live call.
Systemproduct-master EventProductRegistered PolicyWhenever a product is registered, add its SKU to the known SKUsCommandApplyProduct started by the policyRegistered Read model · kept up to dateKnown SKUsSource: application/usecases/consumers.go · adapters/inbound/kafka/product_consumer.go
-
Keep the dock-door list
Only inbound dock doors matter here. facility-layout announces every location slot; receiving keeps the doors it can use.
Systemfacility-layout EventLocationSlot Registered PolicyWhenever a slot is registered, keep it only if it is an inbound dock doorCommandApplyLocation started by the policySlot Registered Read model · kept up to dateDock doorsSource: application/usecases/consumers.go · adapters/inbound/kafka/dock_door_consumer.go
-
Set how much difference a supplier may ship
An operator sets, per owner and supplier, how far a delivery may be over or under the ASN. Inside the band it is accepted, above it the clerk needs a reason, past the hard stop it is refused. Nothing outside reads it yet.
ActorOperatorCommandDeclareReceiving POST /receiving-policiesPolicy AggregateReceivingPolicy EventReceivingPolicy Declared Source: application/usecases/policy.go · domain/policy/receiving_policy.go · 0026-receiving-tolerance-policy-bands-override-and-hard-stop.md
-
Open a receipt at the door
The truck is at the door. Dock staff open a receipt for the ASN, with or without an appointment, and the ASN moves to Receiving.
ActorDock staffRead modelAppointments copyRead modelDock doorsCommandOpenReceipt POST /receiptsAggregateReceiptEventReceiptOpened EventAsnLate For Arrival Systemyard-management PolicyFeeds its inbound viewsSource: application/usecases/receipt.go · application/usecases/asn_late.go · domain/receipt/receipt.go
-
Count a line
Dock staff count what is on the pallet and record it as Good or Damaged. Only Good units become stock.
ActorDock staffCommandReceiveLine POST /receipts/{receiptId}/linesAggregateReceiptEventReceiptLine Received Systeminventory-storage PolicyBooks the Good units as staged stockSource: application/usecases/receipt.go · domain/receipt/receipt.go
-
Receive by scan
Dock staff scan a carton label. An accepted carton books its contents; a refused scan is not an error, it becomes a recorded finding.
ActorDock staffRead modelKnown SKUsRead modelPackaging viewRead modelSupplier tolerance bandsCommandReceiveScan POST /receipts/{receiptId}/scansAggregateReceiptEventReceiptCarton Received EventCartonDiscrepancy Raised Systeminventory-storage PolicyCreates or links the carton's containerSystemnetwork-fulfillment PolicyKeeps a copy of the carton and the findingSystemexception-management PolicyHandles the discrepancySource: application/usecases/scan.go · application/usecases/scan_receive.go · domain/receipt/carton_accept.go · 0026-receiving-tolerance-policy-bands-override-and-hard-stop.md
-
Close the receipt
Dock staff close the receipt. Differences inside the supplier's band are accepted; the rest are reported against the ASN, missing cartons are flagged and the receiving advice is sent.
ActorDock staffRead modelSupplier tolerance bandsCommandCloseReceipt POST /receipts/{receiptId}/closuresAggregateReceiptEventReceiptClosed EventReceivingAdvice Issued EventCartonDiscrepancy Raised Systemnetwork-fulfillment PolicyKeeps a copy of the closed receiptSystemyard-management PolicyFeeds its inbound viewsSource: application/usecases/receipt.go · application/usecases/advice.go · domain/receipt/advice.go · 0026-receiving-tolerance-policy-bands-override-and-hard-stop.md
-
Complete the ASN
When the receipt closes, the ASN closes with it, in the same transaction. Nobody has to remember to do it.
Event · earlierReceiptClosed PolicyWhenever a receipt closes, close its ASN in the same transactionCommandCompleteAsn started by the policyAggregateAsn -
Measure dock-to-stock: the gate
The yard reports when the truck reached the gate. That is the start of the dock-to-stock clock.
Systemyard-management EventVisitChecked In PolicyWhenever a visit checks in, store the arrival and check whether the evidence is completeCommandEvaluateDock started by the policyTo Stock AggregateReceiptEventReceiptStow Completed Read model · kept up to dateGate arrivalsSource: application/usecases/consumers_stow.go · domain/receipt/stow.go
-
Measure dock-to-stock: the shelf
inventory-storage reports when a carton was stowed. When the last Good carton is on the shelf, the dock-to-stock time is known.
Systeminventory-storage EventContainerStowed PolicyWhenever a container is stowed, store the stow and check whether the evidence is completeCommandEvaluateDock started by the policyTo Stock AggregateReceiptEventReceiptStow Completed Read model · kept up to dateCarton stowsSource: application/usecases/consumers_stow.go · domain/receipt/stow.go
-
Chase a late advice
A periodic sweep looks for open receipts whose receiving advice is past its deadline and raises an overdue notice.
TimeHousekeeping sweepPolicyEvery sweep, any open receipt past its advice deadline raises an overdue noticeCommandSweepAdvice started by the clockOverdue AggregateReceiptEventReceivingAdvice Overdue Source: application/usecases/advice.go · 0023-receiving-advice-at-close-with-standard-discrepancy-vocabulary.md
Hot spots and opportunities
Open questions and known gaps, each taken from a decision record or a document in the repository, never invented. Opportunities are improvements the documentation already names.
- Hot spotTolerance bands are per supplier only. A product-class band waits until product-master publishes a class this service can copy.
Source: adr/0026-receiving-tolerance-policy-bands-override-and-hard-stop.md
- Hot spotDamaged units are counted but have no quarantine flow. They are not booked as stock.
- Hot spotIf inventory-storage rejects a line, it skips and logs. The receipt stays the source of truth, nothing compensates.
- Hot spotThe deprecated appointment routes stay in the API pending a decision, although dock-scheduling owns appointments.
Source: adr/0022-stage-e-removes-the-backfill-the-legacy-encoders-and-replay.md
Opportunities
- OpportunityThe receiving advice has no reader yet. Partner connectivity could send it back to the supplier.
Source: adr/0023-receiving-advice-at-close-with-standard-discrepancy-vocabulary.md
This board is a reconstruction from the code and documentation of inbound-receiving at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.