In short: A 40 tonne downgrade that ships complete costs 4,800 in extra cost of goods when the premium grade is loose and 7,200 in foregone margin when it is tight, and most systems carry neither figure, so the planner sees only an order shipped on time. Chained rules need to be acyclic and a topological sort at master data save time is the test. The larger damage is in the history: book the substitution as a sale of the item that shipped and three months of it moves a twelve month average by 25 tonnes a month in each direction, so the plan shifts capacity toward the grade you gave away.
A 40 tonne order for the standard grade is due Thursday and there is none. There are 260 tonnes of the premium grade sitting in the same warehouse, chemically identical on every specification the customer wrote down and better on two they did not. The planner substitutes, the order ships complete, on-time-in-full holds, and nobody logs anything except a line in the picking note. By the time finance notices the margin on that account, the reason has been three months gone.
Substitution is a routine planning decision that leaves almost no trace. It happens at the moment of shortage, it is usually the right call, and it is commonly recorded in a way that damages the next three planning cycles.
The rules are a graph and the graph has to terminate
Most substitution logic starts as a pair of fields on the item master, an alternate item and a conversion factor, and grows from there. After a few years of shortages, each solved by adding a rule, what exists is a directed graph nobody has drawn.
Take four items in one family. STD-25, the standard grade in a 25 kilogram bag. PREM-25, the premium grade in the same bag. PREM-20, the premium grade in a 20 kilogram bag, which exists because one large customer asked for it. The rules on file say STD-25 can be filled by PREM-25, PREM-25 can be filled by PREM-20 at 1.25 units for one, and, added in a different shortage two years later by a different planner, PREM-20 can be filled by STD-25.
That last rule closes a cycle. A substitution search now runs forever unless something stops it, and what stops it in every implementation I have seen is a hop counter. The search terminates because it ran out of depth, which means the answer depends on which node the search started from and on the order the rules were entered. Two planners working the same shortage on the same day get two different answers and both look correct on screen.
The requirement is that the substitution relation is acyclic. That is a graph property with a graph test: run a topological sort over the relation whenever substitution master data is saved, refuse the save when the sort fails, and name the cycle in the error message. It takes an afternoon to build and it converts an intermittent, unreproducible planning result into a validation error somebody has to fix at the point of entry.
The direction discipline that follows is one way rules only. Bassok, Anupindi and Akella analysed a single period multiproduct model with full downward substitution in Operations Research in 1999, and the reason the literature works in that direction is that downward substitution keeps the allocation tractable while two way substitution loses the structure. Pentico's 2008 survey in the European Journal of Operational Research covers the same one way assumption across the assortment problem. Where grades come out of a single process with variable yield, which is the normal case in steel, semiconductors and specialty chemicals, Hsu and Bassok treated downward substitution under random yield in Operations Research in 1999, and that is the closest published match to a grade slate.
One distinction worth keeping separate. Everything above is substitution the planner decides. Substitution the customer makes when the shelf is empty is a different phenomenon with a different measurement problem, treated by Netessine and Rudi in Operations Research in 2003, and it belongs to demand modelling rather than to supply planning.
What a downgrade actually costs
Put numbers on the order above. The standard grade sells at 1,000 a tonne against a standard cost of 780. The premium grade sells at 1,180 against a standard cost of 900. The contract says the customer pays the standard price for a standard order regardless of what you put in the truck, which is the normal term.
Ship standard: revenue 40,000, cost of goods 31,200, gross margin 8,800, which is 22%.
Ship premium against the standard order: revenue 40,000, cost of goods 36,000, gross margin 4,000, which is 10%. The accounting cost of the substitution is 4,800.
Now ask what those 40 tonnes would have done if left alone. If premium demand is comfortable and those tonnes would have sat in the yard for another six weeks, 4,800 is the whole cost and the substitution was a good decision. If premium demand is tight enough that the tonnes would have shipped as premium, they would have earned revenue 47,200 against cost 36,000, so margin 11,200. The cost of the substitution is then 11,200 minus 4,000, which is 7,200, and it lands as a premium order somebody else now cannot fill.
Same decision, same tonnes, and the cost is either 4,800 or 7,200 depending on a condition the planner cannot see at the moment of substituting. Most planning systems carry neither number. What the planner sees is an order that shipped complete.
When to substitute and when to let the line go short
The decision rule is a projection test on the donor item rather than a rule on the receiving item. Substitute when the donor's projected available balance stays above its own requirement across the remaining horizon, with its own cover intact.
Work it. Premium projected available is 260 tonnes. Premium requirements over the next four weeks are 210 tonnes. Give away 40 and you are left with 220 against 210, which is 10 tonnes of headroom on an item whose weekly demand has a standard deviation of 18 tonnes. Those were not spare tonnes. The substitution has moved the stockout from a customer paying 1,000 a tonne to a customer paying 1,180, and it will surface in three weeks with no record connecting it to Thursday's decision.
The same test with premium requirements of 120 tonnes leaves 140 against 120 and a comfortable margin above the donor's own buffer. That is a substitution worth making, and the 4,800 is the price of an order shipped complete.
Where the donor is short too, the substitution question has become a rationing question, and which customer gets the constrained grade is MM5's subject.
Two operational details decide whether any of this survives contact with the warehouse. The conversion factor has to be applied at the point of allocation rather than at the point of picking, because a 1.25 to 1 pack conversion posted one for one puts a 25% error into the inventory balance and the demand series at the same time. And the substitution needs a permitted flag per customer per item, since the technical equivalence of two grades has no bearing on whether a particular customer has approved the swap.
The history a substitution destroys
Here is the part that costs more than the margin. The standard grade runs at 400 tonnes a month and the premium grade at 150. A supply problem on standard runs for three months and 100 tonnes a month get filled with premium.
Book each substitution as a sale of the item that shipped, which is what happens by default because that is what was picked and invoiced, and the demand histories move. Standard becomes nine months at 400 and three at 300, so a twelve month average of 375. Premium becomes nine months at 150 and three at 250, an average of 175. The supply plan now moves 25 tonnes a month of capacity from standard toward premium, on the strength of an event that was a shortage of standard.
Run that again next year and it compounds, because standard is now planned lower, so it goes short sooner, so more of it is filled with premium. The substitution rule has become a feedback loop that reduces the item it is protecting.
The variance damage is quieter and equally real. The standard grade's demand series now contains three artificially depressed months, so both the mean and the spread are wrong, and any buffer sized from that series is wrong in a direction that makes the next shortage more likely.
Reporting splits at the same point. Finance keys revenue on the item that was invoiced, because that is what the invoice says. Planning needs demand keyed on the item the customer asked for. Those two teams then disagree about what happened in the shortage month, and the disagreement is structural rather than a data quality problem either of them can fix alone.
Three fields on the line
The schema change is small. Every order line carries the item the customer ordered, the item that fulfilled it, and a substitution reason code. Demand history keys on the ordered item. Inventory, production and invoicing key on the fulfilled item. One row answers both questions and the two series stop overwriting each other.
The reason code earns its place at review time. Substitutions driven by a supply failure, by a minimum order quantity, by a pack size the customer would not take, and by a planner's judgement that the premium grade was ageing are four different signals, and aggregating them into one count tells you nothing. Reading a quarter of coded substitutions is usually the fastest available diagnosis of which items are chronically mis-planned.
There is a reconciliation test worth running once the fields exist. For each item, ordered quantity minus fulfilled quantity across the period should net to zero across the substitution set. When it does not, the conversion factors are wrong somewhere in the chain, and that is the arithmetic that finds it.
Where this stops
The acceptance decision does not live in the planning system and cannot be made to. Customer specifications, approved supplier lists, regulated grades, food and pharmaceutical qualification and change control all sit outside, and any of them can refuse a substitution that is technically perfect. A planning rule can only act on a permission somebody has already recorded in writing, and maintaining that permission per customer per item is the genuine cost of the capability. Businesses that skip it end up with substitution logic that is legally unusable and quietly bypassed by the people who know which accounts will complain.
The opportunity cost test also depends on a forecast of the donor item across the remaining horizon, which is the number that is least certain in exactly the weeks the test gets run. The projection test above is honest about direction and unreliable about magnitude, and treating its output as a threshold rather than a number is the way to use it.
There is a diagnostic hiding in a high substitution rate as well. When one grade is filled by another in most months without any customer noticing, the two items may have been one item for years, and the answer is a range decision rather than better substitution logic. Where that leads is I8's subject.
Pull last quarter's substituted order lines and check which item number the demand history recorded against them. If it recorded the item that shipped rather than the item the customer asked for, your forecast has been drifting toward the grade you gave away and away from the grade you could not supply, for as long as the substitutions have been running.