Event catalog for the slotting-optimization bounded context (WMS subdomain): reviewable plans that assign SKUs to forward pick slots, and the human decision taken on them (ADR 0001, ADR 0002).
Published. The SlotPlan aggregate raises three events, published to
warehouse.slotting-optimization.events through a transactional outbox:
the plan row and its already-encoded events are written in ONE database
transaction and a relay drains them to Kafka (at-least-once; the CloudEvents
id is stored with the outbox row, so a retry republishes the same id).
SlotPlanApproved carries the FULL forward assignment map and the moves, so
a consumer needs no lookup; supersedes_plan_id names the previously
Approved plan of the site, if any.
Consumed (ADR 0003, ADR 0010, ADR 0012). SiteSkuDemandChanged from
order-management; ProductClassified, ProductDimensionsDeclared,
ProductMeasured and the three ProductPackLevel* events from
product-master; ZoneRegistered, LocationSlotRegistered and
LocationSlotDecommissioned from facility-layout; StockRelocated from
inventory-storage. Each feeds a durable local copy. Five consumers always
run on real Kafka (env DEMAND_MODE, PRODUCT_MODE, LAYOUT_MODE,
RELOCATION_MODE, PACK_LEVEL_MODE; the only accepted value, and the
default, is kafka: permissive and off are refused at boot) and each
needs its consumer group (DEMAND_CONSUMER_GROUP, PRODUCT_CONSUMER_GROUP,
LAYOUT_CONSUMER_GROUP, RELOCATION_CONSUMER_GROUP,
PACK_LEVEL_CONSUMER_GROUP; boot fails without it). A message that is not a
valid CloudEvent, or whose type is not handled, is skipped. A transient
failure retries the same message up to 5 attempts, then the message goes to
<topic>.dlq with x-dlq-* headers. A handled event whose payload can
never be applied is skipped with a WARN, except for StockRelocated and the
ProductPackLevel* events, which are dead-lettered at once. The consumed
messages below are the producers' own contracts, decoded independently here
and never imported.
Analytics (ADR 0006). The same three events are ALSO published, in
the same transaction and under the same id per occurrence, to
warehouse.slotting-optimization.analytics with
dataschema urn:warehouse:slotting-optimization:analytics:<EventName>:v1.
That stream is not an integration contract: only this service's own
projector (cmd/slotting-projector, consumer group from
ANALYTICS_CONSUMER_GROUP) consumes it, folding it into the slot-plan
funnel read model; cmd/slotting-reports serves the report. Other
contexts keep reading warehouse.slotting-optimization.events.
Envelope (mandatory). CloudEvents 1.0, structured content mode, Kafka
header content-type: application/cloudevents+json; charset=UTF-8.
Optional W3C trace-context headers (traceparent, and tracestate /
baggage when present) carry the trace of the request that wrote the
outbox row (ADR 0009); consumers may extract them, and must not require
them.
specversion, id, source (/warehouse/slotting-optimization), type,
subject (the plan id), time, datacontenttype (application/json) and
dataschema (urn:warehouse:slotting-optimization:<events|analytics>:<EventName>:v1)
are all required. Kafka key = the plan id. Type =
com.warehouse.wms.slotting-optimization.slotplan.<EventName>. A breaking
payload change is a new .v2 type, never a mutation.
Fleet-shared Kafka broker (host supplied by the deployment environment).
This service's integration topic. Written by the outbox relay; key = plan
id; every message carries the CloudEvents content-type header (plus the
optional W3C traceparent of the writing request, ADR 0009). Dispatch on
the full type, ignore unknown types, dedupe on id. A row the relay
excluded after OUTBOX_MAX_ATTEMPTS failures (ADR 0008) is overtaken by
later events of the same plan.
Receive SlotPlan events.
Subscribe to the slotting decisions. Route on the full type
(com.warehouse.wms.slotting-optimization.slotplan.<EventName>). Only
SlotPlanApproved changes the published forward-slot picture.
Available only on servers:
Accepts one of the following messages:
A Draft slot plan was generated.
type = com.warehouse.wms.slotting-optimization.slotplan.SlotPlanGenerated; subject and key = the plan id. Sizes only; the assignments are not part of this event.
A 28-day plan for SITE-1 with 2 assignments, 3 moves and 1 unassigned SKU.
{
"specversion": "1.0",
"id": "6f1d2c3b-4a5e-4b7c-8d9e-0a1b2c3d4e5f",
"source": "/warehouse/slotting-optimization",
"type": "com.warehouse.wms.slotting-optimization.slotplan.SlotPlanGenerated",
"subject": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-08T12:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:slotting-optimization:events:SlotPlanGenerated:v1",
"data": {
"plan_id": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "SITE-1",
"window_from": "2026-09-10T12:00:00Z",
"window_to": "2026-10-08T12:00:00Z",
"policy": "abc-velocity-v1",
"assignment_count": 2,
"move_count": 3,
"unassigned_count": 1
}
}
A Draft slot plan was approved; it is now the site's forward-slot map.
type = com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApproved;
subject and key = the plan id. assignments is the FULL map of the plan
(replace your picture of the site's forward slots from it); moves is
what changes against the previous map. kind is Assign, Relocate or
Vacate; a Vacate omits to_slot and sets from_slot, an Assign
omits from_slot. supersedes_plan_id is omitted when the site had no
Approved plan.
Plan approved; SKU-1 assigned, SKU-2 relocated, SKU-3 vacated.
{
"specversion": "1.0",
"id": "0b9a8c7d-6e5f-4a3b-9c2d-1e0f9a8b7c6d",
"source": "/warehouse/slotting-optimization",
"type": "com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApproved",
"subject": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-08T12:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:slotting-optimization:events:SlotPlanApproved:v1",
"data": {
"plan_id": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "SITE-1",
"approved_at": "2026-10-08T12:30:00Z",
"supersedes_plan_id": "plan-8e7d6c5b-4a39-4281-b0c9-d8e7f6a5b4c3",
"assignments": [
{
"sku": "SKU-1",
"slot": "WH1-FWD-A01-01-01-A"
},
{
"sku": "SKU-2",
"slot": "WH1-FWD-A01-01-02-A"
}
],
"moves": [
{
"sku": "SKU-1",
"to_slot": "WH1-FWD-A01-01-01-A",
"kind": "Assign"
},
{
"sku": "SKU-2",
"from_slot": "WH1-FWD-A02-03-01-A",
"to_slot": "WH1-FWD-A01-01-02-A",
"kind": "Relocate"
},
{
"sku": "SKU-3",
"from_slot": "WH1-FWD-A01-01-03-A",
"kind": "Vacate"
}
]
}
}
A Draft slot plan was rejected.
type = com.warehouse.wms.slotting-optimization.slotplan.SlotPlanRejected; subject and key = the plan id. reason is omitted when none was given.
Plan rejected with a reason.
{
"specversion": "1.0",
"id": "4d3c2b1a-0f9e-4d8c-8b7a-6f5e4d3c2b1a",
"source": "/warehouse/slotting-optimization",
"type": "com.warehouse.wms.slotting-optimization.slotplan.SlotPlanRejected",
"subject": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-08T12:15:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:slotting-optimization:events:SlotPlanRejected:v1",
"data": {
"plan_id": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "SITE-1",
"rejected_at": "2026-10-08T12:15:00Z",
"reason": "Too many relocations before peak season."
}
}
This service's own analytics stream (ADR 0006), written by the SAME
transactional outbox as the integration topic: every published event
appears here too, under the SAME CloudEvents id and type, with only
the dataschema stream segment different
(urn:warehouse:slotting-optimization:analytics::v1). It is
NOT an integration contract: the only consumer is this service's
cmd/slotting-projector (fixed group from ANALYTICS_CONSUMER_GROUP),
which folds the events into the analytical database; its deterministic
poison goes to warehouse.slotting-optimization.analytics.dlq. Other
contexts keep reading warehouse.slotting-optimization.events.
Receive the analytics twin of every SlotPlan event.
Payloads are byte-for-byte the integration payloads (ADR 0006 section 2); only the dataschema names the analytics stream.
Available only on servers:
Accepts one of the following messages:
The analytics-stream twin of SlotPlanGenerated (ADR 0006).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:slotting-optimization:analytics:SlotPlanGenerated:v1. Consumed only by cmd/slotting-projector.
The analytics twin of the generated example above.
{
"specversion": "1.0",
"id": "6f1d2c3b-4a5e-4b7c-8d9e-0a1b2c3d4e5f",
"source": "/warehouse/slotting-optimization",
"type": "com.warehouse.wms.slotting-optimization.slotplan.SlotPlanGenerated",
"subject": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-08T12:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:slotting-optimization:analytics:SlotPlanGenerated:v1",
"data": {
"plan_id": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "SITE-1",
"window_from": "2026-09-10T12:00:00Z",
"window_to": "2026-10-08T12:00:00Z",
"policy": "abc-velocity-v1",
"assignment_count": 2,
"move_count": 3,
"unassigned_count": 1
}
}
The analytics-stream twin of SlotPlanApproved (ADR 0006).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:slotting-optimization:analytics:SlotPlanApproved:v1. The supersedes_plan_id, when present, stamps the SUPERSEDED plan's supersession day in the read model.
The analytics twin of the approved example above.
{
"specversion": "1.0",
"id": "0b9a8c7d-6e5f-4a3b-9c2d-1e0f9a8b7c6d",
"source": "/warehouse/slotting-optimization",
"type": "com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApproved",
"subject": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-08T12:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:slotting-optimization:analytics:SlotPlanApproved:v1",
"data": {
"plan_id": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "SITE-1",
"approved_at": "2026-10-08T12:30:00Z",
"supersedes_plan_id": "plan-8e7d6c5b-4a39-4281-b0c9-d8e7f6a5b4c3",
"assignments": [
{
"sku": "SKU-1",
"slot": "WH1-FWD-A01-01-01-A"
},
{
"sku": "SKU-2",
"slot": "WH1-FWD-A01-01-02-A"
}
],
"moves": [
{
"sku": "SKU-1",
"to_slot": "WH1-FWD-A01-01-01-A",
"kind": "Assign"
}
]
}
}
The analytics-stream twin of SlotPlanRejected (ADR 0006).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:slotting-optimization:analytics:SlotPlanRejected:v1.
The analytics twin of the rejected example above.
{
"specversion": "1.0",
"id": "4d3c2b1a-0f9e-4d8c-8b7a-6f5e4d3c2b1a",
"source": "/warehouse/slotting-optimization",
"type": "com.warehouse.wms.slotting-optimization.slotplan.SlotPlanRejected",
"subject": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-08T12:15:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:slotting-optimization:analytics:SlotPlanRejected:v1",
"data": {
"plan_id": "plan-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "SITE-1",
"rejected_at": "2026-10-08T12:15:00Z",
"reason": "Too many relocations before peak season."
}
}
order-management's integration topic. This service consumes ONLY
SiteSkuDemandChanged (key <order>/line/<n>, so one line's stream is
totally ordered), under a stable consumer group read from env
DEMAND_CONSUMER_GROUP when DEMAND_MODE=kafka. Every other type on the
topic is ignored.
Consume the per-line site/SKU demand projection.
Last writer wins per source order line; state=REMOVED deactivates the
line. The CloudEvents id claim and the effect commit in one
transaction; the offset is committed afterwards (ADR 0003).
Available only on servers:
Accepts the following message:
One source order line's demand at the configured site changed.
type = com.warehouse.wes.order-management.siteskudemand.SiteSkuDemandChanged,
source /warehouse/order-management, dataschema
urn:warehouse:order-management:events:SiteSkuDemandChanged:v1. Subject and
Kafka key = <source_order_id>/line/<line_no>. Produced by
order-management (its ADR 0035).
An ACTIVE line of 12 units of SKU-1.
{
"specversion": "1.0",
"id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
"source": "/warehouse/order-management",
"type": "com.warehouse.wes.order-management.siteskudemand.SiteSkuDemandChanged",
"subject": "ord-7c9e6679-7d5a-4b37-b2f1-93b0c4a1d8f2/line/1",
"time": "2026-10-07T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:order-management:events:SiteSkuDemandChanged:v1",
"data": {
"source_order_id": "ord-7c9e6679-7d5a-4b37-b2f1-93b0c4a1d8f2",
"line_no": 1,
"site_id": "SITE-1",
"sku": "SKU-1",
"demanded_units": 12,
"due_at": "2026-10-09T10:00:00Z",
"state": "ACTIVE",
"assignment_version": "static-site-v1"
}
}
product-master's integration topic (key and subject = the SKU). This
service consumes ProductClassified, ProductDimensionsDeclared and
ProductMeasured under a stable consumer group read from env
PRODUCT_CONSUMER_GROUP when PRODUCT_MODE=kafka, and
ProductPackLevelDeclared, ProductPackLevelRetired and
ProductPackLevelMeasured into its local PackLevelView (ADR 0012) under
PACK_LEVEL_CONSUMER_GROUP when PACK_LEVEL_MODE=kafka. A message is
applied only when its version is greater than the stored one. Every
other type is ignored.
Consume product classification and physical profile events.
Full-state per concern: a classification replaces the classification, a
physical profile (declared or measured) replaces the physical profile,
acting on effective.
Available only on servers:
Accepts one of the following messages:
A product's handling classification was set or replaced (full state).
type = com.warehouse.wms.product-master.product.ProductClassified,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductClassified:v1. Subject and key =
the SKU. Applied only when version is greater than the stored one.
SKU-9 classified Hazmat + TemperatureSensitive (Frozen).
{
"specversion": "1.0",
"id": "0f6d8a2b-3c4e-4d5f-8a9b-7c6d5e4f3a2b",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductClassified",
"subject": "SKU-9",
"time": "2026-10-06T21:02:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductClassified:v1",
"data": {
"sku": "SKU-9",
"handling_tags": [
"Hazmat",
"TemperatureSensitive"
],
"temperature_class": "Frozen",
"dot_hazard_class": 3,
"classification_source": "native",
"version": 3
}
}
Declared unit dimensions and weight were set or replaced (full physical profile).
type = com.warehouse.wms.product-master.product.ProductDimensionsDeclared,
dataschema urn:warehouse:product-master:events:ProductDimensionsDeclared:v1.
Act on effective and version.
SKU-1 declared at 200x120x80 mm, 1500 g.
{
"specversion": "1.0",
"id": "5a4b3c2d-1e0f-4a9b-8c7d-6e5f4a3b2c1d",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductDimensionsDeclared",
"subject": "SKU-1",
"time": "2026-10-06T21:03:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductDimensionsDeclared:v1",
"data": {
"sku": "SKU-1",
"declared": {
"length_mm": 200,
"width_mm": 120,
"height_mm": 80,
"weight_g": 1500,
"volume_mm3": 1920000
},
"effective": {
"length_mm": 200,
"width_mm": 120,
"height_mm": 80,
"weight_g": 1500,
"volume_mm3": 1920000
},
"effective_source": "declared",
"discrepancy": false,
"version": 4
}
}
A measurement of one unit was recorded and is now effective (full physical profile).
type = com.warehouse.wms.product-master.product.ProductMeasured,
dataschema urn:warehouse:product-master:events:ProductMeasured:v1. Act on
effective and version.
SKU-1 measured heavier than declared.
{
"specversion": "1.0",
"id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductMeasured",
"subject": "SKU-1",
"time": "2026-10-06T21:04:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductMeasured:v1",
"data": {
"sku": "SKU-1",
"declared": {
"length_mm": 200,
"width_mm": 120,
"height_mm": 80,
"weight_g": 1500,
"volume_mm3": 1920000
},
"measured": {
"length_mm": 205,
"width_mm": 121,
"height_mm": 82,
"weight_g": 1720,
"volume_mm3": 2034010,
"measured_at": "2026-10-06T14:05:00Z",
"device_id": "CUBISCAN-03"
},
"effective": {
"length_mm": 205,
"width_mm": 121,
"height_mm": 82,
"weight_g": 1720,
"volume_mm3": 2034010
},
"effective_source": "measured",
"discrepancy": true,
"version": 5
}
}
A pack level of a SKU was declared or revised.
type = com.warehouse.wms.product-master.product.ProductPackLevelDeclared,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductPackLevelDeclared:v1. Subject and key =
the SKU. Applied to the local PackLevelView (ADR 0012,
PACK_LEVEL_MODE=kafka, group PACK_LEVEL_CONSUMER_GROUP) only when
version is greater than the stored one. Payload pinned by
product-master's apis/asyncapi.yaml on develop.
CloudEvents 1.0 envelope of product-master's ProductPackLevelDeclared, as consumed here.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "string",
"type": "com.warehouse.wms.product-master.product.ProductPackLevelDeclared",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductPackLevelDeclared:v1",
"data": {
"sku": "string",
"level": "string",
"gtin": "string",
"child_gtin": "string",
"qty_of_child": 2,
"units_per_pack": 1,
"is_orderable": true,
"is_despatch_unit": true,
"effective_from": "2019-08-24T14:15:22Z",
"version": 1
}
}
A pack level of a SKU was retired.
type = com.warehouse.wms.product-master.product.ProductPackLevelRetired,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductPackLevelRetired:v1. Subject and key =
the SKU. Applied to the local PackLevelView (ADR 0012,
PACK_LEVEL_MODE=kafka, group PACK_LEVEL_CONSUMER_GROUP) only when
version is greater than the stored one. Payload pinned by
product-master's apis/asyncapi.yaml on develop.
CloudEvents 1.0 envelope of product-master's ProductPackLevelRetired, as consumed here.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "string",
"type": "com.warehouse.wms.product-master.product.ProductPackLevelRetired",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductPackLevelRetired:v1",
"data": {
"sku": "string",
"level": "string",
"gtin": "string",
"effective_to": "2019-08-24T14:15:22Z",
"reason": "string",
"version": 1
}
}
A pack level of a SKU was physically measured.
type = com.warehouse.wms.product-master.product.ProductPackLevelMeasured,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductPackLevelMeasured:v1. Subject and key =
the SKU. Applied to the local PackLevelView (ADR 0012,
PACK_LEVEL_MODE=kafka, group PACK_LEVEL_CONSUMER_GROUP) only when
version is greater than the stored one. Payload pinned by
product-master's apis/asyncapi.yaml on develop.
CloudEvents 1.0 envelope of product-master's ProductPackLevelMeasured, as consumed here.
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "string",
"type": "com.warehouse.wms.product-master.product.ProductPackLevelMeasured",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductPackLevelMeasured:v1",
"data": {
"sku": "string",
"level": "string",
"gtin": "string",
"dims": {
"length_mm": 1,
"width_mm": 1,
"height_mm": 1,
"weight_g": 1
},
"measured_at": "2019-08-24T14:15:22Z",
"device_id": "string",
"version": 1
}
}
facility-layout's integration topic. This service consumes
ZoneRegistered (key zoneId), LocationSlotRegistered and
LocationSlotDecommissioned (key locationCode) under a stable consumer
group read from env LAYOUT_CONSUMER_GROUP when LAYOUT_MODE=kafka.
Every other type is ignored.
Consume zones and location slots.
A slot is joined to its zone through zoneId at plan time. An absent
role on LocationSlotRegistered means Storage. Forward slots are the
Storage slots in zones listed in FORWARD_ZONE_CODES (default FWD).
Decommissioning removes the slot and is irreversible.
Available only on servers:
Accepts one of the following messages:
A behavioural zone was added inside a site's area.
type = com.warehouse.wms.facility-layout.zone.ZoneRegistered, source
/warehouse/facility-layout, dataschema
urn:warehouse:facility-layout:events:ZoneRegistered:v1. Subject and Kafka
key = zoneId. data also carries eventName, eventType and
occurredAt, which are ignored.
An ambient, non-hazmat forward zone.
{
"specversion": "1.0",
"id": "2b1a0f9e-8d7c-4b6a-a594-837261504f3e",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"subject": "WH1-FWD-AMB",
"time": "2026-09-01T08:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:ZoneRegistered:v1",
"data": {
"eventName": "ZoneRegistered",
"eventType": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"occurredAt": "2026-09-01T08:00:00Z",
"zoneId": "WH1-FWD-AMB",
"siteCode": "WH1",
"areaCode": "FWD",
"zoneCode": "FWD",
"temperatureClass": "Ambient",
"hazmat": false
}
}
A coded leaf slot now exists on the warehouse map.
type = com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered,
dataschema urn:warehouse:facility-layout:events:LocationSlotRegistered:v1.
Subject and Kafka key = locationCode. An absent role means Storage.
data also carries eventName, eventType and occurredAt, which are
ignored.
A forward storage slot of 0.5 m3 and 40 kg.
{
"specversion": "1.0",
"id": "3c2b1a0f-9e8d-4c7b-a695-8372615a4f3d",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"subject": "WH1-FWD-A01-01-01-A",
"time": "2026-09-01T08:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotRegistered:v1",
"data": {
"eventName": "LocationSlotRegistered",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"occurredAt": "2026-09-01T08:05:00Z",
"locationCode": "WH1-FWD-A01-01-01-A",
"aisleId": "WH1-FWD-AMB-A01",
"zoneId": "WH1-FWD-AMB",
"locationType": "ShelfBin",
"role": "Storage",
"maxWeightKg": 40,
"maxVolumeM3": 0.5
}
}
A coded slot was permanently retired.
type = com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned,
dataschema urn:warehouse:facility-layout:events:LocationSlotDecommissioned:v1.
Subject and Kafka key = locationCode. Irreversible: the slot is removed
from the local copy.
A forward slot retired.
{
"specversion": "1.0",
"id": "1a0f9e8d-7c6b-4a5f-b493-726150493e2d",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned",
"subject": "WH1-FWD-A01-01-03-A",
"time": "2026-10-01T08:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:facility-layout:events:LocationSlotDecommissioned:v1",
"data": {
"eventName": "LocationSlotDecommissioned",
"eventType": "com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned",
"occurredAt": "2026-10-01T08:00:00Z",
"locationCode": "WH1-FWD-A01-01-03-A"
}
}
inventory-storage's integration topic (its ADR 0039). This service
consumes StockRelocated only (ADR 0010), under a stable consumer group
read from env RELOCATION_CONSUMER_GROUP when RELOCATION_MODE=kafka,
to record the execution progress of its slot plans. Every other type on
the topic is ignored.
Consume relocations to record slot-plan execution progress.
A relocation is matched to a plan's move by source_ref first: the
move reference <plan_id>:<move_seq> (fulfillment-execution's
relocation_ref, carried by inventory-storage as the relocation's
source_ref) names the move at that 0-based position of the plan's moves.
Only when source_ref is no move reference is it matched by
site_code, sku and the bins on the site's Approved plan. The
CloudEvents id is claimed with the effect in one transaction; a
relocation is recorded once per relocation_id. A relocation of no
known move is claimed and counted, never dead-lettered. A
StockRelocated whose data cannot be decoded or misses a required
field is dead-lettered at once to warehouse.inventory.events.dlq.
Available only on servers:
Accepts the following message:
A quantity of one SKU moved from one bin to another bin of the same site.
type = com.warehouse.wms.inventory-storage.stock.StockRelocated,
dataschema urn:warehouse:inventory-storage:events:StockRelocated:v1.
Subject and Kafka key = relocation_id. Restated from
inventory-storage's contract (its ADR 0039), never imported.
Seven units of SKU-R1 moved between two WH1 bins by a completed RELOCATE task of plan-9's move 0.
{
"specversion": "1.0",
"id": "3c9e1a52-7b4d-4e18-a6f2-5d0b8c7e9f21",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.stock.StockRelocated",
"subject": "rel-42",
"time": "2026-10-13T12:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:StockRelocated:v1",
"data": {
"relocation_id": "rel-42",
"site_code": "WH1",
"sku": "SKU-R1",
"from_bin": "WH1-STOR-AMB-A01-01-01-A",
"to_bin": "WH1-STOR-AMB-A02-01-01-A",
"quantity": 7,
"reason": "SLOTTING",
"source_ref": "plan-9:0",
"occurred_at": "2026-10-13T12:00:00Z"
}
}
A Draft slot plan was generated.
type = com.warehouse.wms.slotting-optimization.slotplan.SlotPlanGenerated; subject and key = the plan id. Sizes only; the assignments are not part of this event.
A Draft slot plan was approved; it is now the site's forward-slot map.
type = com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApproved;
subject and key = the plan id. assignments is the FULL map of the plan
(replace your picture of the site's forward slots from it); moves is
what changes against the previous map. kind is Assign, Relocate or
Vacate; a Vacate omits to_slot and sets from_slot, an Assign
omits from_slot. supersedes_plan_id is omitted when the site had no
Approved plan.
A Draft slot plan was rejected.
type = com.warehouse.wms.slotting-optimization.slotplan.SlotPlanRejected; subject and key = the plan id. reason is omitted when none was given.
One source order line's demand at the configured site changed.
type = com.warehouse.wes.order-management.siteskudemand.SiteSkuDemandChanged,
source /warehouse/order-management, dataschema
urn:warehouse:order-management:events:SiteSkuDemandChanged:v1. Subject and
Kafka key = <source_order_id>/line/<line_no>. Produced by
order-management (its ADR 0035).
A product's handling classification was set or replaced (full state).
type = com.warehouse.wms.product-master.product.ProductClassified,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductClassified:v1. Subject and key =
the SKU. Applied only when version is greater than the stored one.
Declared unit dimensions and weight were set or replaced (full physical profile).
type = com.warehouse.wms.product-master.product.ProductDimensionsDeclared,
dataschema urn:warehouse:product-master:events:ProductDimensionsDeclared:v1.
Act on effective and version.
A measurement of one unit was recorded and is now effective (full physical profile).
type = com.warehouse.wms.product-master.product.ProductMeasured,
dataschema urn:warehouse:product-master:events:ProductMeasured:v1. Act on
effective and version.
A behavioural zone was added inside a site's area.
type = com.warehouse.wms.facility-layout.zone.ZoneRegistered, source
/warehouse/facility-layout, dataschema
urn:warehouse:facility-layout:events:ZoneRegistered:v1. Subject and Kafka
key = zoneId. data also carries eventName, eventType and
occurredAt, which are ignored.
A coded leaf slot now exists on the warehouse map.
type = com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered,
dataschema urn:warehouse:facility-layout:events:LocationSlotRegistered:v1.
Subject and Kafka key = locationCode. An absent role means Storage.
data also carries eventName, eventType and occurredAt, which are
ignored.
A coded slot was permanently retired.
type = com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned,
dataschema urn:warehouse:facility-layout:events:LocationSlotDecommissioned:v1.
Subject and Kafka key = locationCode. Irreversible: the slot is removed
from the local copy.
A quantity of one SKU moved from one bin to another bin of the same site.
type = com.warehouse.wms.inventory-storage.stock.StockRelocated,
dataschema urn:warehouse:inventory-storage:events:StockRelocated:v1.
Subject and Kafka key = relocation_id. Restated from
inventory-storage's contract (its ADR 0039), never imported.
The analytics-stream twin of SlotPlanGenerated (ADR 0006).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:slotting-optimization:analytics:SlotPlanGenerated:v1. Consumed only by cmd/slotting-projector.
The analytics-stream twin of SlotPlanApproved (ADR 0006).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:slotting-optimization:analytics:SlotPlanApproved:v1. The supersedes_plan_id, when present, stamps the SUPERSEDED plan's supersession day in the read model.
The analytics-stream twin of SlotPlanRejected (ADR 0006).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:slotting-optimization:analytics:SlotPlanRejected:v1.
A pack level of a SKU was declared or revised.
type = com.warehouse.wms.product-master.product.ProductPackLevelDeclared,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductPackLevelDeclared:v1. Subject and key =
the SKU. Applied to the local PackLevelView (ADR 0012,
PACK_LEVEL_MODE=kafka, group PACK_LEVEL_CONSUMER_GROUP) only when
version is greater than the stored one. Payload pinned by
product-master's apis/asyncapi.yaml on develop.
CloudEvents 1.0 envelope of product-master's ProductPackLevelDeclared, as consumed here.
A pack level of a SKU was retired.
type = com.warehouse.wms.product-master.product.ProductPackLevelRetired,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductPackLevelRetired:v1. Subject and key =
the SKU. Applied to the local PackLevelView (ADR 0012,
PACK_LEVEL_MODE=kafka, group PACK_LEVEL_CONSUMER_GROUP) only when
version is greater than the stored one. Payload pinned by
product-master's apis/asyncapi.yaml on develop.
CloudEvents 1.0 envelope of product-master's ProductPackLevelRetired, as consumed here.
A pack level of a SKU was physically measured.
type = com.warehouse.wms.product-master.product.ProductPackLevelMeasured,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductPackLevelMeasured:v1. Subject and key =
the SKU. Applied to the local PackLevelView (ADR 0012,
PACK_LEVEL_MODE=kafka, group PACK_LEVEL_CONSUMER_GROUP) only when
version is greater than the stored one. Payload pinned by
product-master's apis/asyncapi.yaml on develop.
CloudEvents 1.0 envelope of product-master's ProductPackLevelMeasured, as consumed here.
CloudEvents 1.0 envelope of product-master's ProductPackLevelDeclared, as consumed here.
CloudEvents 1.0 envelope of product-master's ProductPackLevelRetired, as consumed here.
CloudEvents 1.0 envelope of product-master's ProductPackLevelMeasured, as consumed here.