Every replenishment order, production plan and purchasing decision rests on a demand forecast — and in many companies that forecast is still a spreadsheet with last year's numbers plus a gut feeling. ML-based demand forecasting learns from thousands of related series at once, uses prices, promotions, holidays and weather as drivers, and produces probabilistic forecasts (ranges, not single numbers) that inventory optimisation can turn into order quantities. Since 2024/2025, pretrained time-series foundation models (Chronos-2, TimesFM, TiRex, Moirai) make a solid baseline available zero-shot, which lowers the entry barrier for the Mittelstand.
Problem & value
- Today: planners extrapolate history in ERP (moving averages, simple exponential smoothing) or Excel, then adjust manually for promotions and events. Results: stock-outs and lost sales on fast movers, excess stock and write-offs (fresh food, fashion, spare parts) on slow movers, bullwhip effects upstream, and a lot of planner time spent on routine series.
- AI value: global models trained across all products learn shared patterns (seasonality, promotion response, cannibalisation), handle new products via similarity, and scale to hundreds of thousands of series. Planners shift from typing numbers to reviewing exceptions.
- Measured results (vendor-reported, not independently audited): Blue Yonder reports that UK grocer Morrisons improved on-shelf availability by 30% across 29,000+ products in ~500 stores with Blue Yonder Demand [9]; RELEX reports 34.7% fewer lost sales and ~50% less store replenishment time at Grupo Vinoteca [10]; German vendor paretos reports +50% forecast accuracy at Faller Packaging and a 50% reduction of out-of-stocks at HelloFresh [11]. Such figures depend heavily on the baseline — always measure against your own current process.
Variants
- Grocery & fresh retail: daily store-SKU forecasts, short shelf life, strong weather and holiday effects, intermittent demand on long-tail items; often combined with markdown pricing (OPT-004) and food-waste reduction (VIS-033).
- Fashion & seasonal goods: little or no history per article → forecasting by attributes and similar predecessors; pre-season buying plus in-season reforecast; trend signals see PRED-034, returns see PRED-020.
- E-commerce: forecasts per warehouse and day including returns and marketing campaigns.
- Wholesale / B2B distribution: lumpy order patterns from few large customers; use of order book, EDI forecasts and customer-specific contracts; intermittent spare-parts demand (Croston/TSB).
- Manufacturing / CPG: monthly-to-weekly forecasts at product family level for S&OP and MRP; demand sensing adjusts the short-term horizon with orders, shipments and POS data; trade-promotion effects see OPT-016.
- Pharma / medical supplies: regulated supply, tender-driven demand, shortage reporting.
- Hospitality & bakeries (SMB): daily production quantities per branch from POS + weather — a classic first project for small companies.
- Private use: not relevant beyond hobby/home-business sellers (e.g. marketplace shops), who use the forecasting features of their shop or inventory tool.
How it works
- data ingestion (ERP/POS/webshop/EDI, daily batch)
- cleansing (stock-out correction
- "true demand", outliers, returns, product successors)
- feature store (calendar, holidays, school vacations, price/promo, weather, events)
- segmentation (fast / slow / intermittent / new items — ABC/XYZ)
- model layer: statistical baselines + global gradient-boosting + time-series foundation model
- backtesting & model selection per segment, ensembling
- hierarchical reconciliation (SKU
- category
- total; store
- region)
- probabilistic output (quantiles P10/P50/P90)
- planner review of exceptions + LLM-generated explanations (human-in-the-loop)
- consensus forecast
- replenishment / MRP / S&OP (OPT-005, OPT-008)
- Model families: statistical (AutoETS, AutoARIMA, Theta, MSTL, Croston/TSB for intermittent demand); global ML (LightGBM/XGBoost on lag, rolling and calendar features — the workhorse of modern retail forecasting); deep learning (DeepAR, TFT, N-HiTS); and pretrained foundation models used zero-shot or fine-tuned. Ensembles across these families are usually most robust.
- Probabilistic forecasts are essential: safety stock and service levels are set from quantiles, not from the mean.
- Human-in-the-loop: planners override for known events (listing changes, competitor actions); track forecast value added (FVA) to see whether overrides help or hurt.
- LLM layer (optional): explains forecast changes in natural language, answers "why is week 48 so high?", and ingests unstructured signals (customer emails, news) — the numeric forecast itself should stay with time-series/tabular models.
Data preparation
Demand forecasting needs clean sales history per SKU and location, plus prices, promotions, stock levels and master data. In an SMB this typically lives in the ERP, the webshop or POS, Excel promotion plans and the planners' heads.
Typical gaps: - Stock-outs recorded as zero sales (hidden demand). - Changed article numbers, duplicate or replaced SKUs. - Promotions and price changes not documented. - Several sales channels in separate systems. - Product hierarchies that are missing or outdated.
Preparation steps: 1. Export order and shipment history from the ERP (see PREP-005) and join channels on a common SKU key. 2. Flag stock-out periods and one-off events, and mark them as unreliable. 3. Move promotion and price calendars from spreadsheets into tidy tables (PREP-011). 4. Clean up master data and hierarchies, and agree KPI definitions with the department (PREP-012). 5. Set aside a hold-out period as a test set (PREP-018).
Plan on 30-50 % of the project effort for this, mostly SKU harmonisation and the promotion history. Run the check in GUIDE-003 first; the mapping and gap analysis from PREP-001 and PREP-002 shows quickly whether two to three years of usable history exist. Tools: ERP export, Power Query, dbt or DuckDB, plain Python (pandas).
Implementation paths
Which path for whom
- SMB (A): Forecasting modules in ERP, inventory-planning and shop tools are mature, EU-hostable and priced for SMBs, and replenishment is a standard process.
- Enterprise (B): Forecasting is core to S&OP and runs over millions of series, so a pipeline on the own data platform with cloud or open models is cheaper and more controllable than seat licences.
- Developer (C): Open-source libraries (e.g. Nixtla statsforecast, LightGBM) run on HW1 and give full control over features and hierarchies.
Path A — Buy (recommended for most SMBs)
- Supply-chain planning suites (enterprise): SAP IBP (demand planning with ML/demand sensing), Blue Yonder Demand, RELEX Solutions (Finland, EU), o9 Solutions, Kinaxis, Oracle SCM Cloud, Microsoft Dynamics 365 Supply Chain Management (demand forecasting).
- Retail-specialised: RELEX (EU), Blue Yonder, SAP for Retail, Slimstock Slim4 (Netherlands, EU), Inform add*ONE (Germany, EU), DynaSys / Board (EU).
- Mittelstand-focused AI planning: paretos (Heidelberg, Germany — EU-hosted inference, planner approval before ERP write-back) [11]; inventory-optimisation tools with built-in forecasting for SMB ERPs.
- SMB / micro: forecasting built into ERP and shop systems (e.g. Microsoft Dynamics 365 Business Central, Shopify/marketplace inventory apps), often enough for < 1,000 SKUs.
- Choose A when: forecasting must flow straight into replenishment and ordering, planners need a UI for overrides, and processes are standard. Check: EU hosting, ERP connector (SAP, Dynamics, proAlpha, abas), probabilistic output, promotion handling, explainability.
Path B — Build on cloud APIs
- Managed forecasting services: Google BigQuery ML
AI.FORECASTwith built-in TimesFM (available in all BigQuery-supported regions, so EU locations can be used) andARIMA_PLUS_XREG[6]; Azure Machine Learning AutoML forecasting (ARIMA, Prophet, LightGBM/XGBoost, TCN, ensembles, "many models" for thousands of series) [8]; Amazon SageMaker Canvas / AutoGluon on SageMaker — note Amazon Forecast is closed to new customers since 29 July 2024 [7]; Nixtla TimeGPT API with exogenous variables [12]; Databricks / Snowflake ML with open libraries. - Orchestration: dbt or Spark for features, MLflow for model registry, scheduled batch jobs (Airflow, Dagster, Azure Data Factory), results back to ERP via API or flat file.
- LLMs (EU region): Mistral, Claude, Gemini or GPT via EU endpoints for forecast commentary and a planner chat on top of the forecast tables (see DATA-001).
- Choose B when: data already sits in a cloud data platform and a data team exists.
Path C — Self-host (open source)
- Libraries: Nixtla StatsForecast (fast AutoARIMA/ETS/Theta/MSTL, Croston/TSB; Apache-2.0) [5],
MLForecast (LightGBM-based global models), NeuralForecast; AutoGluon-TimeSeries (one
fit()over statistical, LightGBM, DeepAR/TFT and Chronos models with ensembling) [4]; Darts, sktime, GluonTS; hierarchical reconciliation with HierarchicalForecast. - Open-weight foundation models: Amazon Chronos-2 (120M, Apache-2.0, multivariate and covariate-aware, Oct 2025) and Chronos-Bolt [1][2]; Google TimesFM 2.5 (200M, Apache-2.0 weights; TimesFM 3.0 weights from Aug 2026 are non-commercial — production use only via Google Cloud) [3]; TiRex (35M, xLSTM, NXAI, Linz, Austria — EU; NXAI community licence, check terms) [13]; Salesforce Moirai 2.0 (CC-BY-NC-4.0 weights, non-commercial) [14].
- Hardware: HW1 is enough — statistical and LightGBM models run on CPU servers; the small foundation models (9–200M parameters) run on CPU or a modest GPU. HW2 helps for fine-tuning and for very large SKU × location counts. Ops effort: data pipelines and monitoring dominate, not inference.
Path D — Custom training
Training a fully custom deep model rarely beats a tuned LightGBM + foundation-model ensemble. Worthwhile: fine-tuning a foundation model (Chronos-2, TimesFM 2.5) on your own history for large portfolios, or custom features/models for special demand mechanisms (tender business, weather-driven beverages, fashion attribute models). Needs 2+ years of clean daily/weekly history, stock-out flags and promotion records; the main effort is data cleansing, not modelling.
State of the art (2026)
- Global gradient-boosting models (LightGBM on lag, calendar, price and promotion features) are the established production workhorse on rich retail data. The reference benchmark is the M5 competition: 42,840 hierarchical, mostly intermittent Walmart series with price, promotion and event drivers, ~100,000 submissions [15][16].
- Time-series foundation models matured quickly: Chronos-2 (Oct 2025) introduced group attention for in-context learning across related series and covariates and reports top results among pretrained models on fev-bench, GIFT-Eval and Chronos Benchmark II, with the largest gains on covariate-informed tasks [1][2]; TimesFM went to 2.5 (16k context, covariates via XReg) and 3.0 (native multivariate & covariates) [3]; TiRex reports top GIFT-Eval scores over short and long horizons with only 35M parameters [13]. Benchmarks: GIFT-Eval (97 dataset configurations, 7 domains, with a test-leakage flag) and fev-bench [17].
- Practical consequence: foundation models give a strong zero-shot baseline for new and short-history products and for SMBs without a data-science team; for promotion-heavy retail, ensembles with feature-rich LightGBM models still matter.
- Agentic planning: suites add LLM copilots (e.g. explanation of forecast deviations, scenario questions) — useful for adoption, not for accuracy.
- Limits & failure modes: stock-outs censor demand (forecasts learn "zero sales" as "zero demand" unless corrected); structural breaks (pandemic, new competitor, price shocks) break patterns; new products and promotions remain hardest; MAPE is misleading for intermittent items (use WAPE/MASE, bias and quantile loss); public-benchmark wins do not guarantee wins on your data; check licences of model weights before production use.
Shared resources & combinations
- Same time-series stack (time-series + tabular-ml, HW1): PRED-002 sales forecasting, PRED-007 energy load, PRED-008 price forecasting, PRED-011 staffing demand, PRED-016 cash-flow forecasting, PRED-019 mobility demand — one feature store, one backtesting framework and one foundation-model service (Chronos-2 / TimesFM) can serve them all.
- Downstream decision layer (optimization-solver): OPT-005 inventory optimisation & replenishment (consumes the quantiles), OPT-002 production scheduling/APS, OPT-008 S&OP and network design, OPT-004 dynamic pricing & markdowns, OPT-016 promotion planning, OPT-017 assortment planning.
- Inputs from neighbours: PRED-017 weather forecasts as drivers, PRED-034 trend signals, PRED-020 return rates, DATA-003 master-data cleansing, ANOM-011 supplier risk.
- Planner interface: DATA-001 conversational BI and DATA-024 FP&A copilot share the LLM layer; VIS-033 food-waste tracking provides waste feedback for fresh forecasting.
Effort, cost & KPIs
- Path A: 3–9 months for a suite rollout incl. ERP integration and data cleansing; licences usually per SKU-location volume or revenue band.
- Path B/C: 2–4 months for a first production pipeline with one data scientist/engineer; compute cost is low (CPU batch jobs), data engineering is the main cost.
- Path D: additional 1–3 months; only for large portfolios.
- KPIs: forecast accuracy (WAPE, MASE) and bias per segment versus the current baseline; forecast value added of planner overrides; on-shelf availability / service level; lost sales; inventory days / turns; write-offs and waste; planner time per SKU.
People & change
Involve: management (budget, service-level goals), the department lead for supply chain or purchasing as process owner, the planners as daily users, IT for the ERP export, data owners for item and promotion data, and key suppliers if forecasts are shared with them. Involve planners from the start: they know the promotions and exceptions the model cannot see.
Works council: depends. A pure item-level forecast is not aimed at employees. It becomes subject to co-determination under §87(1) no. 6 BetrVG if planner overrides or forecast accuracy are logged per person; the Federal Labour Court (BAG) holds that objective suitability for monitoring is enough. Inform the works council anyway under §90(1) no. 3 BetrVG, because planning work processes change. Only relevant if an elected works council exists; public bodies involve the staff council.
Data protection: mostly non-personal data, so a DPIA is usually not needed. Still involve the DPO if customer-level data is used or an external service processes data (AVV, Art. 28 GDPR).
AI literacy: support planners with a short training on probabilistic forecasts and bias (GUIDE-006).
Typical concerns: "the model replaces my judgment" and "the forecast is wrong". Address both with a planner-in-the-loop design: the planner can override, and accuracy is measured against the old process. Start with one product group as the pilot (GUIDE-009) and communicate openly (GUIDE-008).
Risks, regulation & compliance
- EU AI Act: minimal risk — demand forecasting is not listed in Annex III; "critical infrastructure" covers safety components in managing utilities and traffic, not commercial supply planning [18]. AI-literacy duty (Art. 4) applies; no Art. 50 transparency obligation for internal forecasts. Classification can change only if the output is used to decide about individuals (e.g. workforce scheduling → see PRED-011 and HR rules).
- GDPR: aggregated sales data is not personal data; loyalty-card or customer-level order histories are — aggregate before modelling, or apply purpose limitation and a DPA with the vendor.
- Competition law: sharing forecasts or demand data with competitors or across a buying group can raise antitrust issues — keep data-sharing within supplier-retailer collaboration agreements.
- Sector rules: pharma/medical supply (shortage reporting), food (shelf-life, waste reporting), GoBD for audit trails when forecasts drive automated purchase orders.
- Business risks: over-trust in automated orders, unnoticed data pipeline failures, model drift after structural breaks. Mitigations: monitoring of bias and error by segment, order caps and approval thresholds, fallback to statistical baselines, regular backtests.
Getting started
- Extract 2–3 years of sales history per SKU-location with stock-out flags, prices and promotions; measure the accuracy (WAPE, bias) of today's process as baseline.
- Segment the portfolio (ABC/XYZ, intermittent, new items) and run a quick benchmark with StatsForecast baselines, LightGBM (MLForecast) and Chronos-2 / TimesFM 2.5 zero-shot, e.g. in AutoGluon-TimeSeries.
- In parallel, test 1–2 Path A tools on the same data if forecasts must feed ordering directly.
- Go live on one category or plant with planner review of exceptions; feed quantiles into replenishment (OPT-005).
- Track accuracy, service level and inventory monthly; add drivers (weather, events) step by step.
Sources
- Amazon Science — Chronos forecasting repository (Chronos-2, Chronos-Bolt, licence, benchmark claims) — https://github.com/amazon-science/chronos-forecasting
- Ansari et al. — "Chronos-2: From Univariate to Universal Forecasting" (arXiv 2510.15821) — https://arxiv.org/abs/2510.15821
- Google Research — TimesFM repository (2.5 / 3.0, licences, BigQuery) — https://github.com/google-research/timesfm
- AutoGluon — Time Series Forecasting documentation — https://auto.gluon.ai/stable/tutorials/timeseries/index.html
- Nixtla — StatsForecast repository — https://github.com/Nixtla/statsforecast
- Google Cloud — BigQuery built-in TimesFM model / AI.FORECAST — https://docs.cloud.google.com/bigquery/docs/timesfm-model
- AWS Machine Learning Blog — Transition your Amazon Forecast usage to Amazon SageMaker Canvas — https://aws.amazon.com/blogs/machine-learning/transition-your-amazon-forecast-usage-to-amazon-sagemaker-canvas/
- Microsoft Learn — Overview of forecasting methods in AutoML (Azure Machine Learning) — https://learn.microsoft.com/en-us/azure/machine-learning/concept-automl-forecasting-methods
- Blue Yonder — Morrisons customer story — https://blueyonder.com/customers/morrisons
- RELEX Solutions — Resources / customer stories (Grupo Vinoteca) — https://www.relexsolutions.com/resources/
- paretos — Socrates AI decision system (Heidelberg, customer results) — https://www.paretos.com/
- Nixtla — TimeGPT exogenous variables documentation — https://www.nixtla.io/docs/forecasting/exogenous-variables
- NXAI — TiRex repository — https://github.com/NX-AI/tirex
- Salesforce AI Research — Uni2TS / Moirai repository — https://github.com/SalesforceAIResearch/uni2ts
- Makridakis, Spiliotis, Assimakopoulos — "M5 accuracy competition: Results, findings, and conclusions", IJF 38(4), 2022 — https://ideas.repec.org/a/eee/intfor/v38y2022i4p1346-1364.html
- University of Nicosia IFF — M5 Competition overview — https://www.unic.ac.cy/iff/research/forecasting/m5-competition/
- Salesforce AI Research — GIFT-Eval benchmark — https://github.com/SalesforceAIResearch/gift-eval
- AI Act Annex III (high-risk areas), based on Regulation (EU) 2024/1689 — https://artificialintelligenceact.eu/annex/3/