Event catalog for the pick-face-replenishment bounded context (WMS subdomain): min/max replenishment of forward pick faces from reserve bins (ADR 0001, ADR 0002).
Published. The ReplenishmentRequest aggregate raises three events,
published to warehouse.pick-face-replenishment.events through a
transactional outbox: the request 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). ReplenishmentRequested is what wes-work-planning
turns into REPLENISH work; ReplenishmentCompleted and
ReplenishmentCancelled close the request. The same three types are mirrored
on warehouse.pick-face-replenishment.analytics (dataschema
urn:warehouse:pick-face-replenishment:analytics:<EventName>:v1), together
with ReplenishmentPolicyDeclared, which is analytics-only.
Consumed (ADR 0003). BinStockLevelChanged (producer change P1, built in
inventory-storage) and StockRelocated from inventory-storage, SlotPlanApproved from
slotting-optimization, and ZoneRegistered, LocationSlotRegistered and
LocationSlotDecommissioned from facility-layout. Each feeds a durable local
copy or closes a request (modes INVENTORY_MODE, SLOTTING_MODE,
LAYOUT_MODE, PACK_LEVEL_MODE: default and only accepted value kafka,
permissive is rejected at boot; consumer groups are required, from
INVENTORY_CONSUMER_GROUP, SLOTTING_CONSUMER_GROUP,
LAYOUT_CONSUMER_GROUP, PACK_LEVEL_CONSUMER_GROUP). A message that fails
deterministically, or after the bounded retries, is published to
<topic>.dlq with x-dlq-* headers. ProductPackLevelDeclared and
ProductPackLevelRetired from product-master are consumed as well. The consumed messages below are the producers' own
contracts, decoded independently here and never imported.
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; consumers may extract them, and must not require them.
specversion, id, source (/warehouse/pick-face-replenishment), type,
subject (the request id; <site_id>/<sku> for the policy event), time,
datacontenttype (application/json) and dataschema
(urn:warehouse:pick-face-replenishment:<events|analytics>:<EventName>:v1)
are all required. Kafka key = the subject. Type =
com.warehouse.wms.pick-face-replenishment.<entity>.<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 = request
id; every message carries the CloudEvents content-type header (plus the
optional W3C traceparent of the writing request). Dispatch on the full
type, ignore unknown types, dedupe on id.
Receive ReplenishmentRequest events.
Subscribe to replenishment requests and their outcome. Route on the full
type (com.warehouse.wms.pick-face-replenishment.replenishment.<EventName>).
ReplenishmentRequested is the only one that asks the floor to do
something; the other two are the request's final states.
Available only on servers:
Accepts one of the following messages:
A forward pick face needs stock; move `quantity` units of the SKU from `source_bin` to `forward_bin`.
type = com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentRequested;
subject and key = the request id. priority is URGENT when the pick face
had nothing available (on_hand - reserved <= 0) at detection, else
NORMAL. policy_min and policy_max are the policy values the request
was sized with.
24 units of SKU-1 from a reserve bin to its forward bin.
{
"specversion": "1.0",
"id": "6f1d2c3b-4a5e-4b7c-8d9e-0a1b2c3d4e5f",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentRequested",
"subject": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-17T09:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:events:ReplenishmentRequested:v1",
"data": {
"request_id": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "WH1",
"sku": "SKU-1",
"forward_bin": "WH1-FWD-A01-01-01-A",
"source_bin": "WH1-RSV-A07-03-02-B",
"quantity": 24,
"priority": "NORMAL",
"policy_min": 10,
"policy_max": 60,
"requested_at": "2026-10-17T09:30:00Z"
}
}
The relocation of a request was recorded on the stock ledger.
type = com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCompleted;
subject and key = the request id. quantity is what inventory-storage's
StockRelocated moved, which can be less than the requested quantity.
The 24 requested units were moved.
{
"specversion": "1.0",
"id": "0b9a8c7d-6e5f-4a3b-9c2d-1e0f9a8b7c6d",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCompleted",
"subject": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-17T10:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:events:ReplenishmentCompleted:v1",
"data": {
"request_id": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "WH1",
"sku": "SKU-1",
"forward_bin": "WH1-FWD-A01-01-01-A",
"source_bin": "WH1-RSV-A07-03-02-B",
"quantity": 24,
"completed_at": "2026-10-17T10:05:00Z"
}
}
An open request was cancelled before its relocation was recorded.
type = com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCancelled;
subject and key = the request id. reason is OPERATOR,
ASSIGNMENT_CHANGED (a newer approved slot plan no longer assigns the SKU
to the forward bin) or POLICY_REMOVED. Consumers cancel work they have
not yet released.
Cancelled because the slot plan moved the SKU to another forward bin.
{
"specversion": "1.0",
"id": "4d3c2b1a-0f9e-4d8c-8b7a-6f5e4d3c2b1a",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCancelled",
"subject": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-17T09:50:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:events:ReplenishmentCancelled:v1",
"data": {
"request_id": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "WH1",
"sku": "SKU-1",
"reason": "ASSIGNMENT_CHANGED",
"cancelled_at": "2026-10-17T09:50:00Z"
}
}
This service's own analytics stream (ADR 0008), written by the SAME
transactional outbox as the integration topic: every request event
appears here too, under the SAME CloudEvents id and type, with only the
dataschema stream segment different
(urn:warehouse:pick-face-replenishment:analytics::v1), plus the
analytics-only ReplenishmentPolicyDeclared (key and subject
<site_id>/<sku>). It is NOT an integration contract: the only consumer
is this service's cmd/pfr-projector (fixed group from
ANALYTICS_CONSUMER_GROUP), which folds the events into the analytical
database; its deterministic poison goes to
warehouse.pick-face-replenishment.analytics.dlq. Other contexts keep
reading warehouse.pick-face-replenishment.events.
Receive the analytics twin of every request event and the policy declaration.
Request payloads are byte-for-byte the integration payloads (ADR 0008
section 2); only the dataschema names the analytics stream.
ReplenishmentPolicyDeclared is raised each time a policy is declared
or changed, with the new version. Removing a policy raises no event of
its own; its open requests are cancelled with reason POLICY_REMOVED.
Available only on servers:
Accepts one of the following messages:
The analytics-stream twin of ReplenishmentRequested (ADR 0008).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:pick-face-replenishment:analytics:ReplenishmentRequested:v1. Consumed only by cmd/pfr-projector.
The analytics twin of the requested example above.
{
"specversion": "1.0",
"id": "6f1d2c3b-4a5e-4b7c-8d9e-0a1b2c3d4e5f",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentRequested",
"subject": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-17T09:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:analytics:ReplenishmentRequested:v1",
"data": {
"request_id": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "WH1",
"sku": "SKU-1",
"forward_bin": "WH1-FWD-A01-01-01-A",
"source_bin": "WH1-RSV-A07-03-02-B",
"quantity": 24,
"priority": "NORMAL",
"policy_min": 10,
"policy_max": 60,
"requested_at": "2026-10-17T09:30:00Z"
}
}
The analytics-stream twin of ReplenishmentCompleted (ADR 0008).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:pick-face-replenishment:analytics:ReplenishmentCompleted:v1. Consumed only by cmd/pfr-projector.
The analytics twin of the completed example above.
{
"specversion": "1.0",
"id": "0b9a8c7d-6e5f-4a3b-9c2d-1e0f9a8b7c6d",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCompleted",
"subject": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-17T10:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:analytics:ReplenishmentCompleted:v1",
"data": {
"request_id": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "WH1",
"sku": "SKU-1",
"forward_bin": "WH1-FWD-A01-01-01-A",
"source_bin": "WH1-RSV-A07-03-02-B",
"quantity": 24,
"completed_at": "2026-10-17T10:05:00Z"
}
}
The analytics-stream twin of ReplenishmentCancelled (ADR 0008).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:pick-face-replenishment:analytics:ReplenishmentCancelled:v1. Consumed only by cmd/pfr-projector.
The analytics twin of the cancelled example above.
{
"specversion": "1.0",
"id": "4d3c2b1a-0f9e-4d8c-8b7a-6f5e4d3c2b1a",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCancelled",
"subject": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"time": "2026-10-17T09:50:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:analytics:ReplenishmentCancelled:v1",
"data": {
"request_id": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"site_id": "WH1",
"sku": "SKU-1",
"reason": "ASSIGNMENT_CHANGED",
"cancelled_at": "2026-10-17T09:50:00Z"
}
}
A min/max policy was declared or changed (analytics only).
type = com.warehouse.wms.pick-face-replenishment.policy.ReplenishmentPolicyDeclared;
subject and key = <site_id>/<sku>. Analytics topic only.
SKU-1 at WH1 declared 10 to 60 in multiples of 6.
{
"specversion": "1.0",
"id": "2b1a0f9e-8d7c-4b6a-a594-837261504f3e",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.policy.ReplenishmentPolicyDeclared",
"subject": "WH1/SKU-1",
"time": "2026-10-17T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:analytics:ReplenishmentPolicyDeclared:v1",
"data": {
"site_id": "WH1",
"sku": "SKU-1",
"min_qty": 10,
"max_qty": 60,
"multiple": 6,
"version": 1,
"declared_at": "2026-10-17T09:00:00Z"
}
}
SKU-2 at WH1 declared a DEMAND_COVER policy of 3 days of cover over a 7-day window (ADR 0015).
{
"specversion": "1.0",
"id": "4c2b1a0f-8d7c-4b6a-a594-837261504f3e",
"source": "/warehouse/pick-face-replenishment",
"type": "com.warehouse.wms.pick-face-replenishment.policy.ReplenishmentPolicyDeclared",
"subject": "WH1/SKU-2",
"time": "2026-11-28T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:pick-face-replenishment:analytics:ReplenishmentPolicyDeclared:v1",
"data": {
"site_id": "WH1",
"sku": "SKU-2",
"min_qty": 0,
"max_qty": 1,
"multiple": 1,
"kind": "DEMAND_COVER",
"target_days_of_cover": 3,
"demand_window_days": 7,
"version": 1,
"declared_at": "2026-11-28T09:00:00Z"
}
}
product-master's integration topic. Consumed for ProductPackLevelDeclared
and ProductPackLevelRetired (packaging view: the eaches factor per pack
level that min/max and request quantities are converted with), consumer
group from env PACK_LEVEL_CONSUMER_GROUP (when PACK_LEVEL_MODE=kafka).
Apply product-master pack-level facts to the local packaging copy.
Upserts the packaging view in one transaction with the CloudEvents id
claim; unknown types on the topic are skipped.
Available only on servers:
Accepts one of the following messages:
A pack level (EACH, INNER, CASE or PALLET) of a SKU was declared, or one of its mutable attributes changed.
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. Produced by product-master; consumed into the local
packaging view (pack level -> eaches factor for case-level scans).
The keys are snake_case, exactly as product-master's encoder writes them
(units_per_pack, effective_from, effective_to).
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "string",
"type": "string",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "string",
"data": {
"sku": "string",
"level": "EACH",
"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. Produced by product-master; consumed into the local
packaging view (retired levels are no longer valid scan targets).
{
"specversion": "1.0",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "string",
"type": "string",
"subject": "string",
"time": "2019-08-24T14:15:22Z",
"datacontenttype": "application/json",
"dataschema": "string",
"data": {
"sku": "string",
"level": "EACH",
"gtin": "string",
"effective_to": "2019-08-24T14:15:22Z",
"reason": "string",
"version": 1
}
}
inventory-storage's integration topic. This service consumes
BinStockLevelChanged (key <bin>:<sku>, so one bin-and-SKU stream is
totally ordered) and StockRelocated (key relocation_id) under a stable
consumer group read from env INVENTORY_CONSUMER_GROUP when
INVENTORY_MODE=kafka. Every other type on the topic is ignored.
Consume bin stock levels and relocations.
BinStockLevelChanged feeds the bin_stock_levels copy: the levels are
ABSOLUTE and a message is applied only when its version is greater than
the stored one for the bin and SKU. StockRelocated completes a request
only when reason is REPLENISHMENT, source_ref is a request id of
this service and the SKU and bins match; every other relocation is
ignored. The CloudEvents id claim and the effect commit in one
transaction; the offset is committed afterwards (ADR 0003).
Available only on servers:
Accepts one of the following messages:
The absolute on-hand and reserved level of one SKU in one bin changed.
Producer change P1 is built: inventory-storage publishes this type (its
ADR 0040). The contract was pinned here consumer-first.
type = com.warehouse.wms.inventory-storage.stock.BinStockLevelChanged,
source /warehouse/inventory-storage, dataschema
urn:warehouse:inventory-storage:events:BinStockLevelChanged:v1. Subject
and Kafka key = <bin>:<sku>. on_hand and reserved are ABSOLUTE
levels after the change, not deltas; reserved is the units of this bin
bound by active reservations. Keep the highest version per bin and SKU
and ignore lower ones. The consumer reads only site_code, bin, sku,
on_hand, reserved and version; reason is not read.
A pick left 5 on hand, 3 reserved, in a forward bin.
{
"specversion": "1.0",
"id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.stock.BinStockLevelChanged",
"subject": "WH1-FWD-A01-01-01-A:SKU-1",
"time": "2026-10-17T09:29:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:BinStockLevelChanged:v1",
"data": {
"site_code": "WH1",
"bin": "WH1-FWD-A01-01-01-A",
"sku": "SKU-1",
"on_hand": 5,
"reserved": 3,
"version": 17,
"reason": "PICK",
"occurred_at": "2026-10-17T09:29:00Z"
}
}
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. Act only when reason is
REPLENISHMENT, a value inventory-storage added with producer change P4
(its ADR 0041; it also publishes SLOTTING, CONSOLIDATION and MANUAL);
ignore every other reason.
24 units of SKU-1 moved from a reserve bin to its forward bin for request repl-3b0e8d2a.
{
"specversion": "1.0",
"id": "3c9e1a52-7b4d-4e18-a6f2-5d0b8c7e9f21",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.stock.StockRelocated",
"subject": "rel-77",
"time": "2026-10-17T10:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:StockRelocated:v1",
"data": {
"relocation_id": "rel-77",
"site_code": "WH1",
"sku": "SKU-1",
"from_bin": "WH1-RSV-A07-03-02-B",
"to_bin": "WH1-FWD-A01-01-01-A",
"quantity": 24,
"reason": "REPLENISHMENT",
"source_ref": "repl-3b0e8d2a-7c41-4f6a-9d15-2a8b6c4e1f07",
"occurred_at": "2026-10-17T10:05:00Z"
}
}
slotting-optimization's integration topic. This service consumes ONLY
SlotPlanApproved (key and subject = the plan id) under a stable consumer
group read from env SLOTTING_CONSUMER_GROUP when SLOTTING_MODE=kafka.
Every other type is ignored.
Consume the approved forward-slot map.
assignments is the FULL forward map of the site: replace the site's
forward_assignments copy wholesale from it. A request whose forward bin
no longer holds its SKU in the new map is cancelled with reason
ASSIGNMENT_CHANGED. The CloudEvents id claim and the effect commit in
one transaction.
Available only on servers:
Accepts the following message:
A slot plan was approved; it is now the site's forward-slot map.
type = com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApproved,
source /warehouse/slotting-optimization, dataschema
urn:warehouse:slotting-optimization:events:SlotPlanApproved:v1. Subject and
Kafka key = the plan id. assignments is the FULL map of the plan.
Plan approved; SKU-1 and SKU-2 hold forward slots.
{
"specversion": "1.0",
"id": "5a4b3c2d-1e0f-4a9b-8c7d-6e5f4a3b2c1d",
"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": "WH1",
"approved_at": "2026-10-08T12:30:00Z",
"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",
"to_slot": "WH1-FWD-A01-01-02-A",
"kind": "Assign"
}
]
}
}
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 location is joined to its zone through zoneId at detection time. A
reserve bin is a Storage location (absent role = Storage) in a zone
listed in RESERVE_ZONE_CODES (default RSV). Decommissioning removes
the location 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 reserve zone.
{
"specversion": "1.0",
"id": "2b1a0f9e-8d7c-4b6a-a594-837261504f3f",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.zone.ZoneRegistered",
"subject": "WH1-RSV-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-RSV-AMB",
"siteCode": "WH1",
"areaCode": "RSV",
"zoneCode": "RSV",
"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 reserve storage slot of 1.2 m3 and 800 kg.
{
"specversion": "1.0",
"id": "3c2b1a0f-9e8d-4c7b-a695-8372615a4f3d",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"subject": "WH1-RSV-A07-03-02-B",
"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-RSV-A07-03-02-B",
"aisleId": "WH1-RSV-AMB-A07",
"zoneId": "WH1-RSV-AMB",
"locationType": "PalletBin",
"role": "Storage",
"maxWeightKg": 800,
"maxVolumeM3": 1.2
}
}
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 location is
removed from the local copy.
A reserve 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-RSV-A07-03-03-B",
"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-RSV-A07-03-03-B"
}
}
order-management's integration topic. This service consumes ONLY
SiteSkuDemandChanged (ADR 0015; the PII-free demand projection of its
ADR 0035, amended by its ADR 0044), keyed
<source_order_id>/line/<line_no> so one line's demand stream is totally
ordered on its own partition, under a stable consumer group read from env
DEMAND_CONSUMER_GROUP when DEMAND_MODE=kafka. Every other type on the
topic (OrderAllocated, OrderPartiallyAllocated, OrderRepromised, anything
future) is ignored.
Consume the site/SKU demand projection.
Each fact feeds the site_sku_demand_lines copy and appends its signed
delta (+demanded_units for ACTIVE, -demanded_units for REMOVED) to
site_sku_demand_history: the rolling demand rate a DEMAND_COVER
policy is sized from is the net history sum over its trailing
demandWindowDays, clamped at 0 (ADR 0015). The CloudEvents id claim
and the effect commit in one transaction; the offset is committed
afterwards, so a line's facts apply in emission order.
Available only on servers:
Accepts the following message:
One source order line's site/SKU demand became ACTIVE or REMOVED.
order-management's PII-free demand projection (its ADR 0035, amended by
its ADR 0044), restated here independently — never imported from its
code. 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> — the LINE is
the stream identity, so one line's demand history is totally ordered on
its own partition. state is ACTIVE (the line's demand exists at the
site) or REMOVED (a cancellation took it away; demanded_units
repeats the quantity it removes). due_at is the line's promise-group
cutoff, else the order-level promise date. The consumer reads every
field; no customer PII ever appears on this event.
A line's demand becomes ACTIVE at the site.
{
"specversion": "1.0",
"id": "7c2d9e1f-3a4b-4c5d-8e9f-0a1b2c3d4e5f",
"source": "/warehouse/order-management",
"type": "com.warehouse.wes.order-management.siteskudemand.SiteSkuDemandChanged",
"subject": "ord-7c9e6679-7d5a-4b37-b2f1-93b0c4a1d8f2/line/3",
"time": "2026-11-28T12: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": 3,
"site_id": "WH2",
"sku": "SKU-1",
"demanded_units": 7,
"due_at": "2026-11-30T18:00:00Z",
"state": "ACTIVE",
"assignment_version": "static-site-v1"
}
}
A cancellation removes the line's demand at the site.
{
"specversion": "1.0",
"id": "8d3e0f2a-4b5c-4d6e-9f0a-1b2c3d4e5f6a",
"source": "/warehouse/order-management",
"type": "com.warehouse.wes.order-management.siteskudemand.SiteSkuDemandChanged",
"subject": "ord-7c9e6679-7d5a-4b37-b2f1-93b0c4a1d8f2/line/3",
"time": "2026-11-28T15:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:order-management:events:SiteSkuDemandChanged:v1",
"data": {
"source_order_id": "ord-7c9e6679-7d5a-4b37-b2f1-93b0c4a1d8f2",
"line_no": 3,
"site_id": "WH2",
"sku": "SKU-1",
"demanded_units": 7,
"due_at": "2026-11-30T18:00:00Z",
"state": "REMOVED",
"assignment_version": "static-site-v1"
}
}
A forward pick face needs stock; move `quantity` units of the SKU from `source_bin` to `forward_bin`.
type = com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentRequested;
subject and key = the request id. priority is URGENT when the pick face
had nothing available (on_hand - reserved <= 0) at detection, else
NORMAL. policy_min and policy_max are the policy values the request
was sized with.
The relocation of a request was recorded on the stock ledger.
type = com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCompleted;
subject and key = the request id. quantity is what inventory-storage's
StockRelocated moved, which can be less than the requested quantity.
An open request was cancelled before its relocation was recorded.
type = com.warehouse.wms.pick-face-replenishment.replenishment.ReplenishmentCancelled;
subject and key = the request id. reason is OPERATOR,
ASSIGNMENT_CHANGED (a newer approved slot plan no longer assigns the SKU
to the forward bin) or POLICY_REMOVED. Consumers cancel work they have
not yet released.
A min/max policy was declared or changed (analytics only).
type = com.warehouse.wms.pick-face-replenishment.policy.ReplenishmentPolicyDeclared;
subject and key = <site_id>/<sku>. Analytics topic only.
The analytics-stream twin of ReplenishmentRequested (ADR 0008).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:pick-face-replenishment:analytics:ReplenishmentRequested:v1. Consumed only by cmd/pfr-projector.
The analytics-stream twin of ReplenishmentCompleted (ADR 0008).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:pick-face-replenishment:analytics:ReplenishmentCompleted:v1. Consumed only by cmd/pfr-projector.
The analytics-stream twin of ReplenishmentCancelled (ADR 0008).
Same type, id, subject, key and payload as the integration message; dataschema = urn:warehouse:pick-face-replenishment:analytics:ReplenishmentCancelled:v1. Consumed only by cmd/pfr-projector.
One source order line's site/SKU demand became ACTIVE or REMOVED.
order-management's PII-free demand projection (its ADR 0035, amended by
its ADR 0044), restated here independently — never imported from its
code. 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> — the LINE is
the stream identity, so one line's demand history is totally ordered on
its own partition. state is ACTIVE (the line's demand exists at the
site) or REMOVED (a cancellation took it away; demanded_units
repeats the quantity it removes). due_at is the line's promise-group
cutoff, else the order-level promise date. The consumer reads every
field; no customer PII ever appears on this event.
The absolute on-hand and reserved level of one SKU in one bin changed.
Producer change P1 is built: inventory-storage publishes this type (its
ADR 0040). The contract was pinned here consumer-first.
type = com.warehouse.wms.inventory-storage.stock.BinStockLevelChanged,
source /warehouse/inventory-storage, dataschema
urn:warehouse:inventory-storage:events:BinStockLevelChanged:v1. Subject
and Kafka key = <bin>:<sku>. on_hand and reserved are ABSOLUTE
levels after the change, not deltas; reserved is the units of this bin
bound by active reservations. Keep the highest version per bin and SKU
and ignore lower ones. The consumer reads only site_code, bin, sku,
on_hand, reserved and version; reason is not read.
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. Act only when reason is
REPLENISHMENT, a value inventory-storage added with producer change P4
(its ADR 0041; it also publishes SLOTTING, CONSOLIDATION and MANUAL);
ignore every other reason.
A slot plan was approved; it is now the site's forward-slot map.
type = com.warehouse.wms.slotting-optimization.slotplan.SlotPlanApproved,
source /warehouse/slotting-optimization, dataschema
urn:warehouse:slotting-optimization:events:SlotPlanApproved:v1. Subject and
Kafka key = the plan id. assignments is the FULL map of the plan.
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 location is
removed from the local copy.
A pack level (EACH, INNER, CASE or PALLET) of a SKU was declared, or one of its mutable attributes changed.
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. Produced by product-master; consumed into the local
packaging view (pack level -> eaches factor for case-level scans).
The keys are snake_case, exactly as product-master's encoder writes them
(units_per_pack, effective_from, effective_to).
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. Produced by product-master; consumed into the local
packaging view (retired levels are no longer valid scan targets).