Skip to main content

Influence: Order, Line, Pack and Owner Facts

Besides the policies, allocation reads a few facts of the order, its lines, the pack of the SKU and the owner. This page lists the ones that change a decision, and the ones that look like settings but are not read.

1. Facts of the order header​

What this shows. Which header field changes which decision.

FieldWhat it changesVisible outcome
shipment_order.statusAllocate is refused for Closed, Cancelled and PickedError: cannot allocate an order in status {status}
shipment_order.released_atTasks are created only when it is setAllocate on a New order reserves and creates no task. Release sets it, then reserves and creates tasks
shipment_order.priorityCopied to the priority of each task made by the allocation pass. Also used by the wave policy (range and order)No effect on which stock is reserved or which order is served first by Allocate
shipment_order.requested_ship_dateWave policy only: the ship-date limit and the sortNo effect on allocation
shipment_order.carrier_idWave policy only: filter and groupingNo effect on allocation
shipment_order.ship_to_idMust be an owner of type Cus for release. The address is frozen at the first releaseRelease refused with ship_to owner {id} is not a customer
order_type (by code)Must exist and be active when the order is created or its type changed. Nothing else is read from itorder type '{code}' is inactive, or not found

Reading notes.

  • There is no rule that gives one order priority over another in Allocate. The command that takes the lock first gets the stock. Inside a wave, the member order decides (see page 25).
  • The order type has the columns requires_release and allows_partial_ship. No code reads them. The column auto_allocate_on_release was dropped: release always allocates.
  • A shortage never blocks the release.

Where it comes from​

RuleCode
Status gatecrates/libs/wms-outbound/src/service/order/allocate.rs:310-315
Tasks only when released_at is setcrates/libs/wms-outbound/src/service/order/allocate.rs:407-437
Order priority goes to the taskcrates/libs/wms-outbound/src/service/order/allocate.rs:427-434
Wave policy reads priority, ship date, carriercrates/libs/wms-lib-core/src/model/outbound/wave_policy.rs:330-343
Ship-to must be a customercrates/libs/wms-outbound/src/service/shared/lookups.rs:105-115, crates/libs/wms-outbound/src/service/order/validate.rs:60-135
Order type: existence and active check at create and updatecrates/libs/wms-outbound/src/service/shared/lookups.rs:31-45, crates/libs/wms-outbound/src/service/order/create.rs:155, crates/libs/wms-outbound/src/service/order/update.rs:84-111
Order type columns; the dropped flagcrates/libs/wms-lib-core/src/model/outbound/order_type.rs:18-30
release always allocatescrates/libs/wms-outbound/src/service/order/release.rs:17-23

2. Facts of the line, the SKU and the pack​

What this shows. The quantity the line asks for, and which stock and which units are even considered.

FieldWhat it changesVisible outcome
shipment_order_line.qty_ordered, qty_cancelled, qty_allocatedOpen quantity = ordered - cancelled - allocated. Zero or less: the line is skippedEach press of Allocate works on the open quantity only. Earlier picks stay
shipment_order_line.pack_idFrozen from the SKU when the line is created. Only stock rows with the same pack are candidatesA balance with another pack is never reserved
pack_item.is_active, pack_item.base_qtyOnly active units with base_qty above 0 form the ladderA unit switched off in the pack is not used for new allocations. The line keeps its frozen snapshot
shipment_order_line.uom, uom_factorThe unit the line was entered in, and its factor, frozen at creation. The quantity of the line is in base units. The factor is used when the picker confirmsAllocation does not multiply the quantity by the factor
sku.activeAn inactive SKU cannot be releasedsku '{sku}' is inactive
sku.allocation_policy_id, owner_config.default_allocation_policy_idSee page 22
Owner of the lineOnly stock of the same owner is a candidateStock of another owner is never reserved

Reading notes.

  • sku.abc is not read by allocation. The step field Location ABC filters the abc of the location.
  • The pack of the line is frozen at creation, but the ladder is read again at every allocation. That is intended in the code: an order keeps what it meant, and a new allocation uses what the pack offers now.
  • The line quantity is in base units. The field is documented in the order create command as Quantity in BASE units.

Where it comes from​

RuleCode
Open quantitycrates/libs/wms-outbound/src/domain/shipment_order_line/aggregate.rs:69-71
Pack and owner match in the stock readcrates/libs/wms-lib-core/src/model/inventory/inventory_balance_atp.rs:454-456
Pack and factor frozen on the linecrates/libs/wms-outbound/src/service/shared/lookups.rs:56-95, crates/libs/wms-outbound/src/service/order/create.rs:246
Ladder read again at each allocation, active units onlycrates/libs/wms-outbound/src/allocation/plan.rs:36-47, crates/libs/wms-outbound/src/allocation/plan.rs:83-102
Quantity in base unitscrates/libs/wms-outbound/src/service/order/create.rs:48-51
uom_factor used at pick commitcrates/libs/wms-outbound/src/picking/commands/commit.rs:426
SKU must be active and carry the UOMcrates/libs/wms-outbound/src/service/shared/lookups.rs:56-95