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.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

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.

  1. Pivotal eventSlotPlanGenerated
  2. Pivotal eventSlotPlanApproved
  3. Pivotal eventSlotPlanRejected

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

    ActorPlanner
    PolicyRank SKUs by picks, keep a SKU in its slot when still eligible, give the rest the best free slot
    Read modelSKU velocity
    Read modelProduct copy
    Read modelSlot copy
    Read modelCurrent forward-slot map
    CommandGeneratePlanPOST /slot-plans
    AggregateSlotPlan
    EventSlotPlanGenerated

    Source: application/usecases/generate_plan.go · domain/slotplan/plan.go · domain/planning/planner.go

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

    ActorPlanner
    CommandApprovePlanPOST /slot-plans/{planId}/approvals
    AggregateSlotPlan
    EventSlotPlanApproved
    Systemwes-work-planning
    PolicyPlans one relocation job for each move of the plan
    Systeminventory-storage
    PolicyUpdates its own view of the forward faces
    Systempick-face-replenishment
    PolicyReplaces its map of which SKU sits on which forward face

    Source: application/usecases/decide_plan.go · domain/slotplan/plan.go

  3. Reject a plan

    The planner turns a Draft plan down, with an optional reason. The forward-slot map stays as it was.

    ActorPlanner
    CommandRejectPlanPOST /slot-plans/{planId}/rejections
    AggregateSlotPlan
    EventSlotPlanRejected

    Source: application/usecases/decide_plan.go · domain/slotplan/plan.go

  4. 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
    EventSiteSkuDemandChanged
    PolicyWhenever demand for a line changes, store the latest state of that line
    CommandApplyDemandChangedstarted by the policy
    Read model · kept up to dateDemand copy

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

  5. 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 newer
    CommandApplyProductClassifiedstarted by the policy
    Read model · kept up to dateProduct copy

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

  6. 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
    EventProductDimensionsDeclared
    PolicyWhenever a unit size is declared or measured, keep the effective size if the version is newer
    CommandApplyPhysicalProfilestarted by the policy
    Read model · kept up to dateProduct copy

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

  7. 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
    EventProductPackLevelDeclared
    PolicyWhenever a pack level is declared, retired or measured, keep the newer version
    CommandApplyPackLevelDeclaredstarted by the policy
    Read model · kept up to datePack levels copy

    Source: application/usecases/pack_level.go · adapters/inbound/kafka/packlevel_consumer.go · 0012-case-pick-faces.md

  8. 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 it
    CommandApplyZoneRegisteredstarted by the policy
    Read model · kept up to dateZone copy

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

  9. 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
    EventLocationSlotRegistered
    PolicyWhenever a slot is registered, store or refresh it, unless it is already decommissioned
    CommandApplyLocationSlotRegisteredstarted by the policy
    Read model · kept up to dateSlot copy

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

  10. 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
    EventLocationSlotDecommissioned
    PolicyWhenever a slot is decommissioned, mark it inactive for good
    CommandApplyLocationSlotDecommissionedstarted by the policy
    Read model · kept up to dateSlot copy

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

  11. 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 executed
    CommandRecordRelocationstarted by the policy
    Read model · kept up to datePlan execution progress

    Source: application/usecases/record_relocation.go · adapters/inbound/kafka/stock_consumer.go · domain/slotplan/execution.go

  12. 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 · earlierSlotPlanApproved
    PolicyWhenever a plan decision is published, add it to the funnel report's own copy
    Read model · kept up to dateSlot plan funnel report

    Source: 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.

Opportunities

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.