Sales forecasting that knows the calendar, the map and the weather
Years of order history in a nopCommerce database became a forecasting model that predicts demand day by day and month by month, by region, with separate handling for sale peaks and regional climate seasons.
Context
The same national cabinet retailer as the visualiser engagement. By 2026 the store had many years of order history in SQL Server, down to the SKU, the shipping region and the day, but planning still worked from last year’s monthly totals.
The problem
Annual averages hide the patterns that matter. Demand moves differently in each region. Black Friday and other sale events pull orders forward and distort the weeks around them. And some effects were simply invisible: nobody had asked whether weather changed buying.
The retailer wanted forecasts it could plan stock and campaigns against, at the granularity its business actually runs on.
Our approach
We built the model in ML.NET so it runs inside the same .NET and SQL Server estate as the store, with no new platform to host or secure and no data leaving the client’s environment.
- Data preparation. Order history was aggregated into daily and monthly series per region, with returns and cancellations netted out and catalogue changes reconciled so a renamed SKU did not look like a new product.
- Decomposition. Rather than one opaque model, the forecast is built from components the business can read: a baseline trend, a weekly cycle, a yearly cycle, a sale-event component for Black Friday and other festival peaks, and a regional climate-season component.
- Regional models. Each region gets its own fitted components, because a season that lifts demand in one state does nothing in another.
- Backtesting. Every version was tested by forecasting past periods it had not seen and comparing against what actually sold, so the client could judge accuracy before trusting it.
What we built
- An ML.NET forecasting pipeline over the store’s order history, retrained on a schedule from SQL Server.
- Forecasts by day and by month, for each region, with sale-season and climate-season effects reported separately so planners can see why a number is high.
- Backtest reports that show forecast against actual for past periods.
- Output tables that feed the retailer’s existing planning and reporting.
The result
The retailer plans stock and campaigns against forecasts instead of annual averages. The model also surfaced effects nobody was planning for: in one region, sales rise during hurricane season, now treated as a predictable seasonal peak rather than noise. Accuracy figures are withheld under the client agreement.
The engagement took two months with one engineer, working as a dedicated resource inside the existing relationship.
Have a similar problem?
Tell us what you are building. Hiten reads every enquiry and replies within one working day.
