Event catalog for the inbound-receiving bounded context (WMS subdomain): the inbound dock workflow of ASNs, dock appointments and receipts (ADR 0001, ADR 0002).
Published. The Asn and Receipt aggregates raise eight events,
published to warehouse.inbound-receiving.events through a
transactional outbox: the aggregate 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). Consumers dedupe on id.
The four dockappointment types (Booked, CheckedIn, Cancelled, Completed)
are RETIRED: the DockAppointment moved to dock-scheduling (ADR 0019,
plan YD-0002), the backfill command that republished them is gone and
this service raises none (ADR 0022), so they are no longer declared. Read
dock-scheduling's events instead.
ReceiptLineReceived is the handover event: inventory-storage consumes
it and books condition=Good quantities into stock (ADR 0003); Damaged
quantities are recorded here and not booked.
Consumed (ADR 0003). ProductRegistered from
warehouse.product-master.events feeds the known_skus local copy
(group from env PRODUCT_CONSUMER_GROUP); ProductPackLevelDeclared and
ProductPackLevelRetired from the same topic feed the packaging view
(group from env PACKAGING_CONSUMER_GROUP).
LocationSlotRegistered and LocationSlotDecommissioned from
warehouse.facility.events feed the dock_doors local copy
(group from env DOCK_DOOR_CONSUMER_GROUP). The three consumers always
run: PRODUCT_MODE / DOCK_DOOR_MODE accept only kafka (or unset) and
permissive / off are boot errors, as is an unset group variable.
DockAppointmentBooked and DockAppointmentCancelled from
warehouse.dock-scheduling.events feed the appointments local copy
(group from env DOCK_APPOINTMENT_CONSUMER_GROUP, ADR 0019), and
DockAppointmentRescheduled / DockAppointmentDoorReassigned keep its
door and window current (ADR 0020): inbound appointments only, guarded by
dock-scheduling's version; applying them publishes nothing. Receipts
validate their appointment against that copy and take its door when they
open; an open receipt keeps its door.
Analytics (ADR 0006). The eleven events are ALSO written, in the
same transaction, to warehouse.inbound-receiving.analytics with the same
type and the same id per occurrence, dataschema
urn:warehouse:inbound-receiving:analytics:<EventName>:v1 and payloads
equal to the integration payloads. Only this service's inbound-projector
consumes it; it is not an integration contract. The retired
dockappointment events already on that stream stay projected (ADR 0022).
Planned. warehouse-planning reads appointments from dock-scheduling (companion of plan YD-0002).
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/inbound-receiving), type,
subject (the aggregate instance id), time, datacontenttype
(application/json) and dataschema
(urn:warehouse:inbound-receiving:events:<EventName>:v1) are all required.
type = com.warehouse.wms.inbound-receiving.<entity>.<EventName> with
<entity> one of asn, receipt. Kafka key:
asn_number for asn.* and receipt.*. data is snake_case, optional fields are omitted when
unset, timestamps are RFC 3339 UTC. 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; every
message carries the CloudEvents content-type header (plus the optional
W3C traceparent of the writing request). Key = asn_number
for ASN and receipt events. Dispatch on the full type, ignore unknown types, dedupe on
id. The first consumer is inventory-storage (ReceiptLineReceived).
Receive ASN and receipt events.
Subscribe to the inbound dock workflow. Route on the full type
(com.warehouse.wms.inbound-receiving.<entity>.<EventName>).
Available only on servers:
Accepts one of the following messages:
A supplier's advance ship notice was registered.
type = com.warehouse.wms.inbound-receiving.asn.ASNRegistered; subject and key = the ASN number.
ASN-1001 with two lines.
{
"specversion": "1.0",
"id": "7c1f3a52-0d4e-4b8a-9e61-2a5d8f0c3b14",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.asn.ASNRegistered",
"subject": "ASN-1001",
"time": "2026-10-08T12:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ASNRegistered:v1",
"data": {
"asn_number": "ASN-1001",
"supplier_ref": "ACME",
"registered_at": "2026-10-08T12:00:00Z",
"expected_arrival": "2026-10-09T08:00:00Z",
"lines": [
{
"line_no": 1,
"sku": "SKU-1",
"expected_qty": 40
},
{
"line_no": 2,
"sku": "SKU-2",
"expected_qty": 5
}
]
}
}
A Registered ASN was cancelled.
type = com.warehouse.wms.inbound-receiving.asn.ASNCancelled; subject and key = the ASN number.
ASN-1001 cancelled by the supplier.
{
"specversion": "1.0",
"id": "1e9b4d70-3c2a-4f5d-8b17-6a0c9d2e7f31",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.asn.ASNCancelled",
"subject": "ASN-1001",
"time": "2026-10-08T12:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ASNCancelled:v1",
"data": {
"asn_number": "ASN-1001",
"reason": "Supplier cancelled the shipment"
}
}
An ASN was registered after the visit it was received under had already arrived.
type = com.warehouse.wms.inbound-receiving.asn.AsnLateForArrival; subject and key = the ASN number.
Raised once per ASN, at OpenReceipt and only there (the only place an ASN and an
appointment meet), when asn_registered_at > arrived_at of the appointment's earliest
yard visit (ADR 0025); lateness_seconds = asn_registered_at - arrived_at, whole
seconds, >= 1 by construction. An on-time ASN, a walk-in receipt, an appointment with
no arrival seen yet and a legacy ASN with an unknown registration raise nothing.
ASN-1001 registered two minutes after the gate arrival of the visit it was received under.
{
"specversion": "1.0",
"id": "5b7c1e93-4a0b-4c6d-9e82-3f1a2b4c5d63",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.asn.AsnLateForArrival",
"subject": "ASN-1001",
"time": "2026-10-09T08:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:AsnLateForArrival:v1",
"data": {
"asn_number": "ASN-1001",
"supplier_ref": "ACME",
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"visit_id": "visit-9f1c2a34-5b6d-4e7f-8a90-b1c2d3e4f5a6",
"asn_registered_at": "2026-10-09T08:02:00Z",
"arrived_at": "2026-10-09T08:00:00Z",
"lateness_seconds": 120
}
}
Receiving of an ASN started.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptOpened; subject = the receipt id, key = the ASN number.
A receipt opened from a checked-in appointment.
{
"specversion": "1.0",
"id": "d4e6f8a0-3b5c-4d7e-9f1a-2b3c4d5e6f70",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptOpened",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T08:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ReceiptOpened:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"door_code": "WH1-DOCK-IN-01",
"opened_at": "2026-10-09T08:05:00Z"
}
}
A quantity was received against a line (the handover event).
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptLineReceived;
subject = the receipt id, key = the ASN number. inventory-storage
books condition=Good quantities with its ReceiveStock use case and
ignores Damaged; it dedupes on the CloudEvents id.
40 good units of SKU-1 received.
{
"specversion": "1.0",
"id": "3f8f6c2e-9b1a-4d6e-8a52-0c7d1e4b9a10",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptLineReceived",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T08:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ReceiptLineReceived:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"line_no": 1,
"sku": "SKU-1",
"quantity": 40,
"condition": "Good",
"received_at": "2026-10-09T08:10:00Z"
}
}
A carton (or one case) was received - identity only.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptCartonReceived;
subject = the receipt id, key = the ASN number.
IDENTITY ONLY: it never books quantity (ReceiptLineReceived stays the
sole quantity authority, in eaches). inventory-storage uses it to
create or link a Container keyed (receipt_id, line_no, lpn), in either
arrival order. lpn is the SSCC, or an internal LPN-<ulid> for a
case received without one. There is no site: the site is derived by
inventory-storage at stow (ADR 0013).
{
"specversion": "1.0",
"id": "4a9f6c2e-9b1a-4d6e-8a52-0c7d1e4b9a11",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptCartonReceived",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T08:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ReceiptCartonReceived:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"sscc": "340123450000000017",
"sealed": true,
"lpn": "340123450000000017",
"contents": [
{
"line_no": 1,
"sku": "SKU-1",
"gtin": "13041090004824",
"qty": 24,
"condition": "Good"
}
],
"received_at": "2026-10-09T08:10:00Z"
}
}
A finding about a physical carton.
type = com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaised;
subject = the receipt id, key = the ASN number.
Carton discrepancies travel ONLY on this event; ReceiptClosed keeps
its three v1 kinds. A refused scan books nothing and raises this
event; an accepted carton can raise it too (for example
UnlabelledCarton).
{
"specversion": "1.0",
"id": "5b0a7d3f-0c2b-4e7f-9b63-1d8e2f5c0b22",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaised",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T08:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:CartonDiscrepancyRaised:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"sscc": "340123450000000017",
"kind": "UnexpectedCarton",
"at": "2026-10-09T08:10:00Z"
}
}
Receiving ended, with the discrepancies against the ASN.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptClosed;
subject = the receipt id, key = the ASN number. discrepancies is
present and empty when everything matched; a line can appear once per
kind (Short, Over, Damaged); each carries w13_code and
cbv_disposition (ADR 0023). Under a declared receiving policy (ADR 0026) the
close judges each line against the band: a within-band variance raises no finding,
an override raises OverTolerance (W13 03) or UnderTolerance (W13 02) with
the reason_code the operator gave, and the optional tolerance object names the
band the close was judged under (present exactly when a policy was applied).
Line 1 short and with damage, line 2 over-received.
{
"specversion": "1.0",
"id": "e5f7a9b1-4c6d-4e8f-a02b-3c4d5e6f7a81",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptClosed",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T09:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ReceiptClosed:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"closed_at": "2026-10-09T09:30:00Z",
"discrepancies": [
{
"line_no": 1,
"sku": "SKU-1",
"kind": "Short",
"expected_qty": 40,
"received_qty": 34,
"damaged_qty": 4
},
{
"line_no": 1,
"sku": "SKU-1",
"kind": "Damaged",
"expected_qty": 40,
"received_qty": 34,
"damaged_qty": 4
},
{
"line_no": 2,
"sku": "SKU-2",
"kind": "Over",
"expected_qty": 5,
"received_qty": 7,
"damaged_qty": 0
}
]
}
}
The dock-to-stock fact of a receipt (ADR 0021).
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptStowCompleted;
subject = the receipt id, key = the ASN number. Raised exactly once,
for a Closed receipt opened from an appointment, when every Good
carton has a stow from inventory-storage and the gate arrival from
yard-management is known, whatever order those facts and the close
arrive in. dock_to_stock_seconds is stowed_at - arrived_at in
whole seconds, never negative; stowed_at is the latest stow of a
Good carton and carton_count how many Good cartons that is. At
(the CloudEvents time) is when the completion was observed.
{
"specversion": "1.0",
"id": "9a3b5c7d-1e2f-4a8b-b6c4-0d1e2f3a4b55",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptStowCompleted",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T07:00:01Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ReceiptStowCompleted:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"arrived_at": "2026-10-09T05:00:00Z",
"closed_at": "2026-10-09T06:30:00Z",
"stowed_at": "2026-10-09T07:00:00Z",
"dock_to_stock_seconds": 7200,
"carton_count": 12
}
}
What was received and accepted per line, with W13/CBV-coded discrepancies, for the supplier or the 3PL depositor (ADR 0023).
type = com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceIssued;
subject = the receipt id, key = the ASN number. The domain fact only: this
service renders no EANCOM, X12 or transport. Raised exactly once per
receipt, in the same transaction as ReceiptClosed (right after it), for a
receipt closed after this event existed; a receipt closed earlier gets no
advice. despatch_advice_ref is the ASN number (the reference to the
despatch advice), supplier_ref the supplier as the ASN knows it and
owner_ref the 3PL depositor (omitted for fleet-owned stock). last_carton_at
is when the last unit was received (the receipt's opening when nothing
was); within_sla is issued_at - last_carton_at <= sla_seconds
(RECEIVING_ADVICE_SLA, default 24 h). Per line the three quantities are
exclusive: accepted_qty is the Good units not held, rejected_qty the
Damaged ones and held_qty the Good units declared held; received_qty
is their sum. discrepancies carry the line kinds Short, Over, Damaged,
IncorrectProduct and Hold with w13_code and cbv_disposition.
The payload is bounded because a message the broker refuses blocks the
outbox (ADR 0007): at most 1000 lines (lines with exceptions first, then
in line order; lines_total is the real count and lines_truncated is
true when some are left out), at most 1000 SSCCs per line (sscc_count is
the real count, ssccs_truncated is true when listed ones are fewer) and
at most 200 carton findings (carton_findings_total). A consumer that
needs the full list reads the receipt over REST.
{
"specversion": "1.0",
"id": "7c1d9e3f-5a2b-4c8d-9e0f-1a2b3c4d5e66",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceIssued",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T09:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ReceivingAdviceIssued:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"despatch_advice_ref": "ASN-1001",
"supplier_ref": "ACME",
"owner_ref": "tenant-7f3a",
"issued_at": "2026-10-09T09:30:00Z",
"last_carton_at": "2026-10-09T09:10:00Z",
"sla_seconds": 86400,
"within_sla": true,
"lines": [
{
"line_no": 1,
"sku": "SKU-1",
"gtin": "13041090004824",
"expected_qty": 40,
"received_qty": 34,
"accepted_qty": 25,
"rejected_qty": 4,
"held_qty": 5,
"sscc_count": 2,
"ssccs": [
"340123450000000017",
"340123450000000024"
],
"discrepancies": [
{
"kind": "Short",
"quantity": 6,
"w13_code": "02",
"cbv_disposition": "mismatch_quantity"
},
{
"kind": "Hold",
"quantity": 5,
"w13_code": "09",
"cbv_disposition": "non_conformant"
}
]
}
],
"lines_total": 1,
"carton_findings": [
{
"kind": "UnexpectedCarton",
"sscc": "340123450000000031",
"at": "2026-10-09T09:05:00Z",
"w13_code": "05",
"cbv_disposition": "mismatch_instance"
}
],
"carton_findings_total": 1
}
}
An Open receipt is past the advice SLA since its last unit was received (ADR 0023).
type = com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceOverdue;
subject = the receipt id, key = the ASN number. Raised by the housekeeping
sweep exactly once per receipt that is still Open when
last_carton_at + sla_seconds (due_at) is in the past. It does not stop
the receipt: closing it later still issues the advice, with within_sla
false. overdue_at (the CloudEvents time) is when the sweep saw it.
{
"specversion": "1.0",
"id": "8d2e0f4a-6b3c-4d9e-af10-2b3c4d5e6f77",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceOverdue",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-10T10:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ReceivingAdviceOverdue:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"last_carton_at": "2026-10-09T09:10:00Z",
"due_at": "2026-10-10T09:10:00Z",
"sla_seconds": 86400,
"overdue_at": "2026-10-10T10:00:00Z"
}
}
A receiving tolerance policy was created or replaced.
type = com.warehouse.wms.inbound-receiving.policy.ReceivingPolicyDeclared; subject and
key = the supplier reference (owner variants of one supplier are independent declarations).
Raised by POST /receiving-policies in the same transaction as the upsert (ADR 0026).
ACME house-default policy created.
{
"specversion": "1.0",
"id": "7c9e1b3d-5a2f-4d68-8b04-1e2f3a4b5c6d",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.policy.ReceivingPolicyDeclared",
"subject": "ACME",
"time": "2026-11-13T10:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:events:ReceivingPolicyDeclared:v1",
"data": {
"supplier_ref": "ACME",
"over_tolerance": 0.05,
"under_tolerance": 0.05,
"over_hard_stop": 0.2,
"under_hard_stop": 0.3,
"version": 1,
"declared_at": "2026-11-13T10:00:00Z"
}
}
This service's analytics topic (AnalyticsTopic in
internal/adapters/outbound/kafka/analytics_encoder.go; ADR 0006).
Written by the SAME outbox relay, from rows inserted in the same
transaction as the integration rows (one CloudEvents id per occurrence
on both topics); key as on the integration topic. Consumed ONLY by this
service's inbound-projector under a fixed consumer group read from env
ANALYTICS_CONSUMER_GROUP (at-least-once; the offset is committed after
the projection and the dedupe mark committed together in the analytical
database). The projector dedupes on id, ignores unknown types, skips
(with a rate-limited WARN) anything that is not CloudEvents 1.0, and
dead-letters a known type with an unusable payload to
warehouse.inbound-receiving.analytics.dlq (raw bytes plus x-dlq-*
headers). Not an integration contract: other contexts consume
warehouse.inbound-receiving.events.
Receive the inbound-receiving analytics events.
Route on the full type; the payloads equal the integration payloads
(no analytics-only fields in v1). dataschema is
urn:warehouse:inbound-receiving:analytics:<EventName>:v1.
Available only on servers:
Accepts one of the following messages:
A supplier's advance ship notice was registered, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.asn.ASNRegistered (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ASNRegistered:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "7c1f3a52-0d4e-4b8a-9e61-2a5d8f0c3b14",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.asn.ASNRegistered",
"subject": "ASN-1001",
"time": "2026-10-08T12:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ASNRegistered:v1",
"data": {
"asn_number": "ASN-1001",
"supplier_ref": "ACME",
"registered_at": "2026-10-08T12:00:00Z",
"expected_arrival": "2026-10-09T08:00:00Z",
"lines": [
{
"line_no": 1,
"sku": "SKU-1",
"expected_qty": 40
},
{
"line_no": 2,
"sku": "SKU-2",
"expected_qty": 5
}
]
}
}
A Registered ASN was cancelled, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.asn.ASNCancelled (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ASNCancelled:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "1e9b4d70-3c2a-4f5d-8b17-6a0c9d2e7f31",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.asn.ASNCancelled",
"subject": "ASN-1001",
"time": "2026-10-08T12:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ASNCancelled:v1",
"data": {
"asn_number": "ASN-1001",
"reason": "Supplier cancelled the shipment"
}
}
An ASN was registered after its visit had arrived, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.asn.AsnLateForArrival (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:AsnLateForArrival:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "5b7c1e93-4a0b-4c6d-9e82-3f1a2b4c5d63",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.asn.AsnLateForArrival",
"subject": "ASN-1001",
"time": "2026-10-09T08:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:AsnLateForArrival:v1",
"data": {
"asn_number": "ASN-1001",
"supplier_ref": "ACME",
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"visit_id": "visit-9f1c2a34-5b6d-4e7f-8a90-b1c2d3e4f5a6",
"asn_registered_at": "2026-10-09T08:02:00Z",
"arrived_at": "2026-10-09T08:00:00Z",
"lateness_seconds": 120
}
}
Receiving of an ASN started, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptOpened (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceiptOpened:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "d4e6f8a0-3b5c-4d7e-9f1a-2b3c4d5e6f70",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptOpened",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T08:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ReceiptOpened:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"door_code": "WH1-DOCK-IN-01",
"opened_at": "2026-10-09T08:05:00Z"
}
}
A quantity was received against a line (the handover event), on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptLineReceived (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceiptLineReceived:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "3f8f6c2e-9b1a-4d6e-8a52-0c7d1e4b9a10",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptLineReceived",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T08:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ReceiptLineReceived:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"line_no": 1,
"sku": "SKU-1",
"quantity": 40,
"condition": "Good",
"received_at": "2026-10-09T08:10:00Z"
}
}
A carton (or one case) was received - identity only.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptCartonReceived;
subject = the receipt id, key = the ASN number. Same payload as on the integration topic; dataschema urn:warehouse:inbound-receiving:analytics:ReceiptCartonReceived:v1.
IDENTITY ONLY: it never books quantity (ReceiptLineReceived stays the
sole quantity authority, in eaches). inventory-storage uses it to
create or link a Container keyed (receipt_id, line_no, lpn), in either
arrival order. lpn is the SSCC, or an internal LPN-<ulid> for a
case received without one. There is no site: the site is derived by
inventory-storage at stow (ADR 0013).
{
"specversion": "1.0",
"id": "4a9f6c2e-9b1a-4d6e-8a52-0c7d1e4b9a11",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptCartonReceived",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T08:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ReceiptCartonReceived:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"sscc": "340123450000000017",
"sealed": true,
"lpn": "340123450000000017",
"contents": [
{
"line_no": 1,
"sku": "SKU-1",
"gtin": "13041090004824",
"qty": 24,
"condition": "Good"
}
],
"received_at": "2026-10-09T08:10:00Z"
}
}
A finding about a physical carton.
type = com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaised;
subject = the receipt id, key = the ASN number. Same payload as on the integration topic; dataschema urn:warehouse:inbound-receiving:analytics:CartonDiscrepancyRaised:v1.
Carton discrepancies travel ONLY on this event; ReceiptClosed keeps
its three v1 kinds. A refused scan books nothing and raises this
event; an accepted carton can raise it too (for example
UnlabelledCarton).
{
"specversion": "1.0",
"id": "5b0a7d3f-0c2b-4e7f-9b63-1d8e2f5c0b22",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaised",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T08:10:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:CartonDiscrepancyRaised:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"sscc": "340123450000000017",
"kind": "UnexpectedCarton",
"at": "2026-10-09T08:10:00Z"
}
}
Receiving ended, with the discrepancies against the ASN, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptClosed (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceiptClosed:v1; payload equal to the integration payload.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "e5f7a9b1-4c6d-4e8f-a02b-3c4d5e6f7a81",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptClosed",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T09:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ReceiptClosed:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"closed_at": "2026-10-09T09:30:00Z",
"discrepancies": [
{
"line_no": 1,
"sku": "SKU-1",
"kind": "Short",
"expected_qty": 40,
"received_qty": 34,
"damaged_qty": 4
},
{
"line_no": 1,
"sku": "SKU-1",
"kind": "Damaged",
"expected_qty": 40,
"received_qty": 34,
"damaged_qty": 4
},
{
"line_no": 2,
"sku": "SKU-2",
"kind": "Over",
"expected_qty": 5,
"received_qty": 7,
"damaged_qty": 0
}
]
}
}
The dock-to-stock fact of a receipt, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptStowCompleted (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceiptStowCompleted:v1; payload equal to the integration payload. The projector folds it into dock_to_stock_facts, one row per receipt.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "9a3b5c7d-1e2f-4a8b-b6c4-0d1e2f3a4b55",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceiptStowCompleted",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T07:00:01Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ReceiptStowCompleted:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"arrived_at": "2026-10-09T05:00:00Z",
"closed_at": "2026-10-09T06:30:00Z",
"stowed_at": "2026-10-09T07:00:00Z",
"dock_to_stock_seconds": 7200,
"carton_count": 12
}
}
The receiving advice, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceIssued (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceivingAdviceIssued:v1; payload equal to the integration payload. The projector folds within_sla into advice_facts, one row per receipt (ADR 0023).
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "7c1d9e3f-5a2b-4c8d-9e0f-1a2b3c4d5e66",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceIssued",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T09:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ReceivingAdviceIssued:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"despatch_advice_ref": "ASN-1001",
"supplier_ref": "ACME",
"owner_ref": "tenant-7f3a",
"issued_at": "2026-10-09T09:30:00Z",
"last_carton_at": "2026-10-09T09:10:00Z",
"sla_seconds": 86400,
"within_sla": true,
"lines": [
{
"line_no": 1,
"sku": "SKU-1",
"gtin": "13041090004824",
"expected_qty": 40,
"received_qty": 34,
"accepted_qty": 25,
"rejected_qty": 4,
"held_qty": 5,
"sscc_count": 2,
"ssccs": [
"340123450000000017",
"340123450000000024"
],
"discrepancies": [
{
"kind": "Short",
"quantity": 6,
"w13_code": "02",
"cbv_disposition": "mismatch_quantity"
},
{
"kind": "Hold",
"quantity": 5,
"w13_code": "09",
"cbv_disposition": "non_conformant"
}
]
}
],
"lines_total": 1,
"carton_findings": [
{
"kind": "UnexpectedCarton",
"sscc": "340123450000000031",
"at": "2026-10-09T09:05:00Z",
"w13_code": "05",
"cbv_disposition": "mismatch_instance"
}
],
"carton_findings_total": 1
}
}
The overdue alarm, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceOverdue (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceivingAdviceOverdue:v1; payload equal to the integration payload. The projector acknowledges and ignores it: the KPI reads the advices issued, not the alarms.
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "8d2e0f4a-6b3c-4d9e-af10-2b3c4d5e6f77",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceOverdue",
"subject": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-10T10:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ReceivingAdviceOverdue:v1",
"data": {
"receipt_id": "rcpt-223e4567-e89b-12d3-a456-426614174000",
"asn_number": "ASN-1001",
"last_carton_at": "2026-10-09T09:10:00Z",
"due_at": "2026-10-10T09:10:00Z",
"sla_seconds": 86400,
"overdue_at": "2026-10-10T10:00:00Z"
}
}
A receiving tolerance policy was created or replaced, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.policy.ReceivingPolicyDeclared (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceivingPolicyDeclared:v1; payload equal to the integration payload. The projector does not fold it (the tolerance block reads closes, not declarations).
The analytics copy of the integration example (same id).
{
"specversion": "1.0",
"id": "7c9e1b3d-5a2f-4d68-8b04-1e2f3a4b5c6d",
"source": "/warehouse/inbound-receiving",
"type": "com.warehouse.wms.inbound-receiving.policy.ReceivingPolicyDeclared",
"subject": "ACME",
"time": "2026-11-13T10:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inbound-receiving:analytics:ReceivingPolicyDeclared:v1",
"data": {
"supplier_ref": "ACME",
"over_tolerance": 0.05,
"under_tolerance": 0.05,
"over_hard_stop": 0.2,
"under_hard_stop": 0.3,
"version": 1,
"declared_at": "2026-11-13T10:00:00Z"
}
}
product-master's integration topic. ProductRegistered feeds the
known_skus local copy (ADR 0003, group from env PRODUCT_CONSUMER_GROUP,
always running); ProductPackLevelDeclared and
ProductPackLevelRetired feed the packaging view (group from env
PACKAGING_CONSUMER_GROUP). Every other type on the topic is ignored.
Consume product-master's ProductRegistered.
Upserts the SKU into known_skus. The CloudEvents id claim and the
effect commit in one transaction; the offset is committed afterwards.
Anything that is not a valid CloudEvent is skipped with a WARN.
Available only on servers:
Accepts one of the following messages:
A SKU was registered as a product.
type = com.warehouse.wms.product-master.product.ProductRegistered,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductRegistered:v1; subject and
key = the SKU. Produced by product-master; verified against its
origin/develop contract on 2026-10-08.
SKU-1 registered.
{
"specversion": "1.0",
"id": "1b0c9a4e-2f7d-4a63-9d1e-5a7c3e2b9f10",
"source": "/warehouse/product-master",
"type": "com.warehouse.wms.product-master.product.ProductRegistered",
"subject": "SKU-1",
"time": "2026-10-06T21:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:product-master:events:ProductRegistered:v1",
"data": {
"sku": "SKU-1",
"description": "Lithium battery pack 12V",
"version": 1
}
}
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).
{
"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
}
}
facility-layout's integration topic. Consumed ONLY for
LocationSlotRegistered and LocationSlotDecommissioned (ADR 0003),
into the dock_doors local copy, with a stable consumer group read from
env DOCK_DOOR_CONSUMER_GROUP; the consumer always runs. Every other type on the topic is ignored. Key =
locationCode.
Consume facility-layout's slot registrations and decommissions.
A registration with role=Dock and dockFlow of Inbound or Both
upserts a door; any other registration is ignored. A decommission
deletes the door of that locationCode (a no-op for any other slot).
The CloudEvents id claim and the effect commit in one transaction;
the offset is committed afterwards.
Available only on servers:
Accepts one of the following messages:
A coded slot now exists on the warehouse map.
type = com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered,
source /warehouse/facility-layout, dataschema
urn:warehouse:facility-layout:events:LocationSlotRegistered:v1; key =
locationCode. data is camelCase and carries the domain event
verbatim (eventName, eventType, occurredAt included). An absent
role means Storage; dockFlow is present only for role=Dock.
Only role=Dock with dockFlow Inbound or Both is kept.
An inbound dock door.
{
"specversion": "1.0",
"id": "6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered",
"subject": "WH1-DOCK-IN-01",
"time": "2026-10-01T10:00: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-10-01T10:00:00Z",
"locationCode": "WH1-DOCK-IN-01",
"aisleId": "WH1-DOCK-A01",
"zoneId": "WH1-DOCK-AMB",
"locationType": "DockDoor",
"role": "Dock",
"dockFlow": "Inbound",
"maxWeightKg": 0,
"maxVolumeM3": 0
}
}
A coded slot was permanently retired.
type = com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned,
source /warehouse/facility-layout, dataschema
urn:warehouse:facility-layout:events:LocationSlotDecommissioned:v1;
key = locationCode. Removes the door from the local copy when the
code is one.
The door was retired.
{
"specversion": "1.0",
"id": "7b8c9d0e-1f2a-4b3c-9d4e-5f6a7b8c9d0e",
"source": "/warehouse/facility-layout",
"type": "com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned",
"subject": "WH1-DOCK-IN-01",
"time": "2026-10-05T10: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-05T10:00:00Z",
"locationCode": "WH1-DOCK-IN-01"
}
}
dock-scheduling's integration topic (ADR 0019, 0020, plan YD-0002).
Consumed ONLY for DockAppointmentBooked, DockAppointmentCancelled,
DockAppointmentRescheduled and DockAppointmentDoorReassigned, into
the appointments local copy, with a stable consumer group read from
env DOCK_APPOINTMENT_CONSUMER_GROUP; the consumer always runs. Every
other type on the topic (DockAppointmentNoShow, check-in, door
closures, ...) is committed past untouched. Key = appointment_id.
DockAppointmentDoorReassigned may not be published on this topic yet;
the consumer does not depend on it arriving.
Consume dock-scheduling's appointment bookings, cancellations, reschedules and door reassignments.
A DockAppointmentBooked with direction=INBOUND upserts the
appointment (door, carrier, window, ASN numbers); an OUTBOUND one is
ignored. A DockAppointmentCancelled marks the stored appointment
cancelled. A DockAppointmentRescheduled moves the stored
appointment's door and window; a DockAppointmentDoorReassigned moves
its door (ADR 0020). All four are guarded by version: an event is
applied only if its version is greater than the stored one (a legacy
row has version 0, so any dock-scheduling version wins), and no later
event revives a cancelled appointment. A reschedule or reassignment
of an appointment that is not in the copy (an OUTBOUND one, or one
not seen yet) is ignored and logged at DEBUG. Receipts already open
keep their door; receipts opened afterwards take the new one. The
CloudEvents id claim and the effect commit in one transaction; the
offset is committed afterwards. NO-LOOP: applying an event writes
nothing to the outbox. A payload that breaks a rule of this context
is skipped with a WARN, a transient error is retried.
Available only on servers:
Accepts one of the following messages:
dock-scheduling booked (or imported) a dock appointment.
type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBooked,
source /warehouse/dock-scheduling; key and subject = appointment_id.
data is snake_case. Only the fields in the schema are read; the rest
of dock-scheduling's payload (site_id, carrier_scac, cpt_id,
shipment_refs, expected_seal_number, provenance,
arrival_tolerance_minutes, ...) is ignored.
An inbound appointment covering ASN-1001.
{
"specversion": "1.0",
"id": "0b6d1c4e-7a2f-4d83-9e15-3c8a5f7b9d21",
"source": "/warehouse/dock-scheduling",
"type": "com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBooked",
"subject": "appt-123e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-08T12:05:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:dock-scheduling:events:DockAppointmentBooked:v1",
"data": {
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"site_id": "WH1",
"direction": "INBOUND",
"door_code": "WH1-DOCK-IN-01",
"carrier": "ACME Freight",
"carrier_scac": "ACMF",
"window_start": "2026-10-09T08:00:00Z",
"window_end": "2026-10-09T10:00:00Z",
"asn_numbers": [
"ASN-1001"
],
"shipment_refs": [],
"provenance": "native",
"version": 1
}
}
dock-scheduling cancelled a dock appointment.
type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCancelled,
source /warehouse/dock-scheduling; key and subject = appointment_id.
Only appointment_id and version are read.
The carrier asked to cancel.
{
"specversion": "1.0",
"id": "5e9a3b7c-1d4f-4a60-8b2e-7c0d9f1a3e45",
"source": "/warehouse/dock-scheduling",
"type": "com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCancelled",
"subject": "appt-123e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-08T13:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:dock-scheduling:events:DockAppointmentCancelled:v1",
"data": {
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"site_id": "WH1",
"door_code": "WH1-DOCK-IN-01",
"reason": "CARRIER_REQUEST",
"version": 2
}
}
dock-scheduling moved a dock appointment to a new window and possibly a new door.
type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentRescheduled,
source /warehouse/dock-scheduling; key and subject = appointment_id.
data is snake_case. The copy takes door_code, window_start and
window_end at version (ADR 0020); previous_door_code is logged,
and site_id, previous_window_* and arrival_tolerance_minutes are
ignored. Receipts already open keep their door.
The carrier is two hours late and is moved to another door.
{
"specversion": "1.0",
"id": "8c2f4a1e-3b5d-4e7f-9a60-1d2c3b4a5e6f",
"source": "/warehouse/dock-scheduling",
"type": "com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentRescheduled",
"subject": "appt-123e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T07:30:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:dock-scheduling:events:DockAppointmentRescheduled:v1",
"data": {
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"site_id": "WH1",
"door_code": "WH1-DOCK-IN-03",
"previous_door_code": "WH1-DOCK-IN-01",
"window_start": "2026-10-09T10:00:00Z",
"window_end": "2026-10-09T12:00:00Z",
"previous_window_start": "2026-10-09T08:00:00Z",
"previous_window_end": "2026-10-09T10:00:00Z",
"arrival_tolerance_minutes": 15,
"version": 2
}
}
The appointment's door was reassigned (the window is unchanged).
type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentDoorReassigned,
source /warehouse/dock-scheduling; key and subject = appointment_id.
The copy takes to_door_code at version (ADR 0020);
from_door_code is logged, not checked. dock-scheduling is moving this
type onto its integration topic; until then it never arrives and the
consumer does not depend on it. Receipts already open keep their door.
The booked door is blocked; the yard sends the truck to door 04.
{
"specversion": "1.0",
"id": "2a7e9c4b-6d1f-4b38-8e25-9f0a1b2c3d4e",
"source": "/warehouse/dock-scheduling",
"type": "com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentDoorReassigned",
"subject": "appt-123e4567-e89b-12d3-a456-426614174000",
"time": "2026-10-09T07:50:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:dock-scheduling:events:DockAppointmentDoorReassigned:v1",
"data": {
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"site_id": "WH1",
"from_door_code": "WH1-DOCK-IN-01",
"to_door_code": "WH1-DOCK-IN-04",
"version": 3
}
}
yard-management's integration topic (ADR 0021). Consumed ONLY for
VisitCheckedIn, into the visit_arrivals local copy, with a stable
consumer group read from env VISIT_ARRIVAL_CONSUMER_GROUP; the
consumer always runs. Every other type on the topic (VisitRejected,
TrailerDocked, TrailerDeparted, ...) is committed past untouched.
Key = visit_id.
Consume yard-management's gate arrivals.
A VisitCheckedIn carrying an appointment_id stores the earliest
arrived_at seen for that appointment (idempotent, order-independent;
a redelivery or a later duplicate never moves it). A walk-in visit
(appointment_id null) is ignored: there is no receipt to join it
to. After storing, the use case evaluates the dock-to-stock fact of
the receipt opened from that appointment (ADR 0021) and may raise
ReceiptStowCompleted through this service's outbox, never anything
towards yard-management. The CloudEvents id claim and the effect
commit in one transaction; the offset is committed afterwards. A
payload that breaks a rule of this context is skipped with a WARN, a
transient error is retried.
Available only on servers:
Accepts the following message:
A carrier physically arrived at the gate.
type = com.warehouse.wms.yard-management.yardvisit.VisitCheckedIn,
source /warehouse/yard-management. data is snake_case. Only the
fields in the schema are read; the rest of yard-management's payload
(site_id, carrier, carrier_scac, purpose, trailers, ...) is
ignored.
{
"specversion": "1.0",
"id": "7d1c9e2a-3b4f-4a60-8c15-9e2f0a1b3c44",
"source": "/warehouse/yard-management",
"type": "com.warehouse.wms.yard-management.yardvisit.VisitCheckedIn",
"subject": "visit-5b1f0c3e",
"time": "2026-10-09T05:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:yard-management:events:VisitCheckedIn:v1",
"data": {
"visit_id": "visit-5b1f0c3e",
"site_id": "WH1",
"purpose": "LIVE_UNLOAD",
"appointment_id": "appt-123e4567-e89b-12d3-a456-426614174000",
"arrived_at": "2026-10-09T05:00:00Z",
"version": 1
}
}
inventory-storage's integration topic (ADR 0021). Consumed ONLY for
ContainerStowed, into the carton_stows local copy, with a stable
consumer group read from env CARTON_STOW_CONSUMER_GROUP; the consumer
always runs. Every other type on the topic (ItemStowed, which has no
license plate and so cannot be joined to a carton, CaseBroken, ...)
is committed past untouched. Key and subject of ContainerStowed = the
LPN.
Consume inventory-storage's container stows.
A ContainerStowed stores the earliest at seen for its lpn
(idempotent, order-independent: a later move of the container to
another bin is not a new stow). A receipt carton is joined to it by
its SSCC, which is the lpn. After storing, the use case evaluates
the dock-to-stock fact of the receipts holding that carton (ADR 0021)
and may raise ReceiptStowCompleted through this service's outbox,
never anything towards inventory-storage. Claim, effect and offset
follow the same rules as the dock-scheduling consumer.
Available only on servers:
Accepts the following message:
A container (license plate) was put away into a bin.
type = com.warehouse.wms.inventory-storage.container.ContainerStowed,
source /warehouse/inventory-storage. data is snake_case. Only
lpn and at are read; the rest (sku, qty_eaches, owner_ref,
site_id, bin) is ignored.
{
"specversion": "1.0",
"id": "2c8e4f6a-91b0-4d37-a5e2-6b7c8d9e0f11",
"source": "/warehouse/inventory-storage",
"type": "com.warehouse.wms.inventory-storage.container.ContainerStowed",
"subject": "340123450000000017",
"time": "2026-10-09T07:00:00Z",
"datacontenttype": "application/json",
"dataschema": "urn:warehouse:inventory-storage:events:ContainerStowed:v1",
"data": {
"lpn": "340123450000000017",
"sku": "SKU-1",
"qty_eaches": 20,
"site_id": "WH1",
"bin": "WH1-STOR-A01",
"at": "2026-10-09T07:00:00Z"
}
}
dock-scheduling booked (or imported) a dock appointment.
type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBooked,
source /warehouse/dock-scheduling; key and subject = appointment_id.
data is snake_case. Only the fields in the schema are read; the rest
of dock-scheduling's payload (site_id, carrier_scac, cpt_id,
shipment_refs, expected_seal_number, provenance,
arrival_tolerance_minutes, ...) is ignored.
dock-scheduling cancelled a dock appointment.
type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCancelled,
source /warehouse/dock-scheduling; key and subject = appointment_id.
Only appointment_id and version are read.
dock-scheduling moved a dock appointment to a new window and possibly a new door.
type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentRescheduled,
source /warehouse/dock-scheduling; key and subject = appointment_id.
data is snake_case. The copy takes door_code, window_start and
window_end at version (ADR 0020); previous_door_code is logged,
and site_id, previous_window_* and arrival_tolerance_minutes are
ignored. Receipts already open keep their door.
The appointment's door was reassigned (the window is unchanged).
type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentDoorReassigned,
source /warehouse/dock-scheduling; key and subject = appointment_id.
The copy takes to_door_code at version (ADR 0020);
from_door_code is logged, not checked. dock-scheduling is moving this
type onto its integration topic; until then it never arrives and the
consumer does not depend on it. Receipts already open keep their door.
A supplier's advance ship notice was registered.
type = com.warehouse.wms.inbound-receiving.asn.ASNRegistered; subject and key = the ASN number.
A Registered ASN was cancelled.
type = com.warehouse.wms.inbound-receiving.asn.ASNCancelled; subject and key = the ASN number.
An ASN was registered after the visit it was received under had already arrived.
type = com.warehouse.wms.inbound-receiving.asn.AsnLateForArrival; subject and key = the ASN number.
Raised once per ASN, at OpenReceipt and only there (the only place an ASN and an
appointment meet), when asn_registered_at > arrived_at of the appointment's earliest
yard visit (ADR 0025); lateness_seconds = asn_registered_at - arrived_at, whole
seconds, >= 1 by construction. An on-time ASN, a walk-in receipt, an appointment with
no arrival seen yet and a legacy ASN with an unknown registration raise nothing.
Receiving of an ASN started.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptOpened; subject = the receipt id, key = the ASN number.
A quantity was received against a line (the handover event).
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptLineReceived;
subject = the receipt id, key = the ASN number. inventory-storage
books condition=Good quantities with its ReceiveStock use case and
ignores Damaged; it dedupes on the CloudEvents id.
A carton (or one case) was received - identity only.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptCartonReceived;
subject = the receipt id, key = the ASN number.
IDENTITY ONLY: it never books quantity (ReceiptLineReceived stays the
sole quantity authority, in eaches). inventory-storage uses it to
create or link a Container keyed (receipt_id, line_no, lpn), in either
arrival order. lpn is the SSCC, or an internal LPN-<ulid> for a
case received without one. There is no site: the site is derived by
inventory-storage at stow (ADR 0013).
A finding about a physical carton.
type = com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaised;
subject = the receipt id, key = the ASN number.
Carton discrepancies travel ONLY on this event; ReceiptClosed keeps
its three v1 kinds. A refused scan books nothing and raises this
event; an accepted carton can raise it too (for example
UnlabelledCarton).
A receiving tolerance policy was created or replaced.
type = com.warehouse.wms.inbound-receiving.policy.ReceivingPolicyDeclared; subject and
key = the supplier reference (owner variants of one supplier are independent declarations).
Raised by POST /receiving-policies in the same transaction as the upsert (ADR 0026).
Receiving ended, with the discrepancies against the ASN.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptClosed;
subject = the receipt id, key = the ASN number. discrepancies is
present and empty when everything matched; a line can appear once per
kind (Short, Over, Damaged); each carries w13_code and
cbv_disposition (ADR 0023). Under a declared receiving policy (ADR 0026) the
close judges each line against the band: a within-band variance raises no finding,
an override raises OverTolerance (W13 03) or UnderTolerance (W13 02) with
the reason_code the operator gave, and the optional tolerance object names the
band the close was judged under (present exactly when a policy was applied).
A carrier physically arrived at the gate.
type = com.warehouse.wms.yard-management.yardvisit.VisitCheckedIn,
source /warehouse/yard-management. data is snake_case. Only the
fields in the schema are read; the rest of yard-management's payload
(site_id, carrier, carrier_scac, purpose, trailers, ...) is
ignored.
A container (license plate) was put away into a bin.
type = com.warehouse.wms.inventory-storage.container.ContainerStowed,
source /warehouse/inventory-storage. data is snake_case. Only
lpn and at are read; the rest (sku, qty_eaches, owner_ref,
site_id, bin) is ignored.
The dock-to-stock fact of a receipt (ADR 0021).
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptStowCompleted;
subject = the receipt id, key = the ASN number. Raised exactly once,
for a Closed receipt opened from an appointment, when every Good
carton has a stow from inventory-storage and the gate arrival from
yard-management is known, whatever order those facts and the close
arrive in. dock_to_stock_seconds is stowed_at - arrived_at in
whole seconds, never negative; stowed_at is the latest stow of a
Good carton and carton_count how many Good cartons that is. At
(the CloudEvents time) is when the completion was observed.
The dock-to-stock fact of a receipt, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptStowCompleted (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceiptStowCompleted:v1; payload equal to the integration payload. The projector folds it into dock_to_stock_facts, one row per receipt.
What was received and accepted per line, with W13/CBV-coded discrepancies, for the supplier or the 3PL depositor (ADR 0023).
type = com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceIssued;
subject = the receipt id, key = the ASN number. The domain fact only: this
service renders no EANCOM, X12 or transport. Raised exactly once per
receipt, in the same transaction as ReceiptClosed (right after it), for a
receipt closed after this event existed; a receipt closed earlier gets no
advice. despatch_advice_ref is the ASN number (the reference to the
despatch advice), supplier_ref the supplier as the ASN knows it and
owner_ref the 3PL depositor (omitted for fleet-owned stock). last_carton_at
is when the last unit was received (the receipt's opening when nothing
was); within_sla is issued_at - last_carton_at <= sla_seconds
(RECEIVING_ADVICE_SLA, default 24 h). Per line the three quantities are
exclusive: accepted_qty is the Good units not held, rejected_qty the
Damaged ones and held_qty the Good units declared held; received_qty
is their sum. discrepancies carry the line kinds Short, Over, Damaged,
IncorrectProduct and Hold with w13_code and cbv_disposition.
The payload is bounded because a message the broker refuses blocks the
outbox (ADR 0007): at most 1000 lines (lines with exceptions first, then
in line order; lines_total is the real count and lines_truncated is
true when some are left out), at most 1000 SSCCs per line (sscc_count is
the real count, ssccs_truncated is true when listed ones are fewer) and
at most 200 carton findings (carton_findings_total). A consumer that
needs the full list reads the receipt over REST.
The receiving advice, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceIssued (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceivingAdviceIssued:v1; payload equal to the integration payload. The projector folds within_sla into advice_facts, one row per receipt (ADR 0023).
An Open receipt is past the advice SLA since its last unit was received (ADR 0023).
type = com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceOverdue;
subject = the receipt id, key = the ASN number. Raised by the housekeeping
sweep exactly once per receipt that is still Open when
last_carton_at + sla_seconds (due_at) is in the past. It does not stop
the receipt: closing it later still issues the advice, with within_sla
false. overdue_at (the CloudEvents time) is when the sweep saw it.
The overdue alarm, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceivingAdviceOverdue (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceivingAdviceOverdue:v1; payload equal to the integration payload. The projector acknowledges and ignores it: the KPI reads the advices issued, not the alarms.
A supplier's advance ship notice was registered, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.asn.ASNRegistered (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ASNRegistered:v1; payload equal to the integration payload.
A Registered ASN was cancelled, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.asn.ASNCancelled (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ASNCancelled:v1; payload equal to the integration payload.
An ASN was registered after its visit had arrived, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.asn.AsnLateForArrival (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:AsnLateForArrival:v1; payload equal to the integration payload.
Receiving of an ASN started, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptOpened (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceiptOpened:v1; payload equal to the integration payload.
A quantity was received against a line (the handover event), on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptLineReceived (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceiptLineReceived:v1; payload equal to the integration payload.
A carton (or one case) was received - identity only.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptCartonReceived;
subject = the receipt id, key = the ASN number. Same payload as on the integration topic; dataschema urn:warehouse:inbound-receiving:analytics:ReceiptCartonReceived:v1.
IDENTITY ONLY: it never books quantity (ReceiptLineReceived stays the
sole quantity authority, in eaches). inventory-storage uses it to
create or link a Container keyed (receipt_id, line_no, lpn), in either
arrival order. lpn is the SSCC, or an internal LPN-<ulid> for a
case received without one. There is no site: the site is derived by
inventory-storage at stow (ADR 0013).
A finding about a physical carton.
type = com.warehouse.wms.inbound-receiving.receipt.CartonDiscrepancyRaised;
subject = the receipt id, key = the ASN number. Same payload as on the integration topic; dataschema urn:warehouse:inbound-receiving:analytics:CartonDiscrepancyRaised:v1.
Carton discrepancies travel ONLY on this event; ReceiptClosed keeps
its three v1 kinds. A refused scan books nothing and raises this
event; an accepted carton can raise it too (for example
UnlabelledCarton).
A receiving tolerance policy was created or replaced, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.policy.ReceivingPolicyDeclared (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceivingPolicyDeclared:v1; payload equal to the integration payload. The projector does not fold it (the tolerance block reads closes, not declarations).
Receiving ended, with the discrepancies against the ASN, on the analytics stream.
type = com.warehouse.wms.inbound-receiving.receipt.ReceiptClosed (the same as on the integration topic); dataschema urn:warehouse:inbound-receiving:analytics:ReceiptClosed:v1; payload equal to the integration payload.
A SKU was registered as a product.
type = com.warehouse.wms.product-master.product.ProductRegistered,
source /warehouse/product-master, dataschema
urn:warehouse:product-master:events:ProductRegistered:v1; subject and
key = the SKU. Produced by product-master; verified against its
origin/develop contract on 2026-10-08.
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).
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).
A coded slot now exists on the warehouse map.
type = com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered,
source /warehouse/facility-layout, dataschema
urn:warehouse:facility-layout:events:LocationSlotRegistered:v1; key =
locationCode. data is camelCase and carries the domain event
verbatim (eventName, eventType, occurredAt included). An absent
role means Storage; dockFlow is present only for role=Dock.
Only role=Dock with dockFlow Inbound or Both is kept.
A coded slot was permanently retired.
type = com.warehouse.wms.facility-layout.locationslot.LocationSlotDecommissioned,
source /warehouse/facility-layout, dataschema
urn:warehouse:facility-layout:events:LocationSlotDecommissioned:v1;
key = locationCode. Removes the door from the local copy when the
code is one.