Workforce Management Events 1.0.0

Domain-event catalog for Workforce Management, a Supporting bounded context in the WES (Warehouse Execution Systems) subdomain. It owns "who is on shift, on which process path, at what rate; direct vs indirect hours" — the shift-start planning horizon (a human commits a split of headcount across paths) plus intra-shift assignment tracking (moving associates between paths as backlogs deviate). It stops at the path boundary: it never links an associate to a specific task, and it never decides a rebalance — it makes the labor picture legible and enforces its invariants.

Three aggregates raise the events documented here:

  • AssociateShift (package internal/domain/associate) — roster entry: who is on, their certifications, their break state, their logged hours. Raises AssociateShiftStarted, AssociateCertified, AssociateBreakStarted, AssociateBreakEnded, AssociateShiftEnded.
  • ShiftPlan (package internal/domain/shiftplan) — the committed split of headcount across paths for one site's shift (siteCode; buildingId is its deprecated alias, ADR 0035), made of PathPlan lines. Raises ShiftPlanProposed, ShiftPlanCommitted and the staffing-gap flag PathUnderstaffed.
  • LaborAssignment (package internal/domain/assignment) — one associate on one path for an interval, with exactly one ACTIVE assignment per associate at a time. Raises LaborAssigned and LaborReassigned.

Envelope (mandatory). Every Kafka message this service produces or consumes is a CloudEvents 1.0 event in structured content mode (ADR-0026, superseding the envelope half of ADR-0004): the Kafka message value is the JSON event format, content type application/cloudevents+json, and every message carries the Kafka header content-type: application/cloudevents+json; charset=UTF-8 alongside the W3C traceparent/tracestate headers. All of specversion (1.0), id, source (/warehouse/workforce-management), type, subject, time, datacontenttype (application/json) and dataschema are REQUIRED; the bounded context's own payload sits under data. There is no flat envelope and no envelope toggle.

Type naming convention. The CloudEvents type attribute is reverse-DNS dotted and follows the exact shape com.warehouse.<subdomain>.<bounded-context>.<entity>.<EventName>, all lowercase except the final PascalCase event name. For this context the subdomain is wes and the bounded context is workforce-management, so for example a committed shift plan is published as com.warehouse.wes.workforce-management.shiftplan.ShiftPlanCommitted. The entity segment is the aggregate that raises the event — associate, shiftplan or assignment. PathUnderstaffed uses shiftplan, since the gap is measured against a committed ShiftPlan's planned heads. A breaking payload change gets a new .v2 type and a new dataschema version, never a mutation of the old one.

dataschema. urn:warehouse:workforce-management:<stream>:<EventName>:v1 where <stream> is events for warehouse.workforce.events and analytics for warehouse.workforce.analytics. The same occurrence keeps the same type on both topics; dataschema names the payload shape.

Subject. The aggregate instance id: the associate id for associate/assignment events, the path id for PathUnderstaffed and ShiftPlanProposed, and the ShiftPlan aggregate id <buildingId>/<shiftId> for ShiftPlanCommitted (the same value as the integration message's Kafka key). The first segment of that id IS the site code (ADR 0035): the subject and the Kafka key are unchanged by the siteCode convergence, so no consumer's partitioning or ordering moves.

siteCode / buildingId (ADR 0035). The ShiftPlan key has one canonical name, siteCode (the facility-layout Site code), and one deprecated alias, buildingId, with the SAME value. ShiftPlanProposed and ShiftPlanCommitted (v1, both topics where published) therefore carry site_code next to the unchanged, now deprecated, building_id. The change is additive: no .v2, nothing removed, site_code is not required in the schema because messages produced before the addition lack it. Removing building_id is a future breaking change with its own ADR.

Which events leave the process on which topic. The integration topic warehouse.workforce.events carries only ShiftPlanCommitted, fanned out into one message per PathPlan line. Every event in this catalog is published to the internal analytics topic warehouse.workforce.analytics (consumed by this service's own analytics projector, ADR-0010). Each message below pins its exact type and dataschema and documents the payload actually on the wire.

  • #workforce-management
  • #associate
  • #shiftplan
  • #assignment

Servers

  • kafka.warehouse-systems.internal:9092kafkaproduction

    Shared warehouse-systems Kafka cluster. Workforce Management publishes its outbound domain events here; downstream bounded contexts (Work Planning) consume from the same cluster.

    Security:
    security.protocol:PLAINTEXT

Operations

  • SUB warehouse.workforce.events

    The single outbound topic for this bounded context, matching the Topic constant in internal/adapters/outbound/kafka/publisher.go (warehouse.workforce.events). Messages are CloudEvents 1.0 structured-mode JSON with the content-type: application/cloudevents+json; charset=UTF-8 Kafka header. Consumers must dispatch on the full type, ignore unknown type values, and dedupe on id.

    Consume Workforce Management domain events.

    Subscribe to the Workforce Management domain-event stream. Every message is a CloudEvents 1.0 structured-mode event; route on the full type context attribute, which follows com.warehouse.wes.workforce-management.<entity>.<EventName>.

    Only ShiftPlanCommitted is published to this topic, fanned out into one message per PathPlan line of the committed plan, each with its own unique id. The remaining messages listed here are published to the analytics topic only — see each message's description.

    Operation IDconsumeWorkforceEvents

    Available only on servers:

    • #workforce-management

    Accepts the following message:

    Shift plan committed

    A human committed a headcount split across process paths for a site's shift.

    Raised by the ShiftPlan aggregate when a human commits the split of headcount across process paths for one site's shift. The commit is validated in the domain: plannedHeads(path) must not exceed installedStations(path), and planned hours must fit the shift's max hours.

    Published to warehouse.workforce.events. This is the only domain event on the integration topic; wes-work-planning dispatches on its exact type. The adapter loads the committed plan through the ShiftPlanRepo and fans the single domain event out into one Kafka message per PathPlan line — a plan committed with three path lines produces three messages on warehouse.workforce.events, each carrying that one line's path_id, planned_heads, planned_rate and planned_hours alongside the plan's site_code (canonical) and building_id (deprecated, same value) and shift_id. Consumers must therefore expect N messages per commit, not one, and must not assume a message carries the whole plan. Every line message has its own unique CloudEvents id (minted once and persisted with the outbox row, so a redelivery repeats it); subject is the ShiftPlan aggregate id <buildingId>/<shiftId>, identical to the Kafka key.

    allOf

    CloudEvent for one PathPlan line of a committed ShiftPlan. The data fields mirror exactly what the Kafka publisher emits per line.

    • #shiftplan
    • #workforce-management

    Examples

  • SUB warehouse.workforce.analytics

    Internal analytics topic (ADR-0010), matching the AnalyticsTopic constant in internal/adapters/outbound/kafka/analytics_publisher.go. Every domain event this context raises is published here as a CloudEvents 1.0 structured-mode event with dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1. Consumed by this service's own analytics projector (workforce-analytics consumer group), which dedupes on id and dead-letters anything that fails CloudEvents validation to warehouse.workforce.analytics.dlq.

    Consume Workforce Management analytics events.

    Subscribe to the analytics stream. Route on the full type; the same occurrence carries the same type as on the integration topic, and dataschema distinguishes the analytics payload shape.

    Operation IDconsumeWorkforceAnalytics

    Available only on servers:

    • #workforce-management

    Accepts one of the following messages:

    • #0Shift plan committed (analytics)

      The analytics-topic form of a shift-plan commit — one message per commit, not per line.

      Published only to warehouse.workforce.analytics. Same type as the integration message, different dataschema and payload: one message per commit carrying just the plan's identity. Kafka key is the building id; subject is the ShiftPlan aggregate id <buildingId>/<shiftId>.

      allOf

      CloudEvent for one shift-plan commit on the analytics topic.

      • #shiftplan
      • #workforce-management

      Examples

    • #1Shift plan proposed

      Heads for a path were computed from charge and planned rate, ahead of any human commit.

      Raised by the ShiftPlan aggregate when heads for a path are proposed as a pure computation — heads = ceil(charge / plannedRate) — before a human commits anything. A proposal is advisory: the software proposes, a human commits.

      Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

      allOf

      CloudEvent for a proposed, not-yet-committed headcount figure for one path.

      • #shiftplan
      • #workforce-management

      Examples

    • #2Path understaffed

      A path's active assignments fall short of its committed planned heads.

      Raised when the staffing-gap read model finds that a path's active LaborAssignment count is below the plannedHeads committed for it on the current ShiftPlan. This is a flag, not a decision: this bounded context surfaces the gap and never moves anyone in response. Rebalancing is a human call, recorded back here as a new assignment.

      Site scope (ADR 0034, additive). When the gap was requested for one canonical site, data.site_code carries it and active_heads counts only associates with an active shift at that site. When site_code is absent the gap is unscoped (every site together, the pre-ADR-0034 behaviour): consumers MUST treat absence as "unscoped", never as a particular site.

      Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

      allOf

      CloudEvent for the staffing-gap flag on a single path.

      • #shiftplan
      • #workforce-management

      Examples

    • #3Associate shift started

      An associate's roster entry was created for the shift, with their certifications.

      Raised by the AssociateShift aggregate when an associate's shift roster entry is created. The associate's certifications are the qualification gate for assignment: an associate untrained on a path cannot be placed on it.

      Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

      allOf

      CloudEvent for the creation of an associate's shift roster entry.

      • #associate
      • #workforce-management

      Examples

    • #4Associate certified

      A certification was added to an associate's roster entry.

      Raised by the AssociateShift aggregate when a named qualification (for example pack, pick or hazmat) is added to an associate. Certifications gate assignment: AssignLabor rejects an associate who does not hold the path's required certification.

      Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

      allOf

      CloudEvent for adding one certification to an associate.

      • #associate
      • #workforce-management

      Examples

    • #5Associate break started

      An associate began a logged break and is no longer assignable.

      Raised by the AssociateShift aggregate when an associate begins a logged break. While a break is active the associate cannot be given a new LaborAssignment — AssignLabor rejects the attempt.

      Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

      allOf

      CloudEvent for the start of an associate's logged break.

      • #associate
      • #workforce-management

      Examples

    • #6Associate break ended

      An associate ended a logged break and is assignable again.

      Raised by the AssociateShift aggregate when an associate's logged break ends. The associate becomes eligible for a new LaborAssignment again, subject to the certification gate.

      Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

      allOf

      CloudEvent for the end of an associate's logged break.

      • #associate
      • #workforce-management

      Examples

    • #7Associate shift ended

      An associate's shift closed, ending all of their active assignments.

      Raised by the AssociateShift aggregate when an associate's shift closes. Closing a shift ends every active LaborAssignment for that associate, so downstream consumers should treat this as a terminal signal for the associate's labor picture on the shift.

      Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

      allOf

      CloudEvent for the close of an associate's shift.

      • #associate
      • #workforce-management

      Examples

    • #8Labor assigned

      An associate was placed on a process path for an interval.

      Raised by the LaborAssignment aggregate when an associate is assigned to a process path. The domain enforces two hard invariants before this event exists: the associate holds the path's required certification, and the associate has no other ACTIVE assignment (no double-booking across paths).

      Note the path boundary: this places an associate on a path, never on a specific task. Dispatching individual tasks belongs to Fulfillment Execution.

      Attribution (additive). When the assignment was requested through the MCP assign_labor tool or the A2A assign_labor skill, data also carries initiated_by (via = mcp or a2a, set by the adapter, plus the caller's optional proposal_id, approved_by and agent_id). It is absent for REST and every other caller: absence means "not agent-initiated". It is event data only; no CloudEvents extension attribute is added, and the v1 dataschema is unchanged.

      Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

      allOf

      CloudEvent for placing an associate on a process path.

      • #assignment
      • #workforce-management

      Examples

    • #9Labor reassigned

      An associate's active assignment was ended in favour of another path.

      Raised by the LaborAssignment aggregate when an associate's prior active assignment is closed and a new one opened on a different path — the intra-shift move that keeps the one-ACTIVE-assignment invariant intact. The move is always a human call recorded here; this context never decides a rebalance on its own.

      Attribution (additive). Like LaborAssigned, data carries initiated_by when the move was requested through the MCP or A2A assign_labor surface, and omits it otherwise (REST). An agent reallocating an associate who is already on a path raises this event, not LaborAssigned, so the attribution must be here too.

      Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

      allOf

      CloudEvent for moving an associate from one path to another.

      • #assignment
      • #workforce-management

      Examples

  • SUB warehouse.labor-performance.events

    labor-performance's integration topic (its ADR 0013), CONSUMED by this service — not published: key and subject = the associate id, source=/warehouse/labor-performance. This service consumes only com.warehouse.wes.labor-performance.performance.TaskPerformanceRecorded and ignores every other type. The consumer is the measured-rate cache (LABOR_PERFORMANCE_MODE=kafka-cache, the laborperformancecache adapter: a per-process consumer group replays the topic's full history at startup, then keeps the local mean and idle-share totals current); this channel mirrors labor-performance's own apis/asyncapi.yaml read-only.

    Keep the local measured-rate cache current for ProposePathPlan.

    Subscribe to labor-performance's TaskPerformanceRecorded stream. Every message updates the running mean of actual_seconds and the running idle share for its task_type. efficiency_pct is nullable and unused here (never coerced to 0); idle_seconds_before is nullable ("not observed"; such a message contributes to the actual total only). Messages are CloudEvents 1.0 structured-mode JSON (dataschema urn:warehouse:labor-performance:events:TaskPerformanceRecorded:v1). A message that is not a valid CloudEvents 1.0 event is logged at WARN and skipped; the cache dedupes on id.

    Operation IDconsumeLaborPerformanceEvents

    Available only on servers:

    • #labor-performance

    Accepts the following message:

    Task Performance Recorded (from labor-performance, consumed)

    One completed task was scored against the standard active at completion time.

    CONSUMED, not produced. Pinned by labor-performance's apis/asyncapi.yaml: type com.warehouse.wes.labor-performance.performance.TaskPerformanceRecorded, source=/warehouse/labor-performance, subject and Kafka key = the associate id. efficiency_pct is NULL when the task could not be scored (a real business fact, never coerced to 0) and idle_seconds_before is NULL when no idle gap was observed; the measured-rate cache (laborperformancecache) updates its per-task_type running mean of actual_seconds and running idle share from every message.

    object

    CloudEvents 1.0 envelope of labor-performance's TaskPerformanceRecorded, the integration payload, as consumed here (not composed from CloudEventBase, whose source is this service's own).

    • #labor-performance

    Examples

  • SUB warehouse.process-path-management.events

    process-path-management's integration topic (the Topic constant in internal/adapters/outbound/kafkacatalog/consumer.go), CONSUMED by this service, not published: key and subject = the path id, source=/warehouse/process-path-management. This service acts on ProcessPathCreated, ProcessPathUpdated and ProcessPathDeactivated and ignores every other type (CPTScheduleChanged included). The consumer is the process-path catalogue (PATH_CATALOGUE_SOURCE=kafka, the default; file is rejected at boot): a per-process, unique consumer group (prefix workforce-management-process-path-catalogue) replays the topic's full history from the earliest offset at startup, and readiness waits for that replay. Both cmd/workforce and cmd/mcp run one, so path ids are validated against the same catalogue. This channel mirrors process-path-management's own apis/asyncapi.yaml read-only.

    Keep the local process-path catalogue current.

    Upsert the path definition on Created and Updated (path_id, match_prefix, required_capabilities, destination_location_role; direct is decoded and discarded) and remove it on Deactivated. Messages are CloudEvents 1.0 structured-mode JSON (dataschema urn:warehouse:process-path-management:events:<EventName>:v1).

    Operation IDconsumeProcessPathEvents

    Available only on servers:

    • #process-path-management

    Accepts one of the following messages:

    • #0ProcessPathCreated (from process-path-management, consumed)

      A process path was defined.

      CONSUMED, not produced. Pinned by process-path-management's apis/asyncapi.yaml: type com.warehouse.wes.process-path-management.processpath.ProcessPathCreated, source=/warehouse/process-path-management, subject and Kafka key = the path id.

      object

      CloudEvents 1.0 envelope of process-path-management's ProcessPathCreated, the integration payload, as consumed here.

      • #process-path-management

      Examples

    • #1ProcessPathUpdated (from process-path-management, consumed)

      A process path definition changed.

      CONSUMED, not produced. Pinned by process-path-management's apis/asyncapi.yaml: type com.warehouse.wes.process-path-management.processpath.ProcessPathUpdated, source=/warehouse/process-path-management, subject and Kafka key = the path id.

      object

      CloudEvents 1.0 envelope of process-path-management's ProcessPathUpdated, the integration payload, as consumed here.

      • #process-path-management

      Examples

    • #2ProcessPathDeactivated (from process-path-management, consumed)

      A process path was deactivated; it carries only the path id.

      CONSUMED, not produced. Pinned by process-path-management's apis/asyncapi.yaml: type com.warehouse.wes.process-path-management.processpath.ProcessPathDeactivated, source=/warehouse/process-path-management, subject and Kafka key = the path id.

      object

      CloudEvents 1.0 envelope of process-path-management's ProcessPathDeactivated, the integration payload, as consumed here.

      • #process-path-management

      Examples

  • SUB warehouse.warehouse-planning.events

    warehouse-planning's integration topic (its ADR 0023; the LabourPlanTopic constant in internal/adapters/inbound/kafka/labour_plan_consumer.go), CONSUMED by this service, not published: source=/warehouse/warehouse-planning, key and subject = site_id/shift_id/path_id. This service acts ONLY on LabourPlanCommitted (ADR 0043) and commits past every other type on the topic (CapacityPlan*, Shortage/Bottleneck, WorkloadForecastReceived, LabourPlanDriftDetected). The consumer runs in cmd/workforce only, on the STABLE, shared consumer group of the required LABOUR_PLAN_CONSUMER_GROUP (chart default workforce-management-labour-plans), starting a new group at the earliest offset; cmd/mcp and cmd/a2a read the copy and never consume. This channel mirrors warehouse-planning's own apis/asyncapi.yaml read-only.

    Keep the local copy of the published labour plan current.

    Upsert labour_requirements (one row per site_id stored as site_code, shift_id, path_id: planned_heads, rate_units_per_hour, hours, heads_source, version) only when the message's version is greater than the stored one; an equal or lower version is a no-op. The claim on the CloudEvents id and the upsert commit in one transaction, so a redelivery is a no-op. installed_stations and the optional shift_start are part of the contract but not kept. A message that is not a valid CloudEvents 1.0 event or that breaks the contract (missing site/shift/path or planned_heads, negative heads, version < 1) is dead-lettered to warehouse.warehouse-planning.events.dlq and committed past. Read by POST /paths/{pathId}/plan-proposals (no charge + shiftId) and shown as requiredHeads on staffing-gap and committed plan lines.

    Operation IDconsumeWarehousePlanningEvents

    Available only on servers:

    • #warehouse-planning

    Accepts the following message:

    Labour Plan Committed (from warehouse-planning, consumed)

    The heads the demand requires on one path for a site's shift.

    CONSUMED, not produced (ADR 0043). Pinned by warehouse-planning ADR 0023 decision 2: type com.warehouse.wes.warehouse-planning.labourplan.LabourPlanCommitted, source=/warehouse/warehouse-planning, subject and Kafka key site_id/shift_id/path_id, dataschema urn:warehouse:warehouse-planning:events:LabourPlanCommitted:v1. version grows by 1 per accepted change of the key.

    object

    CloudEvents 1.0 envelope of warehouse-planning's LabourPlanCommitted, as consumed here (not composed from CloudEventBase, whose source is this service's own). Snake_case data, pinned by warehouse-planning ADR 0023 decision 2.

    • #warehouse-planning

    Examples

Messages

  • #1Shift plan committed

    A human committed a headcount split across process paths for a site's shift.

    Message IDShiftPlanCommitted

    Raised by the ShiftPlan aggregate when a human commits the split of headcount across process paths for one site's shift. The commit is validated in the domain: plannedHeads(path) must not exceed installedStations(path), and planned hours must fit the shift's max hours.

    Published to warehouse.workforce.events. This is the only domain event on the integration topic; wes-work-planning dispatches on its exact type. The adapter loads the committed plan through the ShiftPlanRepo and fans the single domain event out into one Kafka message per PathPlan line — a plan committed with three path lines produces three messages on warehouse.workforce.events, each carrying that one line's path_id, planned_heads, planned_rate and planned_hours alongside the plan's site_code (canonical) and building_id (deprecated, same value) and shift_id. Consumers must therefore expect N messages per commit, not one, and must not assume a message carries the whole plan. Every line message has its own unique CloudEvents id (minted once and persisted with the outbox row, so a redelivery repeats it); subject is the ShiftPlan aggregate id <buildingId>/<shiftId>, identical to the Kafka key.

    allOf

    CloudEvent for one PathPlan line of a committed ShiftPlan. The data fields mirror exactly what the Kafka publisher emits per line.

    • #shiftplan
    • #workforce-management
  • #2Shift plan committed (analytics)

    The analytics-topic form of a shift-plan commit — one message per commit, not per line.

    Message IDShiftPlanCommittedAnalytics

    Published only to warehouse.workforce.analytics. Same type as the integration message, different dataschema and payload: one message per commit carrying just the plan's identity. Kafka key is the building id; subject is the ShiftPlan aggregate id <buildingId>/<shiftId>.

    allOf

    CloudEvent for one shift-plan commit on the analytics topic.

    • #shiftplan
    • #workforce-management
  • #3Shift plan proposed

    Heads for a path were computed from charge and planned rate, ahead of any human commit.

    Message IDShiftPlanProposed

    Raised by the ShiftPlan aggregate when heads for a path are proposed as a pure computation — heads = ceil(charge / plannedRate) — before a human commits anything. A proposal is advisory: the software proposes, a human commits.

    Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

    allOf

    CloudEvent for a proposed, not-yet-committed headcount figure for one path.

    • #shiftplan
    • #workforce-management
  • #4Path understaffed

    A path's active assignments fall short of its committed planned heads.

    Message IDPathUnderstaffed

    Raised when the staffing-gap read model finds that a path's active LaborAssignment count is below the plannedHeads committed for it on the current ShiftPlan. This is a flag, not a decision: this bounded context surfaces the gap and never moves anyone in response. Rebalancing is a human call, recorded back here as a new assignment.

    Site scope (ADR 0034, additive). When the gap was requested for one canonical site, data.site_code carries it and active_heads counts only associates with an active shift at that site. When site_code is absent the gap is unscoped (every site together, the pre-ADR-0034 behaviour): consumers MUST treat absence as "unscoped", never as a particular site.

    Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

    allOf

    CloudEvent for the staffing-gap flag on a single path.

    • #shiftplan
    • #workforce-management
  • #5Associate shift started

    An associate's roster entry was created for the shift, with their certifications.

    Message IDAssociateShiftStarted

    Raised by the AssociateShift aggregate when an associate's shift roster entry is created. The associate's certifications are the qualification gate for assignment: an associate untrained on a path cannot be placed on it.

    Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

    allOf

    CloudEvent for the creation of an associate's shift roster entry.

    • #associate
    • #workforce-management
  • #6Associate certified

    A certification was added to an associate's roster entry.

    Message IDAssociateCertified

    Raised by the AssociateShift aggregate when a named qualification (for example pack, pick or hazmat) is added to an associate. Certifications gate assignment: AssignLabor rejects an associate who does not hold the path's required certification.

    Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

    allOf

    CloudEvent for adding one certification to an associate.

    • #associate
    • #workforce-management
  • #7Associate break started

    An associate began a logged break and is no longer assignable.

    Message IDAssociateBreakStarted

    Raised by the AssociateShift aggregate when an associate begins a logged break. While a break is active the associate cannot be given a new LaborAssignment — AssignLabor rejects the attempt.

    Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

    allOf

    CloudEvent for the start of an associate's logged break.

    • #associate
    • #workforce-management
  • #8Associate break ended

    An associate ended a logged break and is assignable again.

    Message IDAssociateBreakEnded

    Raised by the AssociateShift aggregate when an associate's logged break ends. The associate becomes eligible for a new LaborAssignment again, subject to the certification gate.

    Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

    allOf

    CloudEvent for the end of an associate's logged break.

    • #associate
    • #workforce-management
  • #9Associate shift ended

    An associate's shift closed, ending all of their active assignments.

    Message IDAssociateShiftEnded

    Raised by the AssociateShift aggregate when an associate's shift closes. Closing a shift ends every active LaborAssignment for that associate, so downstream consumers should treat this as a terminal signal for the associate's labor picture on the shift.

    Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

    allOf

    CloudEvent for the close of an associate's shift.

    • #associate
    • #workforce-management
  • #10Labor assigned

    An associate was placed on a process path for an interval.

    Message IDLaborAssigned

    Raised by the LaborAssignment aggregate when an associate is assigned to a process path. The domain enforces two hard invariants before this event exists: the associate holds the path's required certification, and the associate has no other ACTIVE assignment (no double-booking across paths).

    Note the path boundary: this places an associate on a path, never on a specific task. Dispatching individual tasks belongs to Fulfillment Execution.

    Attribution (additive). When the assignment was requested through the MCP assign_labor tool or the A2A assign_labor skill, data also carries initiated_by (via = mcp or a2a, set by the adapter, plus the caller's optional proposal_id, approved_by and agent_id). It is absent for REST and every other caller: absence means "not agent-initiated". It is event data only; no CloudEvents extension attribute is added, and the v1 dataschema is unchanged.

    Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

    allOf

    CloudEvent for placing an associate on a process path.

    • #assignment
    • #workforce-management
  • #11Labor reassigned

    An associate's active assignment was ended in favour of another path.

    Message IDLaborReassigned

    Raised by the LaborAssignment aggregate when an associate's prior active assignment is closed and a new one opened on a different path — the intra-shift move that keeps the one-ACTIVE-assignment invariant intact. The move is always a human call recorded here; this context never decides a rebalance on its own.

    Attribution (additive). Like LaborAssigned, data carries initiated_by when the move was requested through the MCP or A2A assign_labor surface, and omits it otherwise (REST). An agent reallocating an associate who is already on a path raises this event, not LaborAssigned, so the attribution must be here too.

    Not on the integration topic. Published only to the internal analytics topic warehouse.workforce.analytics (dataschema urn:warehouse:workforce-management:analytics:<EventName>:v1).

    allOf

    CloudEvent for moving an associate from one path to another.

    • #assignment
    • #workforce-management
  • #12Task Performance Recorded (from labor-performance, consumed)

    One completed task was scored against the standard active at completion time.

    Message IDTaskPerformanceRecorded

    CONSUMED, not produced. Pinned by labor-performance's apis/asyncapi.yaml: type com.warehouse.wes.labor-performance.performance.TaskPerformanceRecorded, source=/warehouse/labor-performance, subject and Kafka key = the associate id. efficiency_pct is NULL when the task could not be scored (a real business fact, never coerced to 0) and idle_seconds_before is NULL when no idle gap was observed; the measured-rate cache (laborperformancecache) updates its per-task_type running mean of actual_seconds and running idle share from every message.

    object

    CloudEvents 1.0 envelope of labor-performance's TaskPerformanceRecorded, the integration payload, as consumed here (not composed from CloudEventBase, whose source is this service's own).

    • #labor-performance
  • #13ProcessPathCreated (from process-path-management, consumed)

    A process path was defined.

    Message IDProcessPathCreated

    CONSUMED, not produced. Pinned by process-path-management's apis/asyncapi.yaml: type com.warehouse.wes.process-path-management.processpath.ProcessPathCreated, source=/warehouse/process-path-management, subject and Kafka key = the path id.

    object

    CloudEvents 1.0 envelope of process-path-management's ProcessPathCreated, the integration payload, as consumed here.

    • #process-path-management
  • #14ProcessPathUpdated (from process-path-management, consumed)

    A process path definition changed.

    Message IDProcessPathUpdated

    CONSUMED, not produced. Pinned by process-path-management's apis/asyncapi.yaml: type com.warehouse.wes.process-path-management.processpath.ProcessPathUpdated, source=/warehouse/process-path-management, subject and Kafka key = the path id.

    object

    CloudEvents 1.0 envelope of process-path-management's ProcessPathUpdated, the integration payload, as consumed here.

    • #process-path-management
  • #15ProcessPathDeactivated (from process-path-management, consumed)

    A process path was deactivated; it carries only the path id.

    Message IDProcessPathDeactivated

    CONSUMED, not produced. Pinned by process-path-management's apis/asyncapi.yaml: type com.warehouse.wes.process-path-management.processpath.ProcessPathDeactivated, source=/warehouse/process-path-management, subject and Kafka key = the path id.

    object

    CloudEvents 1.0 envelope of process-path-management's ProcessPathDeactivated, the integration payload, as consumed here.

    • #process-path-management
  • #16Labour Plan Committed (from warehouse-planning, consumed)

    The heads the demand requires on one path for a site's shift.

    Message IDLabourPlanCommitted

    CONSUMED, not produced (ADR 0043). Pinned by warehouse-planning ADR 0023 decision 2: type com.warehouse.wes.warehouse-planning.labourplan.LabourPlanCommitted, source=/warehouse/warehouse-planning, subject and Kafka key site_id/shift_id/path_id, dataschema urn:warehouse:warehouse-planning:events:LabourPlanCommitted:v1. version grows by 1 per accepted change of the key.

    object

    CloudEvents 1.0 envelope of warehouse-planning's LabourPlanCommitted, as consumed here (not composed from CloudEventBase, whose source is this service's own). Snake_case data, pinned by warehouse-planning ADR 0023 decision 2.

    • #warehouse-planning

Schemas

  • object [CloudEvents 1.0 context attributes]

    The CloudEvents 1.0 structured-mode context attributes shared by every message (ADR-0026). Every attribute is REQUIRED. Each event schema below composes this base with an allOf and pins its own type const and dataschema const.

  • allOf

    CloudEvent for one PathPlan line of a committed ShiftPlan. The data fields mirror exactly what the Kafka publisher emits per line.

  • allOf

    CloudEvent for one shift-plan commit on the analytics topic.

  • allOf

    CloudEvent for a proposed, not-yet-committed headcount figure for one path.

  • allOf

    CloudEvent for the staffing-gap flag on a single path.

  • allOf

    CloudEvent for the creation of an associate's shift roster entry.

  • allOf

    CloudEvent for adding one certification to an associate.

  • allOf

    CloudEvent for the start of an associate's logged break.

  • allOf

    CloudEvent for the end of an associate's logged break.

  • allOf

    CloudEvent for the close of an associate's shift.

  • object

    Attribution of an agent-initiated assignment (additive, event data only). Present on LaborAssigned / LaborReassigned only when the call arrived through the MCP assign_labor tool or the A2A assign_labor skill; absent for REST. via is stamped by the adapter, never supplied by the caller. The other members are the caller's optional free-form labels (trimmed, at most 128 characters); they carry no authority and are omitted when not given.

  • allOf

    CloudEvent for placing an associate on a process path.

  • allOf

    CloudEvent for moving an associate from one path to another.

  • object

    CloudEvents 1.0 envelope of labor-performance's TaskPerformanceRecorded, the integration payload, as consumed here (not composed from CloudEventBase, whose source is this service's own).

  • object

    CloudEvents 1.0 envelope of process-path-management's ProcessPathCreated, the integration payload, as consumed here.

  • object

    CloudEvents 1.0 envelope of process-path-management's ProcessPathUpdated, the integration payload, as consumed here.

  • object

    CloudEvents 1.0 envelope of process-path-management's ProcessPathDeactivated, the integration payload, as consumed here.

  • object

    CloudEvents 1.0 envelope of warehouse-planning's LabourPlanCommitted, as consumed here (not composed from CloudEventBase, whose source is this service's own). Snake_case data, pinned by warehouse-planning ADR 0023 decision 2.