Warehouse management (WMS) · Supporting domain · EventStorming board
slotting-optimization
Proposes which SKU belongs in which forward pick slot, from recent demand. A planner reviews each plan; only an approved plan changes the map.
- events published
- 3
- commands
- 11
- policies
- 13
- read models
- 9
- hot spots
- 4
The story in 3 key events
The pivotal events: the few that matter most, in the order they happen.
Listens to (4): contexts whose events this one reacts to
Tells (3): contexts that react to its events
The board, row by row
12 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
-
Draft a slot plan
A planner asks for a plan. SKUs are ranked by recent picks, and each gets the best slot it fits. The plan lists the moves and the SKUs it could not place. Nothing on the floor changes yet.
ActorPlannerPolicyRank SKUs by picks, keep a SKU in its slot when still eligible, give the rest the best free slotRead modelSKU velocityRead modelProduct copyRead modelSlot copyRead modelCurrent forward-slot mapCommandGeneratePlan POST /slot-plansAggregateSlotPlan EventSlotPlan Generated Source: application/usecases/generate_plan.go · domain/slotplan/plan.go · domain/planning/planner.go
-
Approve a plan
The planner approves a Draft plan. The site's earlier approved plan is replaced in the same step, so each site has one. The event carries the whole map and every move, so nobody has to ask back.
ActorPlannerCommandApprovePlan POST /slot-plans/{planId}/approvalsAggregateSlotPlan EventSlotPlan Approved Systemwes-work- planning PolicyPlans one relocation job for each move of the planSysteminventory-storage PolicyUpdates its own view of the forward facesSystempick-face- replenishment PolicyReplaces its map of which SKU sits on which forward faceSource: application/usecases/decide_plan.go · domain/slotplan/plan.go
-
Reject a plan
The planner turns a Draft plan down, with an optional reason. The forward-slot map stays as it was.
ActorPlannerCommandRejectPlan POST /slot-plans/{planId}/rejectionsAggregateSlotPlan EventSlotPlan Rejected Source: application/usecases/decide_plan.go · domain/slotplan/plan.go
-
Keep the demand copy
order-management reports what each site's order lines demand. The latest report for a line wins, and a removed line stays on file as inactive.
Systemorder-management EventSiteSku Demand Changed PolicyWhenever demand for a line changes, store the latest state of that lineCommandApplyDemand started by the policyChanged Read model · kept up to dateDemand copySource: application/usecases/consumers.go · adapters/inbound/kafka/demand_consumer.go
-
Keep the handling class copy
product-master classifies SKUs. Slotting keeps the handling tags and temperature class, so hazmat and cold goods only go to slots that suit them.
Systemproduct-master EventProductClassified PolicyWhenever a product is classified, keep the copy only if the version is newerCommandApplyProduct started by the policyClassified Read model · kept up to dateProduct copySource: application/usecases/consumers.go · adapters/inbound/kafka/product_consumer.go
-
Keep the unit size copy
product-master reports a unit's declared or measured size. Slotting keeps the size in use, because a SKU without a size cannot be placed and is listed as unassigned.
Systemproduct-master EventProductDimensions Declared PolicyWhenever a unit size is declared or measured, keep the effective size if the version is newerCommandApplyPhysical started by the policyProfile Read model · kept up to dateProduct copySource: application/usecases/consumers.go · adapters/inbound/kafka/product_consumer.go
-
Keep the pack level copy
A SKU is planned onto a case-pick face only if it has an active case level with a size. Slotting keeps the declared, retired and measured pack levels, so it never asks product-master.
Systemproduct-master EventProductPack Level Declared PolicyWhenever a pack level is declared, retired or measured, keep the newer versionCommandApplyPack started by the policyLevel Declared Read model · kept up to datePack levels copySource: application/usecases/pack_level.go · adapters/inbound/kafka/packlevel_consumer.go · 0012-case-pick-faces.md
-
Keep the zone list
facility-layout announces each zone with its temperature class and hazmat flag. Slotting keeps them to know which zones are forward zones and what they can hold.
Systemfacility-layout EventZoneRegistered PolicyWhenever a zone is registered, store or refresh itCommandApplyZone started by the policyRegistered Read model · kept up to dateZone copySource: application/usecases/consumers.go · adapters/inbound/kafka/layout_consumer.go
-
Keep the slot list
facility-layout announces every location slot with its weight and volume limits. Slotting keeps them, and a slot that was decommissioned is never brought back by a late message.
Systemfacility-layout EventLocationSlot Registered PolicyWhenever a slot is registered, store or refresh it, unless it is already decommissionedCommandApplyLocation started by the policySlot Registered Read model · kept up to dateSlot copySource: application/usecases/consumers.go · adapters/inbound/kafka/layout_consumer.go
-
Drop a decommissioned slot
When a slot is decommissioned it stops being a candidate for good, even if slotting never saw it registered.
Systemfacility-layout EventLocationSlot Decommissioned PolicyWhenever a slot is decommissioned, mark it inactive for goodCommandApplyLocation started by the policySlot Decommissioned Read model · kept up to dateSlot copySource: application/usecases/consumers.go · adapters/inbound/kafka/layout_consumer.go
-
Track how far a plan is executed
inventory-storage reports each stock relocation. When it matches a move of an approved plan, slotting records the move as done, once per relocation. The plan then shows moves done out of total.
Systeminventory-storage EventStockRelocated PolicyWhenever stock is relocated for slotting, record the matching plan move as executedCommandRecordRelocation started by the policyRead model · kept up to datePlan execution progressSource: application/usecases/record_relocation.go · adapters/inbound/kafka/stock_consumer.go · domain/slotplan/execution.go
-
Feed the plan funnel report
Every plan event is also written to a separate stream. A reporting service counts plans generated, approved and rejected per day, and how long approval took.
Event · earlierSlotPlan Approved PolicyWhenever a plan decision is published, add it to the funnel report's own copyRead model · kept up to dateSlot plan funnel reportSource: adapters/inbound/kafka/analytics_consumer.go · 0006-analytics-read-side.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 spotSlots are ranked by location code, not travel distance, because layout events carry none. "Best" slot means "first code".
Source: adr/0002-slotplan-aggregate-and-abc-velocity-policy.md
- Hot spotNever checked on live data: that the forward zone code is FWD and that a demand site id equals a facility site code. If not, plans come out short.
- Hot spotExecution progress is advisory. A newer plan can be approved while the previous one is half executed.
Source: adr/0010-approved-slot-plans-are-executed-as-wes-relocation-work.md
- Hot spotA better-ranked SKU can take another SKU's slot and set off a chain of relocations. Accepted for v1 and visible in the moves.
Source: adr/0002-slotplan-aggregate-and-abc-velocity-policy.md
Opportunities
- OpportunityHolding new proposals until the previous plan is executed would need a new decision. Not built.
Source: adr/0010-approved-slot-plans-are-executed-as-wes-relocation-work.md
- OpportunityReplenishment min/max, shared slots, reserve-zone slotting and automatic approval are all named as later decisions.
Source: adr/0002-slotplan-aggregate-and-abc-velocity-policy.md
This board is a reconstruction from the code and documentation of slotting-optimization at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.