Realtime — executor to planner¶
Realtime endpoints carry continuous, best-effort feedback from the floor. The expected latency budget is sub-second to a few seconds, but the contract tolerates eventual consistency — corrections may arrive later through the confirmation path.
Endpoints¶
Endpoint |
What the executor posts |
|---|---|
|
One or more completed inventory movements ( |
|
Short-pick, damaged product, wrong SKU, robot stuck, worker unavailable, device fault, subsystem offline. |
|
Task lifecycle transitions: |
|
Periodic floor / fleet capacity snapshot for dashboards: active workers, idle robots, conveyor utilization, zone WIP. Optional. |
movements and exceptions are the required minimum for a useful executor implementation. work-status enables document-detail visibility on the planner side. capacity exists for dashboards only — it must never feed inventory or accounting.
What the planner does with each stream¶
Stream |
Planner behavior |
|---|---|
Movements |
Apply to the inventory ledger immediately. Tag with |
Exceptions |
Surface in a supervisor queue. Trigger the planner’s notification model with severity ( |
Work-status |
Persist as task lifecycle. Drives the planner’s document-detail UI; no ledger impact. |
Capacity |
Dashboards and trend charts only. Never used for inventory math or accounting. |
Movement kinds¶
Kind |
Meaning |
|---|---|
|
Take from a source location toward outbound staging. |
|
Place into a destination location. |
|
Relocate within the warehouse (not tied to a document line). |
|
Compensating adjustment from cycle count or discrepancy resolution. |
|
Work order input consumed. |
|
Work order output produced. |
|
Inbound receipt. |
|
Outbound shipment. |
When the SKU is lot- or serial-tracked, the executor sends lot or serial (or both) alongside the quantity. The planner remains authoritative for SKU, UoM, and location validation; a payload referencing an unknown SKU or location is rejected with 422. See Data mapping for the full envelope.
Idempotency¶
Every realtime call carries a correlation_id. A retry with the same (partner_id, correlation_id) returns 200 OK with replay: true and produces no additional ledger movement, exception, work-status, or capacity record. See Idempotency and ordering for the full rules.
Batching¶
Each endpoint accepts either a single record or an array. Batching is the recommended steady-state mode for executors with high movement rates — pack movements into batches of 10–200 per call to amortize TLS handshake and authentication cost. Each item in a batch carries its own correlation_id; the planner reports per-item results.
Backpressure¶
If the planner returns 429 Too Many Requests, the executor must honor Retry-After and back off. Realtime is best-effort; missing one second of realtime is fine because the confirmation path is authoritative. Do not retry-storm on 429.