Predictive sales and stock planning with Azure Machine Learning

A Geneva pharma distributor reduced stockouts by 70% with demand forecasting models.

By houle Team

Published on 11/16/2025

Reading time: 4 min (778 words)

The Sales Forecasting Challenge

A Geneva distribution company specializing in premium household equipment for the Swiss market managed a catalog of 2,500 references sold to 300 independent retailers. Demand forecasting was based on sales managers' experience and simple historical trends, leading to recurring stock problems: frequent stockouts on trendy products and excess inventory on declining items.

The company bore significant costs: rush transport to compensate for stockouts, storage costs for slow-moving products, and regular end-of-season discounts to clear excess inventory. Management estimated these inefficiencies cost approximately 15% of annual turnover, about 2.5 million CHF.

The sales and logistics team sought a more reliable forecasting solution to optimize inventory while maintaining high product availability for retailers.

The Predictive Analytics Solution

We developed a sales forecasting system using Azure Machine Learning, Power BI, and Azure Synapse Analytics. The solution combines multiple data sources to generate accurate predictions at product and week levels.

The architecture starts with centralizing data in Azure Synapse Analytics. We consolidated historical sales from the ERP (seven years of data), website traffic and search trends, seasonal event calendars (holidays, trade shows, promotional campaigns), economic indicators (consumer confidence index, CHF exchange rate), weather data (temperature, precipitation), and retailer data (size, region, customer segment).

We then developed several predictive models with Azure Machine Learning. A baseline model based on SARIMA (Seasonal AutoRegressive Integrated Moving Average) captures seasonal trends and cycles. A gradient boosting model (LightGBM) identifies complex non-linear relationships between variables. A neural network model (LSTM) processes temporal sequences to detect emerging trends. An ensemble model combines predictions from the three models weighted by their respective reliability.

Models are trained weekly on updated data and automatically tested on a sliding validation period. Model performance (RMSE, MAPE, forecast bias) is tracked in Power BI dashboards accessible to sales and logistics teams.

Predictions are generated for each product for the next 12 weeks with confidence intervals. These forecasts are automatically injected into the ERP to guide purchasing and production. Alerts are generated when actual sales deviate significantly from predictions, signaling potential market anomalies.

Measured Impacts

After eighteen months of production use, results are impressive. Forecast accuracy (MAPE) improved from 35% with previous manual methods to 12% with the AI system, a 66% error reduction. Stockout rate dropped from 8% to 2%, significantly improving retailer satisfaction. Excess inventory decreased by 45%, freeing up approximately 1.2 million CHF in working capital.

Transport costs fell 20% due to better order anticipation and less rush shipping. End-of-season markdowns decreased by 30% thanks to more appropriate purchasing.

Operationally, sales managers now spend 70% less time on forecasting and can focus on retailer relationships and new product development. Buyers have more confidence in their purchasing decisions, backed by data rather than intuition alone.

Financially, the overall benefit is estimated at 1.8 million CHF annually, while the solution's total cost (Azure infrastructure, licenses, development, and support) represents about 180,000 CHF per year, providing a tenfold return on investment.

Learning and Adaptation

An important aspect of the solution is its continuous learning capability. Each week, models are automatically retrained with updated data, allowing them to adapt to market changes. For example, the system successfully detected and adapted to behavioral changes during the COVID-19 pandemic without manual intervention.

We also implemented an explainability mechanism using SHAP (SHapley Additive exPlanations) values that allows sales managers to understand which factors influence each prediction: seasonality, promotion effect, weather trend, or emerging fashion. This transparency builds confidence and enables targeted corrective actions.

The system also identifies systematically mispredicted products, signaling potential data quality issues or specific market dynamics requiring human analysis.

Architecture and Governance

The technical infrastructure is entirely hosted on Azure in the Switzerland North region. Azure Synapse Analytics serves as the central data warehouse with automated daily ETL pipelines. Azure Machine Learning manages the complete ML lifecycle: experimentation, training, deployment, and monitoring.

Models are deployed as managed endpoints with autoscaling based on demand. A CI/CD pipeline with Azure DevOps automatically deploys model improvements after validation. All predictions are versioned and archived for audit.

Power BI provides multiple views: strategic dashboard for management with global KPIs, operational dashboard for buyers with product-level predictions, and analytical dashboard for data scientists with model performance and explainability.

Data governance is ensured by Azure Purview which tracks all data flows and transformations. Access is strictly controlled by Azure AD roles based on the principle of least privilege.

Conclusion

This solution demonstrates that predictive AI has direct, measurable value for traditional companies. By transforming the art of forecasting into data-driven science, we've enabled a mid-sized company to compete with much larger players who have more sophisticated analytical capabilities.

Secure Management of Confidential Emails with Private AI on Outlook: Compliance and Productivity for Swiss Companies

Discover how companies can protect the confidentiality of sensitive exchanges through the integration of private AI add-ins for Outlook, perfectly tailored to the Swiss and European regulatory context. Focus on solutions to enhance email security, automate their classification, and optimize compliance with nFADP and GDPR.

Questions about this article?

Our experts are here to help you understand the details and implications for your business. Get personalized advice tailored to your situation.