Back to all articlesWhat can AI in supply chain do today, and what data does it need?
Noah CookNoah Cook
Operations

What can AI in supply chain do today, and what data does it need?

AI in supply chain is the use of machine learning, optimization, and language models on planning and operations work: forecasting demand, setting stock levels, flagging late suppliers, planning delivery routes, and explaining why a service metric moved. Each of those uses runs on its own set of tables, and most projects stall on gaps in that data before the choice of model matters. Start from one decision. Confirm that the history behind it is complete, and make the AI result beat a simple baseline before anyone acts on it.

Three techniques that share the label

Machine learning finds patterns in history and uses them to predict. IBM describes these as systems that learn from data in place of pre-programmed rules, and demand forecasting is the familiar case. Inside a planning product, the label often covers a set of forecasting models chosen item by item. Microsoft's Dynamics 365 Demand planning, for example, includes auto-ARIMA, ETS, Prophet, and XGBoost, plus a best fit option that picks a model for each product and dimension combination. Only XGBoost accepts extra inputs, which Microsoft calls signals. Its documentation illustrates them with sales split by temperature.

Optimization is a mathematical search for the best plan inside a set of constraints. Route planning is the usual example. Google's OR-Tools documentation defines the vehicle routing problem as finding routes with the least total distance or cost for several vehicles, usually under limits such as vehicle capacity and delivery time windows.

Generative AI and agents take a question in plain words, query the data, and write the answer. IBM's examples of agent tasks include monitoring stock levels and checking shipment status.

Six uses and the tables behind them

UseWhat the AI doesData it needsDecision it supports
Demand forecastingFits a forecasting model to each item and location, with optional signals such as price, promotions, or weatherSales by item, location, and week, with stockout weeks flagged; a calendar of promotions and price changesHow much to buy or make
Inventory and replenishmentTurns the forecast and the spread of supplier lead times into reorder points and safety stockOn hand, open purchase orders, lead time per supplier, target service levelWhen to reorder, and how much
Supplier and inbound riskFlags purchase orders likely to arrive late and suppliers whose lead time is driftingPurchase order lines with order, promised, and receipt dates; shipment statusWhich order to expedite, which supplier to review
Route and load planningSearches for routes and loads that cut distance or cost within vehicle and time limitsDelivery locations, travel times, vehicle capacity, delivery windowsTomorrow's routes and truck loads
Exception and driver analysisWatches service and cost metrics and finds the location, supplier, or item behind a moveOrder lines, shipments, inventory, and purchase orders, joined at one grainWho acts on what this week
Plain-language questionsAnswers a question such as "which open orders are late" by querying the data and writing the answerThe same tables, plus written definitions of each metricFaster answers to one-off questions

Kinaxis, a planning software vendor, puts demand and inventory planning and inbound supply risk detection among its top uses. The first four rows belong to planning suites, ERPs, and routing software. Microsoft's Demand planning selects a forecasting model per product and dimension combination and accepts custom models, so a team that needs forecast generation, a consensus demand plan, or purchase order creation should do that work in a product of this kind. Route planning belongs in a routing product or an optimization library such as OR-Tools.

The fifth row asks something else. A forecast estimates demand. Explaining why last week's service level fell, where it fell, and who should act takes a driver analysis over orders, shipments, and purchase orders. A planner with a spreadsheet can run one for a few dozen items. Across a full catalog, the exports and lookups take most of the week. Our post on finding why a metric changed sets out the general method.

Why do supply chain AI projects stall on data?

The table names the tables. Whether those tables can carry a model depends on six checks.

Start with the grain. Agree what one row means, such as item, location, and week, and join every table at that grain before you aggregate. Then separate demand from sales: a week with no stock records low sales, and a model trained on it learns that demand was low. Flag those stockout weeks.

Purchase order lines need three dates: order, promised, and receipt. A model with no promised date has no way to learn what "late" means. Units have to agree as well, since cases and single units in the same column distort every rate. Master data has to link item to supplier and location to region, because a driver analysis can name only the suppliers the data links. Last, fill rate, on-time delivery, and lead time each have several versions in use. Pick one of each and write it down.

Vendors see the same problem from their side. Kinaxis names a unified data model across supply, demand, capacity, and constraints as a condition for automation. Short histories cause trouble too: Microsoft's best fit model added a naive forecast for low-data cases in version 2.

Testing a forecast or a finding before anyone acts

Score a forecast on weeks the model never saw. Forecasting: Principles and Practice, the open textbook by Rob J Hyndman and George Athanasopoulos, states that accuracy can only be judged on new data, and Microsoft's best fit model follows that rule from version 2: training and test data stop at the forecast start date. The same textbook keeps simple methods as benchmarks. The naive forecast repeats the last value. The seasonal naive forecast repeats the value from the same season last year. If a model loses to seasonal naive on held-out weeks, keep the forecast you have. For slow sellers, score with mean absolute error, because percentage errors are undefined or extreme when actual demand is zero or close to it.

A driver finding has to reconcile to the total. Split the change into the rate change within each group and the mix change between groups, because volume moving between locations can shift the total while every location holds its rate. Before you blame the operation, check whether a data feed changed.

For a recommendation, keep a person on the decision until the record shows it holds up. Log what the system recommended, what the team did, and what happened next.

Tracing a fill rate drop to one late supplier

An operations analyst at a housewares brand opens Monday's service report and finds network fill rate down from 97.10% in Week 1 to 91.88% in Week 2. The brand ships from three distribution centers (DCs) and counts fill rate as units shipped from stock on the first attempt divided by units ordered in the week. The brand and every figure below are invented for this post. They are not a customer result, and Orion did not run this analysis.

DCWeek 1 units orderedWeek 1 units shippedWeek 1 fill rateWeek 2 units orderedWeek 2 units shippedWeek 2 fill rate
East4,0003,92098.0%4,2004,11698.0%
Central3,0002,91097.0%3,1002,48080.0%
West3,0002,88096.0%2,7002,59296.0%
All DCs10,0009,71097.10%10,0009,18891.88%

The network rate fell 5.22 percentage points, which means 522 more unfilled units on the same 10,000 ordered. Two things can cause a drop like that: a DC filling a smaller share of its orders (a rate effect), or orders shifting toward a DC that fills less (a mix effect).

For the rate effect, multiply each DC's Week 2 orders by the change in its fill rate. East and West held their rates and contribute nothing. Central contributes 3,100 × (80.0% minus 97.0%) = -527 units. For the mix effect, take what Week 2 volumes would have shipped at Week 1 rates and subtract what Week 1 shipped: (4,200 × 98% + 3,100 × 97% + 2,700 × 96%) minus 9,710 = 9,715 minus 9,710 = +5 units. Volume moved toward East, the DC with the highest rate, which helped a little.

The two effects sum to -527 + 5 = -522 units, the change on the report. Central accounts for all of it, so the analyst breaks Central's unfilled units down by supplier:

Central DC unfilled unitsWeek 1Week 2Change
Supplier K items10540+530
Other suppliers' items80800
All Central items90620+530

At its Week 1 rate, Central would have left 93 of its 3,100 units unfilled. It left 620, and Supplier K's items account for 540 of them, or 87.1%. Those items' unfilled units rose by 530. That is more than the network's 522-unit increase, because East and West together left 8 fewer units unfilled. The purchase order lines show why. Supplier K's open order for those items was due in Week 1 and has not arrived, and its last three purchase orders took 6, 6, and 9 weeks against a planned 6, an average of 7.0.

The analyst's note for the operations review fits in three sentences. Central's fill rate fell because one supplier's order is late, and Central's other items shipped at their usual level. Expedite or re-source the Supplier K items, and serve Central's orders for them from East where East holds stock. Three purchase orders make a thin record, so recheck Supplier K's lead time over more orders before changing the planning value.

The finding depended on two joins: order lines to items and suppliers, and purchase order lines with promised and receipt dates. With DC totals alone, the review stops at "Central is down."

Handing the fill rate check to Orion

Orion, the analytics platform Gravity builds, works on the fifth row of the table: a supply chain metric moved, and the team needs the cause and an owner. It starts from rules the operations team already follows. For fill rate, those are the first-attempt definition, the order of cuts (DC, then supplier, then item), the planned lead time for each supplier, and who signs off on an expedite. Orion writes them into Context pages and reads those pages each time it analyzes fill rate.

A port delay that a supplier reports by phone reaches the planner who took the call and no table at all. When an analysis stops at a fact like that, Orion puts it to the team as a Question from Orion and adds the reply to its context for later reviews. The same cards carry analyses Orion suggests, such as a daily fill rate driver check, and edits to Context pages that a project editor applies or dismisses.

The first run happens in chat, and Orion keeps it as an analysis notebook. The analyst can read the SQL and Python, change a join, and rerun it until the numbers match the team's own. When the analyst asks, Orion turns that notebook into a daily Workflow, with a dry run on current data before anything is saved. After the team approves it, each morning's run names the DC, supplier, and items behind any move in fill rate.

An analyst starting on real data might open with a request like this one:

Using our fill rate definition, compare last week with the week before by distribution center. Split the change into rate and mix effects. For any DC whose rate fell, break unfilled units down by supplier, and join open purchase orders with their promised and receipt dates. Include the SQL and the rows that support the finding.

Picking the first use

Choose the one decision AI should improve first, and the metric that will tell you whether it did. Check the data behind that decision for grain, stockout weeks, and purchase order dates. Then name the baseline the AI result has to beat, and the person who approves the result before anyone acts on it.

In the fill rate example, the network number pointed at the whole operation. The DC split narrowed it to Central, and purchase order dates narrowed it to one supplier. Without those dates, the review would have ended at Central.

Keep reading

View all