Warehouse management (WMS) · Supporting domain · EventStorming board

inbound-receiving

Receives deliveries at the dock: from an announced ASN to a closed, counted receipt.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

events published
12
commands
13
policies
17
read models
7
hot spots
4

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
  1. 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.

    ActorSupplier
    Read modelKnown SKUs
    CommandRegisterAsnPOST /asns
    AggregateAsn
    EventASNRegistered
    Systemdock-scheduling
    PolicyFeeds its ASN view so a door can be planned
    Systemyard-management
    PolicyFeeds its inbound views

    Source: application/usecases/asn.go · domain/asn/asn.go

  2. Cancel an announcement

    The supplier withdraws the announcement. It only works while nothing has been received yet.

    ActorSupplier
    CommandCancelAsnPOST /asns/{asnNumber}/cancellations
    AggregateAsn
    EventASNCancelled
    Systemdock-scheduling
    PolicyCancels a booking when all its ASNs are cancelled

    Source: application/usecases/asn.go · domain/asn/asn.go

  3. 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
    EventDockAppointmentBooked
    PolicyWhenever an inbound appointment is booked, cancelled or moved, update the local copy
    CommandApplyDockAppointmentBookedstarted by the policy
    Read model · kept up to dateAppointments copy

    Source: application/usecases/consumers_appointment.go · adapters/inbound/kafka/dock_appointment_consumer.go

  4. 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 SKUs
    CommandApplyProductRegisteredstarted by the policy
    Read model · kept up to dateKnown SKUs

    Source: application/usecases/consumers.go · adapters/inbound/kafka/product_consumer.go

  5. 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
    EventLocationSlotRegistered
    PolicyWhenever a slot is registered, keep it only if it is an inbound dock door
    CommandApplyLocationSlotRegisteredstarted by the policy
    Read model · kept up to dateDock doors

    Source: application/usecases/consumers.go · adapters/inbound/kafka/dock_door_consumer.go

  6. 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.

    ActorOperator
    CommandDeclareReceivingPolicyPOST /receiving-policies
    AggregateReceivingPolicy
    EventReceivingPolicyDeclared

    Source: application/usecases/policy.go · domain/policy/receiving_policy.go · 0026-receiving-tolerance-policy-bands-override-and-hard-stop.md

  7. 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 staff
    Read modelAppointments copy
    Read modelDock doors
    CommandOpenReceiptPOST /receipts
    AggregateReceipt
    EventReceiptOpened
    EventAsnLateForArrival
    Systemyard-management
    PolicyFeeds its inbound views

    Source: application/usecases/receipt.go · application/usecases/asn_late.go · domain/receipt/receipt.go

  8. Count a line

    Dock staff count what is on the pallet and record it as Good or Damaged. Only Good units become stock.

    ActorDock staff
    CommandReceiveLinePOST /receipts/{receiptId}/lines
    AggregateReceipt
    EventReceiptLineReceived
    Systeminventory-storage
    PolicyBooks the Good units as staged stock

    Source: application/usecases/receipt.go · domain/receipt/receipt.go

  9. 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 staff
    Read modelKnown SKUs
    Read modelPackaging view
    Read modelSupplier tolerance bands
    CommandReceiveScanPOST /receipts/{receiptId}/scans
    AggregateReceipt
    EventReceiptCartonReceived
    EventCartonDiscrepancyRaised
    Systeminventory-storage
    PolicyCreates or links the carton's container
    Systemnetwork-fulfillment
    PolicyKeeps a copy of the carton and the finding
    Systemexception-management
    PolicyHandles the discrepancy

    Source: application/usecases/scan.go · application/usecases/scan_receive.go · domain/receipt/carton_accept.go · 0026-receiving-tolerance-policy-bands-override-and-hard-stop.md

  10. 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 staff
    Read modelSupplier tolerance bands
    CommandCloseReceiptPOST /receipts/{receiptId}/closures
    AggregateReceipt
    EventReceiptClosed
    EventReceivingAdviceIssued
    EventCartonDiscrepancyRaised
    Systemnetwork-fulfillment
    PolicyKeeps a copy of the closed receipt
    Systemyard-management
    PolicyFeeds its inbound views

    Source: application/usecases/receipt.go · application/usecases/advice.go · domain/receipt/advice.go · 0026-receiving-tolerance-policy-bands-override-and-hard-stop.md

  11. 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 transaction
    CommandCompleteAsnstarted by the policy
    AggregateAsn

    Source: application/usecases/receipt.go · domain/asn/asn.go

  12. 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
    EventVisitCheckedIn
    PolicyWhenever a visit checks in, store the arrival and check whether the evidence is complete
    CommandEvaluateDockToStockstarted by the policy
    AggregateReceipt
    EventReceiptStowCompleted
    Read model · kept up to dateGate arrivals

    Source: application/usecases/consumers_stow.go · domain/receipt/stow.go

  13. 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 complete
    CommandEvaluateDockToStockstarted by the policy
    AggregateReceipt
    EventReceiptStowCompleted
    Read model · kept up to dateCarton stows

    Source: application/usecases/consumers_stow.go · domain/receipt/stow.go

  14. Chase a late advice

    A periodic sweep looks for open receipts whose receiving advice is past its deadline and raises an overdue notice.

    TimeHousekeeping sweep
    PolicyEvery sweep, any open receipt past its advice deadline raises an overdue notice
    CommandSweepAdviceOverduestarted by the clock
    AggregateReceipt
    EventReceivingAdviceOverdue

    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.

Opportunities

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.