Implementation of Sales Forecasting
Sales forecasting — forecast of sales volume in monetary value for future period. Unlike demand forecasting (which works with product units), sales forecast operates with revenue and is directly used for budgeting, quota setting and operational planning.
B2B Sales Forecasting vs. B2C
B2B Pipeline Forecasting: In B2B, forecast is built on sales pipeline:
- Weighted pipeline: each deal × probability by stage → sum
- AI approach: ML model re-evaluates probabilities based on behavioral signals (not just funnel stage, but activity: emails, calls, meetings)
Weighted pipeline problem: managers leave stuck deals in pipeline, "wishful thinking" → systematic overforecast.
B2C Transaction Forecasting: Working with aggregated revenue time series, transactions, average check. Classic time series methods (Prophet, ETS, SARIMA) plus ML features.
AI Correction of B2B Pipeline
CRM Signals for Probability Re-evaluation:
| Signal | Model Weight |
|---|---|
| Days in current stage vs. median | High |
| Email replies in last 14 days | High |
| Number of stakeholders engaged | Medium |
| Competitor mention in notes | Medium |
| Deal size vs. ICP | Medium |
| Closeness to customer fiscal year end | Low |
Model: LightGBM with CRM features. Target: fact of deal closing within N days. Retrain weekly.
Result: AI probability score replaces manager's manual assessment. Accuracy (AUC) usually 0.75-0.85, which is 15-25% better than weighted pipeline.
Hierarchical Forecast Structure
Sales forecast needed at multiple levels:
Total Company Revenue
├── Business Unit A
│ ├── Product Line 1
│ │ ├── Region EU
│ │ └── Region NA
│ └── Product Line 2
└── Business Unit B
Approach: bottom-up forecasting with reconciliation. Each node has its own model, top levels reconcile via MinT.
Seasonal and Event-Driven Patterns
SaaS/B2B: quarterly spike (last 2 weeks of quarter — "hockey stick"), fiscal year end, budget season in October-November.
B2C: Black Friday, Cyber Monday, New Year. For retail this is 30-50% of annual revenue in 2-3 weeks.
Handling: adding regressors to Prophet / LightGBM — binary flags for each event + days before/after event.
Plan Reconciliation
System not only builds forecast but explains deviations:
Variance Analysis: plan vs. forecast vs. actual with decomposition by:
- Volume effect: sold more/less units
- Price effect: average check change
- Mix effect: shift to more/less marginal products
- Region/segment effect
Implemented via attribution: decompose difference into factors using Shapley values (analytical, not ML-SHAP).
Forecast Output to Planning
Integration:
- Anaplan / Adaptive Insights: API to load forecasts into rolling forecast
- SAP BPC (Business Planning and Consolidation): flat file or API
- Excel reports for CFO: automatic generation via openpyxl with charts
Reporting Automation: weekly PDF/PowerPoint with updated forecast, trend vs. budget, key changes vs. last week.
System Metrics:
- Forecast accuracy (MAPE for B2C): < 8% on quarterly horizon
- Pipeline accuracy (AUC for B2B): > 0.78
- Time to produce forecast: < 10 minutes (automatic)
Timeline: B2B pipeline AI scoring — 4-6 weeks. Complex system with hierarchical forecast, variance analysis and auto-reports — 3-4 months.







