Skip to main content

Influence: Which Stock a Step May Use

The allocation policy is a list of steps. Each step has a source part (what it may reserve, and from where) and a conditions part. This page shows which step field removes which stock from the list, and which unit of measure gets which part of the need. How the remaining stock is ordered is on page 21.

1. Fixed rules and step fields that cut the stock list​

What this shows. A stock row (balance row of the order's owner and SKU) must pass the fixed rules, and then the step's own filters. A row that fails is not offered to the step. If no other step can cover the need, the line is short.

The first five questions cannot be switched off. The last one is made of four step fields, and an empty field means "any".

Setting (screen label)ColumnWhat it changesVisible outcome
Putaway zoneallocation_policy_detail.putawayzoneKeeps rows in locations of this zone onlyStock in other zones is not reserved by this step
Location typeallocation_policy_detail.location_typeKeeps rows in locations of this type only. The value None is a real type, not "any"Step 10 Pick and step 20 empty: pick faces are used first
Location categoryallocation_policy_detail.location_categoryKeeps rows in locations of this category onlyShelves only, racks only, and so on
Location ABCallocation_policy_detail.location_abcKeeps rows in locations of this velocity class (the abc of the location, not of the SKU)Fast-mover locations first when step 10 names A
Allocation typeallocation_policy_detail.allocation_typeOnly Firm runs. Soft and SoftCartonization make the whole policy refuse to runError text: step uses allocation_type=Soft, which this build cannot execute. Nothing is reserved
Step activeallocation_policy_detail.activeA switched-off step is not loaded, as if the row did not existThe step reserves nothing. If all steps are off the policy is refused

Reading notes.

  • A location type that is a hold-stage zone (QC, Damage, Rtv, Destroy, Returns, Stage, Lost), InTransit or Pack cannot be chosen in a step. The policy is refused at validation.
  • Only InTransit and Pack are excluded when a step names no location type. The code comment says that Lost "was never excluded" and calls it an open finding. So the query does not exclude a QC, Returns or Lost location when the step names no Location type. Not confirmed by code: whether such stock is then really reserved (no test was run). To verify: put 10 units in a Returns location with no hold, run shipment_order_allocate_preview on an order for that SKU, and look for the position in the answer. Until then, a location hold (see page 24) on those locations removes their stock from the list.
  • The available quantity already takes holds out. See page 24.

Where it comes from​

RuleCode
Candidate read: owner, SKU, atp, pack, location status and flag, fixed types, step filters, shelf lifecrates/libs/wms-lib-core/src/model/inventory/inventory_balance_atp.rs:430-473
Fixed types InTransit, Pack, and the note about Lostcrates/libs/wms-lib-core/src/model/inventory/inventory_balance_atp.rs:325-343
Step fields become criteriacrates/libs/wms-outbound/src/allocation/trace.rs:558-567
Refused values: allocation_type, location typescrates/libs/wms-outbound/src/allocation/step.rs:202-226, crates/libs/wms-outbound/src/allocation/step.rs:272-297
Only active steps are loadedcrates/libs/wms-outbound/src/allocation/policy.rs:136-148
The whole policy is refused when one active step cannot runcrates/libs/wms-outbound/src/allocation/policy.rs:150-156, crates/libs/wms-outbound/src/allocation/policy.rs:238-257
Screen labelscrates/libs/wms-lib-sql/sql/wms-meta-ui/migrations/001_baseline.sql:21421-21430
Seeded policy STD and its one stepcrates/libs/wms-lib-sql/sql/wms-app/migrations/001_baseline.sql:7644-7652

2. Unit of measure and the carry between steps​

What this shows. The open quantity is split over the units of the pack that an active step names. Each step gets the share of its own unit plus what earlier steps could not cover.

Setting (screen label)ColumnWhat it changesVisible outcome
Unit of measureallocation_policy_detail.uom_codeNames the pack unit this step reserves inA unit that no active step names is not used at all
Step order (drag the card)allocation_policy_detail.sequenceThe step with the lowest number runs first. Ties go by step idWhat step 10 cannot cover goes to step 20, whatever its unit
Two steps with the same unitallocation_policy_detail.uom_codeThe first takes the share. The second sees only the carryStep 20 reserves only what step 10 could not find

Example. Pack PL = 1000, CS = 100, EA = 1. The line needs 2340 base units. Steps 10, 20, 30 name PL, CS, EA.

StepShare of its unitCarry inNeeds
10 PL200002000
20 CS300what step 10 missed300 plus carry
30 EA40what step 20 missed40 plus carry

If the pallet stock is only 1000, step 10 takes 1000 and carries 1000. Step 20 then needs 1300, and so on. What the last step cannot cover is the shortfall.

Reading notes.

  • The base unit (base_qty = 1) takes the whole rest, also a fraction. Every other unit takes whole units only.
  • If the policy has no step for the base unit, the remainder after the whole larger units is a gap. It goes to short at once, and stock is never searched for it.
  • A step whose unit is not in the pack gets only the carry. A step with no share and no carry is skipped without a stock read.
  • A pack unit counts only if it is active and its base_qty is above 0.
  • A new line is refused if no active step names any unit of its pack: allocation policy '{code}' has no executable step for sku '{sku}' pack hierarchy.

Where it comes from​

RuleCode
Pack units: active, base_qty above 0, biggest firstcrates/libs/wms-outbound/src/allocation/plan.rs:83-102
Units named by steps; the split; the gapcrates/libs/wms-outbound/src/allocation/trace.rs:330-436
Greedy split, base unit takes the restcrates/libs/wms-lib-core/src/model/pack/breakdown.rs:72-110
Step loop: share plus carry, skip when both are zerocrates/libs/wms-outbound/src/allocation/trace.rs:534-553
short = gap + carry of the last stepcrates/libs/wms-outbound/src/allocation/trace.rs:693-698
Steps run in sequence ordercrates/libs/wms-lib-core/src/model/policies/allocation_policy.rs:1023-1040
New line needs a step for a unit of its packcrates/libs/wms-outbound/src/allocation/policy.rs:169-198
Message when the policy and the pack share no unitcrates/libs/wms-outbound/src/allocation/trace.rs:726-761