Skip to content

Inventory Substitutions

A substitution rule is a fallback list. When an item is out of stock, the Inventory node can take a named alternative instead, tried in the order you list them.

FieldWhat it is
Original ItemThe item that may be substituted
SubstitutesThe fallbacks, in priority order, tried from the top down

Order matters: put the closest match first, the last resort last. A rule for a 10mm gasket might fall back to the same gasket from a second supplier, then to an oversized one.

A rule only fires when the logic asks for it

Section titled “A rule only fires when the logic asks for it”

This is the part that catches everyone. A substitution rule does nothing unless the statement that takes the stock ends with SUBSTITUTE.

TAKE 2 "Gasket" FROM "Warehouse" SUBSTITUTE

Without that word, the rule is ignored: the take fills as far as it can from the original item and no fallback is considered, with no error and no warning. If substitutions appear to have no effect, check the statement before you check the rule.

The reverse is harmless. SUBSTITUTE on an item with no rule, or on an item that has enough stock anyway, simply behaves as an ordinary take.

One substitute must cover the whole request

Section titled “One substitute must cover the whole request”

There is no partial fill across substitutes. Each candidate is accepted only if it can satisfy the entire quantity on its own, so a request for 8 fails even when two substitutes hold 5 each. Size the fallbacks with that in mind, or split the request into smaller takes.

A statement may name a substitute directly, and that one is tried before the rule list. Use the rules for the model-wide policy and the statement for a one-off exception.

Naming an item that does not exist stops the run with a clear error rather than skipping it quietly, so a typo is caught rather than silently ignored.

The two items are counted separately: the original books a first-attempt miss, and the substitute books the fill. Reading them together tells you how often the primary was short and which fallbacks the process actually leaned on.