Business Context
Written here from the context's own
introduction
and its ADRs under docs/adr/ in
IQVO/slotting-optimization:
0001 to 0004 and 0005 (Accepted, 2026-10-08) and 0010 (Accepted, 2026-10-14),
which supersedes 0007, checked against the code on develop. Where the code
has moved past an ADR's wording, the code is authoritative.
The gap
facility-layout models forward (FWD) and reserve (RSV) zones, but
nothing else in the fleet decided which SKUs deserve a forward pick slot.
Without that decision, the fast movers sit wherever chaotic storage put them
and pickers walk further than they need to. The competitor research behind
this work (Manhattan Active SCE 26.2, Blue Yonder WMS Oct-2025, SAP EWM 2025
FPS01, Infor WMS, and the Gartner WMS Magic Quadrant of April 2026) treats
slotting and labor as expected capabilities.
What it owns
| Fact | Value |
|---|---|
| Subdomain class | Supporting (ADR 0001) |
| Tier | WMS (CloudEvents subdomain segment wms) |
| Aggregate | SlotPlan (package internal/domain/slotplan, ADR 0002) |
| Policy | abc-velocity-v1 (package internal/domain/planning, ADR 0002) |
| Binaries | four: cmd/api (REST on HTTP_ADDR, default :8080, plus five Kafka consumers and the outbox relay as goroutines), the read-only cmd/mcp (ADR 0005), cmd/slotting-projector and cmd/slotting-reports (the analytics read side, ADR 0006) |
| Data store | one Postgres database (embedded migrations) plus a separate analytics database written only by the projector. DATABASE_URL is required (no in-memory mode, ADR 0011) |
| Kafka | publishes warehouse.slotting-optimization.events and its analytics mirror warehouse.slotting-optimization.analytics; consumes warehouse.order-management.events, warehouse.product-master.events (incl. pack levels, ADR 0012), warehouse.facility.events (ADR 0003, ADR 0004) and warehouse.inventory.events (StockRelocated, ADR 0010) |
| Auth | none (fleet-wide decision) |
| MCP | read-only cmd/mcp (ADR 0005): get_slot_plan (with execution), list_slot_plans, get_forward_slots, get_sku_velocity |
- The SlotPlan. A proposal for one site and one demand window
(
[windowFrom, windowTo), default 28 days back from now): the assignments{sku, slot, abcClass, picks, units}, the moves against the site's currently Approved plan (Assign,Relocate,Vacate) and the SKUs it could not place, with a reason (NoPhysicalProfile,NoEligibleSlot,NoCapacityFit). - The decision on it.
DraftthenApprovedorRejected. Approving a plan supersedes the site's previous Approved plan in the same transaction, so a site has at most one Approved plan (Supersededis the fourth state). Approval is always a human act. - The published forward-slot map.
SlotPlanApprovedcarries every{sku, slot}of the plan and the moves, so a consumer needs no lookup. - The execution progress. For each Approved or Superseded plan, how many
of its moves have been carried out on the floor: moves total and executed,
last executed at, and per move an executed flag and quantity. It is a read
model derived from
inventory-storage'sStockRelocated(slot_plan_move_executions, one row per relocation), shown asexecutiononGET /slot-plans/{planId}and the MCPget_slot_plantool. It is advisory: it does not gate generating or approving the next plan (ADR 0010).
The v1 policy: abc-velocity-v1
Deterministic and explainable (ADR 0002; see the Ubiquitous Language for the exact rules):
- Velocity: per SKU over the window, picks = number of ACTIVE demand lines, units = their summed units. Candidates are ordered picks desc, units desc, SKU asc, and get an ABC class (A while the picks of the candidates ranked before a SKU are below 80 % of all picks, B below 95 %, else C).
- Forward slots are active location slots with role
Storagein a zone of the site whose code is inFORWARD_ZONE_CODES(defaultFWD). - Eligibility: compatible (hazmat and temperature class) and one effective unit fits the slot's volume and weight.
- Slot ranking is a replaceable
SlotRankingPolicyport. In v1 that is the lexical location code, becausefacility-layoutevents carry no travel distance. - Stickiness: a SKU keeps its previous slot if that slot is still eligible and free. This is the churn limit.
- One SKU per forward slot in v1.
A machine-learning or affinity policy would be a later version behind the same port.
Main capabilities
| Capability | Interface | Use case |
|---|---|---|
| Generate a Draft plan for a site | POST /slot-plans (requires Idempotency-Key with Postgres) | GeneratePlan |
| Approve a Draft (supersedes the previous Approved plan) | POST /slot-plans/{planId}/approvals | ApprovePlan |
| Reject a Draft with an optional reason | POST /slot-plans/{planId}/rejections | RejectPlan |
Read plans (with the execution progress on GET /slot-plans/{planId}) | GET /slot-plans, GET /slot-plans/{planId} | ListPlans, GetPlan |
| Read the current forward-slot map of a site | GET /forward-slots | ListForwardSlots |
| Read SKU velocity (the planner's demand input) | GET /sku-velocity | ListSkuVelocity |
| Keep the demand, product and layout copies current | Kafka consumers (DEMAND_MODE, PRODUCT_MODE, LAYOUT_MODE = kafka) | ApplyDemandChanged, ApplyProductClassified, ApplyPhysicalProfile, ApplyZoneRegistered, ApplyLocationSlotRegistered, ApplyLocationSlotDecommissioned |
| Record which moves of a plan have been executed | Kafka consumer (RELOCATION_MODE=kafka, RELOCATION_CONSUMER_GROUP) on StockRelocated | RecordRelocation |
| Publish plan decisions | transactional outbox + relay (EVENT_PUBLISHER=kafka) | every write use case |
The full catalogue is on Use Cases.
What it deliberately does not do
- Own demand, product facts or the slot layout. It keeps three event-fed
local copies of them (demand from
order-management, product classification and unit size fromproduct-master, zones and slots fromfacility-layout) and never calls a sibling at request time. - Move any stock, or create floor work. Approving a plan publishes
SlotPlanApproved, nothing more. The moves are executed asRELOCATEwork by the WES chain:wes-work-planningplans one work unit per move (sequenced inside the plan, and not-yet-released work of a superseded plan is cancelled),process-path-managementroutes it on theRELOCATEpath (intakeSLOT_RELOCATION),fulfillment-executionruns it with an operator who counts the quantity and scans the open bin, andinventory-storagemoves the stock on its ledger. This context only reads the outcome back (ADR 0010, which supersedes the options laid out in ADR 0007). v1 moves the whole on-hand quantity of the SKU at the source bin; partial quantities and min/max replenishment are out of scope (ADR 0002). - Decide travel distance. The v1 slot order is lexical on the location code.
- Learn. No machine-learning policy and no affinity (items bought together) in v1.
There is no command edge to inventory-storage (an approved plan changes no
stow behaviour, and this context never calls it): the only edge is the
consumed StockRelocated. There is no edge to inbound-receiving or
warehouse-planning (ADR 0001).
Honest scope today
- The service is built on
IQVO/slotting-optimizationdevelop: REST API, outbox and relay, the five consumers (demand, product, pack levels, layout and relocation), the read-only MCP server, the analytics projector and reports, and the console remote. This site holds itsapis/slotting-optimization/specs, the generated references and the synced artifact pack. - It is wired in
warehouse-infradevelop:terraform/apps.yamlregisters it (database, analytics database, web remoteslotting_mfe) andhelm-values/slotting-optimization.yamlsetsEVENT_PUBLISHER=kafkaandDEMAND_MODE,PRODUCT_MODE,LAYOUT_MODE,RELOCATION_MODEandPACK_LEVEL_MODEtokafka, each with a fixed consumer group, and enables the MCP server, whichwarehouse-ops-agentcalls through its MCP client. The kind cluster was not checked for this page. - The execution chain is live end to end, given the
RELOCATEprocess path inprocess-path-management(thewarehouse-infrapost-deploy seed) andinventory-storage'sTaskCompletedconsumer (taskCompletedConsumerMode: kafka). Without that pathwes-work-planningretries aSlotPlanApprovedand dead-letters it towarehouse.slotting-optimization.events.dlq. Without that consumer the completed moves never reach the ledger and the plan'sexecutionstays at zero. - Progress is advisory. A newer plan can be generated and approved while
the previous one is half executed;
wes-work-planningcancels the older plan's work that has not been released yet. - The analytics topic
warehouse.slotting-optimization.analyticsis read only by this context's own projector (ADR 0006).