Demand Forecasting
for E-Commerce.
How to predict what sells, when, and in what quantity, and connect that prediction directly to your reorder workflow. The operator-grade implementation guide.
Founder, TwoDots · April 2026 · Updated April 2026
TL;DR
- → Demand forecasting AI predicts what SKUs sell, in what quantity, and when. Typical error rate: 8–15% for brands with 18+ months of clean sales history.
- → Most e-commerce brands doing $1M–$20M lose 15–20% of potential revenue to stockouts and tie up 20–35% of working capital in overstock. The same model solves both.
- →
builds and deploys demand forecasting in 6–8 weeks, integrated directly into Shopify, WooCommerce, or your warehouse management system. No new dashboard to check. Reorder recommendations arrive in the tools your team already uses.
The problem
What bad forecasting actually costs.
Most e-commerce brands doing $1M to $20M are running on instinct and spreadsheets. The founder or ops lead looks at last week's sell-through and makes a gut call on the next purchase order. Some do this well. Most do not.
The cost is asymmetric and largely invisible. Stockouts get noticed: a customer bounces, a sale is lost, a review is bad. Overstock gets buried in a warehouse line item and surfaced once a year when someone asks why working capital is tied up. Neither gets fixed because there is no system producing a signal.
This is what bad forecasting costs, measured across the HappySellers platform (250+ active sellers):
Average revenue and margin impact by category
Of potential annual GMV evaporates when items are out of stock during demand peaks
Of inventory value locked in slow-moving stock, reducing cash available for growth
Premium shipping costs on rush reorders triggered by unplanned stockouts
Margin erosion from discounting overstock that was overbought at full cost
Source: TwoDots analysis across the HappySellers platform, 250+ active e-commerce businesses. Values represent typical ranges; individual results vary by category and seasonality.
A brand doing $5M a year with a 18% stockout problem is leaving $900,000 on the table annually. The same brand with 25% of its inventory value ($500K+) tied up in overstock is running its entire growth capital through a leaky bucket. These are not edge cases. They are the median e-commerce business before demand forecasting.
The approach
What the model actually does.
Demand forecasting is a time-series regression problem. The model learns patterns in your historical sales data and predicts future demand at the SKU level, adjusted for known variables: seasonality, promotional events, channel mix, and lead times.
We use an ensemble approach that combines two or three algorithms and weights them by their historical accuracy on your specific data. No single algorithm wins across all categories. Seasonal SKUs behave differently from evergreen ones. Fast movers behave differently from long-tail items.
The output is not a chart. It is a reorder recommendation: "Order 240 units of SKU-1042 by Thursday to maintain a 14-day cover ratio given your supplier's 10-day lead time." Your buyer reads that, approves or adjusts it, and places the order. The model learns from the adjustment.
Data inputs required:
- ✓ Sales history: SKU-level daily or weekly orders, 12–24 months minimum
- ✓ Current inventory: On-hand, in-transit, and allocated stock
- ✓ Supplier lead times: By vendor or SKU; can be ranges
- ✓ Promotional calendar: Past and planned sale events, discounts
- ✓ Returns history: By SKU, optional but improves accuracy
Model pipeline overview
Raw data ingestion
Shopify / WooCommerce / ERP export
Feature engineering
Lag features, rolling averages, seasonality flags
Model training
Ensemble: XGBoost + SARIMA + Prophet
Holdout validation
MAPE scoring against last 8 weeks
Reorder logic layer
Lead time + safety stock + cover ratio
Output: reorder recommendation
Push to PO workflow, Slack, or inventory app
What accuracy looks like
Manual forecasting vs. AI: week by week.
Forecast accuracy measured as 1 minus MAPE (mean absolute percentage error). Higher is better. Shown over a 12-week post-deployment window for a representative Shopify apparel brand, 380 active SKUs.
Shopify apparel brand, 380 active SKUs, 24 months training data. Week 1 = first week of live AI recommendations. Manual baseline measured over same prior 12-week period.
The pitfalls
Six mistakes that kill demand forecasting projects.
Most failed implementations share at least two of these. We know them because we inherited the wreckage from previous vendors.
Starting with the full catalogue
Build accuracy on your top 20% of SKUs first. A tight model on 200 SKUs outperforms a sprawling model on 2,000 every time. Once error rates are proven, expand.
Training on less than 12 months of data
A model trained on 6 months will not see annual seasonality. You need at least 18 months for seasonal patterns to be statistically reliable. We assess your data before writing a single line of model code.
Treating promotions as noise to clean out
Sales events, Black Friday, and festival peaks are not outliers. They are the highest-stakes moments your forecast must handle. They go in as features, not filtered out.
Forecasting demand without modelling lead times
A demand forecast without supplier lead time modelling tells you what customers want but not when to reorder. Both models must run together to generate a reorder recommendation.
Using the forecast as a report instead of a trigger
A chart you read every Monday morning is not automation. The forecast should automatically generate purchase orders, surface replenishment alerts, and trigger markdown workflows.
Replacing the whole model after one bad week
Every forecast will be wrong sometimes. The right response is continuous retraining and drift monitoring. If you scrap and rebuild on bad weeks, you will never accumulate the learning the model needs.
The process
How TwoDots ships demand forecasting.
Six phases, 6 to 8 weeks from first data handoff to live reorder recommendations. Each phase ends with a decision point. You can stop at any point.
Data audit and gap analysis
Days 1–7We map your sales history, returns data, promotional events, and supplier lead times. Most brands have the data they need. It just requires cleaning. We tell you exactly what you have before any model work begins.
Baseline model on top SKUs
Days 8–21We build the first version of the forecast on your top 20% of SKUs by revenue. This is the highest signal, cleanest data subset. Getting accuracy right here first is the only reliable way to expand later.
Holdout validation and accuracy benchmarking
Days 22–28Before any production deployment, the model runs against a holdout period. You see the MAPE (mean absolute percentage error) compared to your current manual or rule-based approach. You decide whether the accuracy justifies going live.
Integration into your ordering workflow
Days 29–42The forecast connects to your actual reorder flow. For Shopify brands this usually means the purchase order or inventory app. For WooCommerce, it connects to your WMS or ERP. The output is a reorder recommendation, not a number in a separate dashboard.
Monitoring and drift detection
Days 43–56We set up automated alerts when forecast error exceeds your agreed threshold. The model retrains on a weekly cadence. You and your team get a weekly accuracy report. If drift exceeds threshold, we investigate root cause and adjust.
Full catalogue expansion
Weeks 9–12Once accuracy targets are met on the pilot SKU set, we roll out to the full catalogue. Most expansions take an additional 2 to 3 weeks. Long-tail SKUs with limited history use different modelling approaches built for sparse data.
Timeline and ROI
When does the investment pay back?
Typical ROI trajectory for a $5M Shopify brand implementing demand forecasting. Implementation cost: $22,000. Stockout reduction: 14 percentage points. Overstock reduction: $180K freed from working capital.
Implementation phases
Cumulative financial impact ($5M GMV brand)
Illustrative model based on median outcomes across TwoDots implementations and HappySellers platform data. Individual results depend on catalogue size, data quality, and category seasonality. Full ROI analysis included in the AI Fit Sprint scoping report.
In practice
What it looked like for one brand.
Illustrative D2C apparel brand
Shopify Plus, 420 active SKUs, $6.8M annual GMV, India + UAE markets
The situation
Buying decisions made weekly by the founder. 22% stockout rate on hero SKUs during peak season. $210K in slow-moving inventory at end of previous fiscal year. No visibility into which SKUs were driving both problems.
The approach
7-week implementation. Demand forecast + reorder model on top 80 SKUs. Connected to their Shopify inventory app via webhook. Weekly reorder recommendations delivered to Slack with one-click approval.
The result
Stockout rate on hero SKUs: 22% to 8% in 10 weeks. Slow-moving inventory: down 38% from prior year. Founder buying time: reduced from 4 hours per week to 45 minutes. First full season of AI-assisted buying: Q4 2025.
8%
Stockout rate (from 22%)
38%
Slow-moving inventory reduced
7 wks
Implementation time
Composite illustrative case based on real TwoDots implementations. Specific client details have been changed. Results are not guaranteed and depend on data quality, catalogue characteristics, and implementation scope.
Honest pricing
What shipping this actually costs.
Most AI vendors will not give you a range before the first call. We will. Demand forecasting implementations with TwoDots typically land between:
$15K to $40K
One-time implementation fee. 6 to 8 weeks.
$15K–$22K: Shopify brand, clean data, top 200 SKUs, standard reorder integration.
$22K–$32K: Multi-channel brand (Shopify + Amazon), 200–800 SKUs, custom WMS integration.
$32K–$40K: Complex catalogue (1,000+ SKUs), multiple warehouses, seasonal business requiring full promotional modelling.
What is included:
What is NOT included:
Why TwoDots
What makes this different from every other AI vendor.
We validated this on 250+ live sellers before selling it
Every demand forecasting approach in this playbook has been tested on real sellers through the HappySellers platform. When we say a particular technique reduces stockouts by 14 percentage points, we have the data from actual businesses across actual seasonal cycles. This is not a theoretical claim.
The output is a recommendation, not a dashboard
Most AI vendors build you a chart. We build you a workflow. The forecast produces a reorder recommendation that connects to your actual purchasing process. Your buyer approves or adjusts it. The model learns from adjustments. There is no new interface to check.
We scope before we price
We will not give you a contract before week 1 data audit is complete. The price range above is honest. We do not pad scope to hit a number. If the audit reveals your data needs significant work first, we tell you and quote The Plumbing separately, not buried in the implementation fee.
Ship-or-don't-bill on milestones
If we miss a committed milestone date, you do not pay for that milestone. This is possible because we scope tightly before committing dates, not after. The accountability is contractual.
Retail-native, not retail-adjacent
Sunil built a recommendation engine at Kohl's ($17B retailer) and spent 7 years running HappySellers across 250+ Indian e-commerce businesses. We do not come from fintech or SaaS and pivot into retail. This domain is where we started.
Common questions
Everything operators ask before starting.
How much historical data do I need for demand forecasting to work?
A minimum of 12 months is needed to capture basic seasonal patterns. 18 to 24 months is the sweet spot for most e-commerce brands. With less than 12 months of history, the model can still produce useful outputs, but accuracy on seasonal peaks will be lower. We assess your data during the first week and give you a clear picture of what accuracy you can expect before any model work begins.
Will demand forecasting work for my Shopify store?
Yes. Shopify's native analytics export provides everything we need: order history, SKU-level sales, returns data, and product metadata. We have built demand forecasting integrations for Shopify, WooCommerce, Amazon Seller Central, and custom ERP systems. The data format changes; the model logic and the accuracy targets do not.
What error rate should I expect?
For brands with 18+ months of clean data and 200 to 2,000 active SKUs, mean absolute percentage error (MAPE) of 8 to 15% is typical within the first 8 weeks of deployment. That is 3 to 5x better than manual spreadsheet forecasting in most cases. For highly seasonal or trend-driven categories, expect 15 to 25% MAPE initially, improving as the model accumulates more cycles.
How long does AI demand forecasting take to implement?
6 to 8 weeks from data handoff to first live reorder recommendations. The timeline depends primarily on data quality and the complexity of your ordering workflow. If your Shopify order history is clean and you use a standard inventory app, we have gone from first conversation to live forecast in 5 weeks.
What does demand forecasting cost to build?
Most implementations with TwoDots land between $15,000 and $40,000 depending on catalogue size, integrations required, and whether the data infrastructure needs work first. We scope tightly before committing a number. If our estimate falls outside your budget, we tell you before any work begins. We would rather lose the engagement than start a project we cannot finish within your constraints.
Do I need a data team in-house?
No. Most of our clients have no dedicated data function when we start. We handle data extraction, cleaning, pipeline setup, and model deployment. What you need is one person who understands your business well enough to validate whether the forecast makes operational sense. Usually that is the founder, COO, or head of operations.
What happens when the forecast is wrong?
All forecasts are wrong sometimes. What matters is how wrong, and why. We set up automated drift detection that flags when forecast error exceeds your agreed threshold. When it does, we investigate: was it a promotional event the model did not account for? A supply disruption? A new trending SKU? The root cause determines the fix. Monitoring and investigation time is included in the engagement. You do not get billed for it separately.
Ready to ship this?
Want demand forecasting in your stack?
Start with a free AI Fit Score to see if your data is ready. Or book a 30-minute call with Sunil to scope what this looks like for your specific catalogue and stack.
Ship-or-don't-bill. Milestone-based. First live output in 4 weeks.