Warehouse management (WMS) · Supporting domain · EventStorming board

product-master

Owns what a SKU is: its description, handling class, unit size and pack levels with their barcodes (GTINs). Other contexts keep copies.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

events published
8
commands
7
policies
21
read models
2
hot spots
5

The story in 4 key events

The pivotal events: the few that matter most, in the order they happen.

  1. Pivotal eventProductRegistered
  2. Pivotal eventProductClassified
  3. Pivotal eventProductMeasured
  4. Pivotal eventProductPackLevelDeclared

Listens to (0): contexts whose events this one reacts to

none

Tells (9): contexts that react to its events

The board, row by row

10 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. Register a product

    A steward registers a new SKU. Nothing else can be said about a SKU until it exists: classifying or sizing an unknown SKU is refused, never an implicit registration.

    ActorMaster-data steward
    CommandRegisterProductPUT /products/{sku}
    AggregateProduct
    EventProductRegistered
    Systeminbound-receiving
    PolicyAdds the SKU to its known SKUs, so an ASN line for it is accepted

    Source: application/usecases/register_product.go · domain/product/product.go

  2. Change a product's description

    The steward sends new text for a SKU that already exists. The same text again changes nothing and raises no event.

    ActorMaster-data steward
    CommandRegisterProductPUT /products/{sku}
    AggregateProduct
    EventProductDescriptionChanged

    Source: application/usecases/register_product.go · domain/product/product.go

  3. Classify a product for handling

    The steward sets the handling tags (such as hazmat or fragile), the temperature class and the hazard class. A later classification replaces the earlier one. Other contexts keep their own copy.

    ActorMaster-data steward
    CommandClassifyProductPUT /products/{sku}/classification
    AggregateProduct
    EventProductClassified
    Systeminventory-storage
    PolicyKeeps a copy for stow-time placement and segregation checks
    Systemorder-management
    PolicyKeeps a copy to enrich incoming orders
    Systemwes-work-planning
    PolicyKeeps a copy for the capabilities and the fragile flag at release
    Systemfulfillment-execution
    PolicyKeeps a copy for segregation checks when sealing a package
    Systemslotting-optimization
    PolicyKeeps tags and temperature class to match SKUs to slots
    Systemreturns-processing
    PolicyKeeps a copy of each SKU's handling class

    Source: application/usecases/classify_product.go · domain/product/classification.go · domain/product/product.go

  4. Declare a unit's size and weight

    The steward states the length, width, height and weight of one unit, as the vendor or catalogue says. Values outside the allowed range are refused.

    ActorMaster-data steward
    CommandDeclareDimensionsPUT /products/{sku}/dimensions/declared
    AggregateProduct
    EventProductDimensionsDeclared
    Systemslotting-optimization
    PolicyRefreshes the unit size it uses to fit SKUs into slots

    Source: application/usecases/physical_profile.go · domain/product/physical.go

  5. Record a measured unit

    A dimensioning device or a person reports what one real unit measures. The latest reading wins and an older one is refused. More than 10 % off the declared size is flagged, not rejected.

    ActorDimensioning device or operator
    CommandRecordMeasurementPUT /products/{sku}/dimensions/measured
    AggregateProduct
    EventProductMeasured
    Systemslotting-optimization
    PolicyUses the measured size in place of the declared one

    Source: application/usecases/physical_profile.go · domain/product/physical.go

  6. Declare a pack level and its GTIN

    The steward declares a pack level (each, inner, case or pallet) with its barcode and how many units it holds. A barcode can identify only one SKU and level, fleet-wide and for ever.

    ActorMaster-data steward
    Read modelGTINs already assigned
    CommandDeclarePackLevelPUT /products/{sku}/pack-levels/{level}
    AggregateProduct
    EventProductPackLevelDeclared
    Systeminbound-receiving
    PolicyKeeps a packaging view so a scanned barcode resolves to a SKU and a unit count
    Systeminventory-storage
    PolicyKeeps its own packaging view of levels and GTINs
    Systemslotting-optimization
    PolicyKeeps pack sizes to plan case-pick faces
    Systemfulfillment-execution
    PolicyKeeps the pack levels for scan checks
    Systempick-face-replenishment
    PolicyKeeps a copy of the pack levels
    Systemnetwork-inventory-planning
    PolicyKeeps a pack-level view

    Source: application/usecases/pack_levels.go · domain/product/packaging_level_def.go

  7. Switch a level to a new GTIN

    Declaring a different barcode at a level that is already active retires the old one as superseded and declares the new one, in one step. The old GTIN stays resolvable for ASNs still in flight.

    ActorMaster-data steward
    CommandDeclarePackLevelPUT /products/{sku}/pack-levels/{level}
    AggregateProduct
    EventProductPackLevelRetired
    EventProductPackLevelDeclared
    Systeminbound-receiving
    PolicyEnds the old GTIN in its packaging view and adds the new one
    Systeminventory-storage
    PolicyEnds the old GTIN in its packaging view and adds the new one

    Source: application/usecases/pack_levels.go · domain/product/packaging_level_def.go

  8. Retire a pack level

    The steward ends a pack level. The level and its GTIN are kept for look-ups. Retiring a level that is already retired changes nothing.

    ActorMaster-data steward
    CommandRetirePackLevelPOST /products/{sku}/pack-levels/{level}/retirements
    AggregateProduct
    EventProductPackLevelRetired
    Systemslotting-optimization
    PolicyPlans a SKU whose case level is retired on an each-pick face
    Systempick-face-replenishment
    PolicyEnds the level in its copy of the pack levels

    Source: application/usecases/pack_levels.go · domain/product/packaging_level_def.go

  9. Record a measured pack

    A device or operator measures one pack of an active level, such as a case. Like a unit reading, an older one is refused, and a weight below the contents is refused.

    ActorDimensioning device or operator
    CommandRecordPackLevelMeasurementPUT /products/{sku}/pack-levels/{level}/measured
    AggregateProduct
    EventProductPackLevelMeasured
    Systemslotting-optimization
    PolicyKeeps the measured size with its copy of the pack level

    Source: application/usecases/pack_levels.go · domain/product/physical.go

  10. Feed the data quality report

    Each unit event is also written to a separate stream. A reporting service folds it into a data quality view: how many SKUs are registered, classified, sized and measured.

    Event · earlierProductMeasured
    PolicyWhenever a product event is published, add it to the data quality report's own copy
    Read model · kept up to dateMaster data quality 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 product-master at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.