inbound-receiving Domain Events 1.0.0

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.

  • #inbound-receiving
  • #asn
  • #receipt
  • #consumed
  • #analytics

Servers

  • {brokers}kafkaproduction

    Fleet-shared Kafka broker (host supplied by the deployment environment).

    object
    string
    required
    Security:
    security.protocol:PLAINTEXT

Operations

  • SUB warehouse.inbound-receiving.events

    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>).

    Operation IDreceiveInboundReceivingEvents

    Available only on servers:

    • #asn
    • #receipt
    • #policy

    Accepts one of the following messages:

    • #0ASN registered

      A supplier's advance ship notice was registered.

      type = com.warehouse.wms.inbound-receiving.asn.ASNRegistered; subject and key = the ASN number.

      allOf
      • #asn

      Examples

    • #1ASN cancelled

      A Registered ASN was cancelled.

      type = com.warehouse.wms.inbound-receiving.asn.ASNCancelled; subject and key = the ASN number.

      allOf
      • #asn

      Examples

    • #2ASN late for arrival

      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.

      allOf
      • #asn

      Examples

    • #3Receipt opened

      Receiving of an ASN started.

      type = com.warehouse.wms.inbound-receiving.receipt.ReceiptOpened; subject = the receipt id, key = the ASN number.

      allOf
      • #receipt

      Examples

    • #4Receipt line received

      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.

      allOf
      • #receipt

      Examples

    • #5Receipt carton received

      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).

      allOf
      • #receipt

      Examples

    • #6Carton discrepancy raised

      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).

      allOf
      • #receipt

      Examples

    • #7Receipt closed

      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).

      allOf
      • #receipt

      Examples

    • #8Receipt stow completed

      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.

      allOf
      • #receipt

      Examples

    • #9Receiving advice issued

      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.

      allOf
      • #receipt

      Examples

    • #10Receiving advice overdue

      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.

      allOf
      • #receipt

      Examples

    • #11Receiving policy declared

      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).

      allOf
      • #policy

      Examples

  • SUB warehouse.inbound-receiving.analytics

    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.

    Operation IDreceiveInboundReceivingAnalyticsEvents

    Available only on servers:

    • #analytics

    Accepts one of the following messages:

    • #0ASN registered (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #1ASN cancelled (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #2ASN late for arrival (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #3Receipt opened (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #4Receipt line received (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #5Receipt carton received

      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).

      allOf
      • #analytics

      Examples

    • #6Carton discrepancy raised

      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).

      allOf
      • #analytics

      Examples

    • #7Receipt closed (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #8Receipt stow completed (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #9Receiving advice issued (analytics)

      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).

      allOf
      • #analytics

      Examples

    • #10Receiving advice overdue (analytics)

      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.

      allOf
      • #analytics

      Examples

    • #11Receiving policy declared (analytics)

      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).

      allOf
      • #analytics

      Examples

  • PUB warehouse.product-master.events

    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.

    Operation IDconsumeProductRegistered

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0product-master ProductRegistered (consumed)

      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.

      allOf
      • #consumed

      Examples

    • #1product-master ProductPackLevelDeclared (consumed)

      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).

      allOf
      • #consumed

      Examples

    • #2product-master ProductPackLevelRetired (consumed)

      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).

      allOf
      • #consumed

      Examples

  • PUB warehouse.facility.events

    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.

    Operation IDconsumeDockDoorEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0facility-layout LocationSlotRegistered (consumed)

      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.

      allOf
      • #consumed

      Examples

    • #1facility-layout LocationSlotDecommissioned (consumed)

      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.

      allOf
      • #consumed

      Examples

  • PUB warehouse.dock-scheduling.events

    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.

    Operation IDconsumeDockAppointmentEvents

    Available only on servers:

    • #consumed

    Accepts one of the following messages:

    • #0dock-scheduling DockAppointmentBooked (consumed)

      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.

      allOf
      • #consumed

      Examples

    • #1dock-scheduling DockAppointmentCancelled (consumed)

      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.

      allOf
      • #consumed

      Examples

    • #2dock-scheduling DockAppointmentRescheduled (consumed)

      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.

      allOf
      • #consumed

      Examples

    • #3dock-scheduling DockAppointmentDoorReassigned (consumed)

      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.

      allOf
      • #consumed

      Examples

  • PUB warehouse.yard-management.events

    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.

    Operation IDconsumeYardVisitEvents

    Available only on servers:

    • #consumed

    Accepts the following message:

    yard-management VisitCheckedIn (consumed)

    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.

    allOf
    • #consumed

    Examples

  • PUB warehouse.inventory.events

    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.

    Operation IDconsumeInventoryContainerStowed

    Available only on servers:

    • #consumed

    Accepts the following message:

    inventory-storage ContainerStowed (consumed)

    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.

    allOf
    • #consumed

    Examples

Messages

  • #1dock-scheduling DockAppointmentBooked (consumed)

    dock-scheduling booked (or imported) a dock appointment.

    Message IDDockSchedulingAppointmentBooked

    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.

    allOf
    • #consumed
  • #2dock-scheduling DockAppointmentCancelled (consumed)

    dock-scheduling cancelled a dock appointment.

    Message IDDockSchedulingAppointmentCancelled

    type = com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentCancelled, source /warehouse/dock-scheduling; key and subject = appointment_id. Only appointment_id and version are read.

    allOf
    • #consumed
  • #3dock-scheduling DockAppointmentRescheduled (consumed)

    dock-scheduling moved a dock appointment to a new window and possibly a new door.

    Message IDDockSchedulingAppointmentRescheduled

    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.

    allOf
    • #consumed
  • #4dock-scheduling DockAppointmentDoorReassigned (consumed)

    The appointment's door was reassigned (the window is unchanged).

    Message IDDockSchedulingAppointmentDoorReassigned

    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.

    allOf
    • #consumed
  • #5ASN registered

    A supplier's advance ship notice was registered.

    Message IDASNRegistered

    type = com.warehouse.wms.inbound-receiving.asn.ASNRegistered; subject and key = the ASN number.

    allOf
    • #asn
  • #6ASN cancelled

    A Registered ASN was cancelled.

    Message IDASNCancelled

    type = com.warehouse.wms.inbound-receiving.asn.ASNCancelled; subject and key = the ASN number.

    allOf
    • #asn
  • #7ASN late for arrival

    An ASN was registered after the visit it was received under had already arrived.

    Message IDAsnLateForArrival

    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.

    allOf
    • #asn
  • #8Receipt opened

    Receiving of an ASN started.

    Message IDReceiptOpened

    type = com.warehouse.wms.inbound-receiving.receipt.ReceiptOpened; subject = the receipt id, key = the ASN number.

    allOf
    • #receipt
  • #9Receipt line received

    A quantity was received against a line (the handover event).

    Message IDReceiptLineReceived

    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.

    allOf
    • #receipt
  • #10Receipt carton received

    A carton (or one case) was received - identity only.

    Message IDReceiptCartonReceived

    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).

    allOf
    • #receipt
  • #11Carton discrepancy raised

    A finding about a physical carton.

    Message IDCartonDiscrepancyRaised

    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).

    allOf
    • #receipt
  • #12Receiving policy declared

    A receiving tolerance policy was created or replaced.

    Message IDReceivingPolicyDeclared

    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).

    allOf
    • #policy
  • #13Receipt closed

    Receiving ended, with the discrepancies against the ASN.

    Message IDReceiptClosed

    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).

    allOf
    • #receipt
  • #14yard-management VisitCheckedIn (consumed)

    A carrier physically arrived at the gate.

    Message IDVisitCheckedIn

    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.

    allOf
    • #consumed
  • #15inventory-storage ContainerStowed (consumed)

    A container (license plate) was put away into a bin.

    Message IDContainerStowed

    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.

    allOf
    • #consumed
  • #16Receipt stow completed

    The dock-to-stock fact of a receipt (ADR 0021).

    Message IDReceiptStowCompleted

    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.

    allOf
    • #receipt
  • #17Receipt stow completed (analytics)

    The dock-to-stock fact of a receipt, on the analytics stream.

    Message IDReceiptStowCompletedAnalytics

    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.

    allOf
    • #analytics
  • #18Receiving advice issued

    What was received and accepted per line, with W13/CBV-coded discrepancies, for the supplier or the 3PL depositor (ADR 0023).

    Message IDReceivingAdviceIssued

    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.

    allOf
    • #receipt
  • #19Receiving advice issued (analytics)

    The receiving advice, on the analytics stream.

    Message IDReceivingAdviceIssuedAnalytics

    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).

    allOf
    • #analytics
  • #20Receiving advice overdue

    An Open receipt is past the advice SLA since its last unit was received (ADR 0023).

    Message IDReceivingAdviceOverdue

    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.

    allOf
    • #receipt
  • #21Receiving advice overdue (analytics)

    The overdue alarm, on the analytics stream.

    Message IDReceivingAdviceOverdueAnalytics

    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.

    allOf
    • #analytics
  • #22ASN registered (analytics)

    A supplier's advance ship notice was registered, on the analytics stream.

    Message IDASNRegisteredAnalytics

    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.

    allOf
    • #analytics
  • #23ASN cancelled (analytics)

    A Registered ASN was cancelled, on the analytics stream.

    Message IDASNCancelledAnalytics

    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.

    allOf
    • #analytics
  • #24ASN late for arrival (analytics)

    An ASN was registered after its visit had arrived, on the analytics stream.

    Message IDAsnLateForArrivalAnalytics

    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.

    allOf
    • #analytics
  • #25Receipt opened (analytics)

    Receiving of an ASN started, on the analytics stream.

    Message IDReceiptOpenedAnalytics

    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.

    allOf
    • #analytics
  • #26Receipt line received (analytics)

    A quantity was received against a line (the handover event), on the analytics stream.

    Message IDReceiptLineReceivedAnalytics

    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.

    allOf
    • #analytics
  • #27Receipt carton received

    A carton (or one case) was received - identity only.

    Message IDReceiptCartonReceivedAnalytics

    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).

    allOf
    • #analytics
  • #28Carton discrepancy raised

    A finding about a physical carton.

    Message IDCartonDiscrepancyRaisedAnalytics

    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).

    allOf
    • #analytics
  • #29Receiving policy declared (analytics)

    A receiving tolerance policy was created or replaced, on the analytics stream.

    Message IDReceivingPolicyDeclaredAnalytics

    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).

    allOf
    • #analytics
  • #30Receipt closed (analytics)

    Receiving ended, with the discrepancies against the ASN, on the analytics stream.

    Message IDReceiptClosedAnalytics

    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.

    allOf
    • #analytics
  • #31product-master ProductRegistered (consumed)

    A SKU was registered as a product.

    Message IDProductRegistered

    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.

    allOf
    • #consumed
  • #32product-master ProductPackLevelDeclared (consumed)

    A pack level (EACH, INNER, CASE or PALLET) of a SKU was declared, or one of its mutable attributes changed.

    Message IDProductPackLevelDeclared

    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).

    allOf
    • #consumed
  • #33product-master ProductPackLevelRetired (consumed)

    A pack level of a SKU was retired.

    Message IDProductPackLevelRetired

    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).

    allOf
    • #consumed
  • #34facility-layout LocationSlotRegistered (consumed)

    A coded slot now exists on the warehouse map.

    Message IDLocationSlotRegistered

    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.

    allOf
    • #consumed
  • #35facility-layout LocationSlotDecommissioned (consumed)

    A coded slot was permanently retired.

    Message IDLocationSlotDecommissioned

    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.

    allOf
    • #consumed

Schemas

  • object
  • object
  • object
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf
  • allOf