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.
- 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.
- Pivotal eventProduct
Registered - Pivotal eventProduct
Classified - Pivotal eventProduct
Measured - Pivotal eventProduct
Pack Level Declared
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
-
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 stewardCommandRegisterProduct PUT /products/{sku}AggregateProductEventProductRegistered Systeminbound-receiving PolicyAdds the SKU to its known SKUs, so an ASN line for it is acceptedSource: application/usecases/register_product.go · domain/product/product.go
-
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 stewardCommandRegisterProduct PUT /products/{sku}AggregateProductEventProductDescription Changed Source: application/usecases/register_product.go · domain/product/product.go
-
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 stewardCommandClassifyProduct PUT /products/{sku}/classificationAggregateProductEventProductClassified Systeminventory-storage PolicyKeeps a copy for stow-time placement and segregation checksSystemorder-management PolicyKeeps a copy to enrich incoming ordersSystemwes-work- planning PolicyKeeps a copy for the capabilities and the fragile flag at releaseSystemfulfillment-execution PolicyKeeps a copy for segregation checks when sealing a packageSystemslotting-optimization PolicyKeeps tags and temperature class to match SKUs to slotsSystemreturns-processing PolicyKeeps a copy of each SKU's handling classSource: application/usecases/classify_product.go · domain/product/classification.go · domain/product/product.go
-
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 stewardCommandDeclareDimensions PUT /products/{sku}/dimensions/declaredAggregateProductEventProductDimensions Declared Systemslotting-optimization PolicyRefreshes the unit size it uses to fit SKUs into slotsSource: application/usecases/physical_profile.go · domain/product/physical.go
-
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 operatorCommandRecordMeasurement PUT /products/{sku}/dimensions/measuredAggregateProductEventProductMeasured Systemslotting-optimization PolicyUses the measured size in place of the declared oneSource: application/usecases/physical_profile.go · domain/product/physical.go
-
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 stewardRead modelGTINs already assignedCommandDeclarePack PUT /products/{sku}/pack-levels/{level}Level AggregateProductEventProductPack Level Declared Systeminbound-receiving PolicyKeeps a packaging view so a scanned barcode resolves to a SKU and a unit countSysteminventory-storage PolicyKeeps its own packaging view of levels and GTINsSystemslotting-optimization PolicyKeeps pack sizes to plan case-pick facesSystemfulfillment-execution PolicyKeeps the pack levels for scan checksSystempick-face- replenishment PolicyKeeps a copy of the pack levelsSystemnetwork-inventory- planning PolicyKeeps a pack-level viewSource: application/usecases/pack_levels.go · domain/product/packaging_level_def.go
-
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 stewardCommandDeclarePack PUT /products/{sku}/pack-levels/{level}Level AggregateProductEventProductPack Level Retired EventProductPack Level Declared Systeminbound-receiving PolicyEnds the old GTIN in its packaging view and adds the new oneSysteminventory-storage PolicyEnds the old GTIN in its packaging view and adds the new oneSource: application/usecases/pack_levels.go · domain/product/packaging_level_def.go
-
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 stewardCommandRetirePack POST /products/{sku}/pack-levels/{level}/retirementsLevel AggregateProductEventProductPack Level Retired Systemslotting-optimization PolicyPlans a SKU whose case level is retired on an each-pick faceSystempick-face- replenishment PolicyEnds the level in its copy of the pack levelsSource: application/usecases/pack_levels.go · domain/product/packaging_level_def.go
-
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 operatorCommandRecordPack PUT /products/{sku}/pack-levels/{level}/measuredLevel Measurement AggregateProductEventProductPack Level Measured Systemslotting-optimization PolicyKeeps the measured size with its copy of the pack levelSource: application/usecases/pack_levels.go · domain/product/physical.go
-
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 copyRead model · kept up to dateMaster data quality 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 spotA SKU classified moments before its first stow may reach a consumer late. Consumers keep their own rules for an unknown SKU.
- Hot spotThe size tolerance is fixed at 10 %, and only the latest measurement is kept, with no history of readings.
- Hot spotA classification can be replaced but never removed: there is no unclassify command or event.
Source: docs/ddd/domain-events.md
- Hot spotWeighed, variable-measure items are refused: a GTIN with indicator digit 9 is rejected in v1.
- Hot spotAfter the publisher gives up on a stuck message, later ones overtake it, even for the same SKU. Consumers rely on the version to cope.
Opportunities
- OpportunityExpected package weight at the weigh check, slot fit at stow and cube-based capacity could use the effective unit size. None is built.
- OpportunityA per-category size tolerance instead of the fixed 10 % is named as a later decision.
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.