How to improve business efficiency with machine learning? Sales forecasting example

Sales forecasting is the process of estimating future sales based on all available data on past and current transactions.

Knowing about the future demand can help optimize many company processes. In this article, I will focus on applications for the restaurant and hospitality industries.

However, you don’t need to be in this vertical to take advantage of machine learning. The topic and mechanisms can be used in any business wishing to optimize its sales processes and take advantage of new opportunities.

Key points

  • Why is sales forecasting important?
  • Business case of sales forecasting in restaurants.
  • Recommended Azure architecture for sales forecasting.
  • How to start a sales forecasting project and what are the key steps?

Why forecasting sales results is on the rise

There are several reasons for the growing popularity of using data to predict sales results. Here are the key ones.


The future is unclear. COVID-19 has changed lots of economic factors. As a result, forecasting based on managers’ knowledge and intuition has stopped working.

Social factors

There have been many changes in the behavior of restaurant customers as a result of recent lockdowns and restrictions. Those who can understand and adapt to these changes can avoid being pushed out of the market and in some cases, significantly increase their business.


Cloud-based technology has reduced the entry cost to machine learning solutions. Companies no longer need to invest in hardware and can easily scale computing power. Additionally, services such as Azure Machine Learning and Azure Databricks simplified the process of building Machine Learning (ML) solutions.

Those are the reasons why restaurant chain management companies who are dissatisfied with the effectiveness of traditional planning based on the intuition of managers are looking for solutions that help them better predict and understand the coming future.

Important requirements are that solution should be developed fast (within weeks, not months) and without hardware investments.

Sales Forecasting based on cloud ML services meets these expectations.

Want more updates like this? Leave your email address to get the latest insights every two weeks to your inbox. Subscribe

Use cases for sales forecasting

Why is it worth predicting future sales at all? How can we monetize this knowledge?

The forecasting process can influence almost every important decision in the restaurant business.

Below are some typical use examples of using this knowledge.

Inventory preparation

You can order or prepare a more accurate volume of products (the right items are delivered in the right quantities and to the right location). It reduces losses related to storing excess products and food waste. At the same time, it increases the availability of the expected products, which increases customer satisfaction.

Staff scheduling

Sales volume is strongly correlated with the necessary level of employment. By smart employee scheduling, you can optimize one of the biggest expenses for a restaurant, i.e. labor costs.

Sales optimization

“If you can’t measure it, you can’t improve it” – but apart from measuring, we also need a baseline. Sales forecasting is a great baseline that can be treated as a starting point for optimization activities.

Expansion planning

Data may indicate exhausting the current restaurant chain capacity, indicating a need for expansion. You can use this information to make informed decisions when planning to open a new restaurant in a region.

Marketing campaigns

You can optimize marketing campaigns based on your sales forecast and the performance of historical activities.

Revenue forecasting

Helps to set price points and plan the development of restaurants (like renovation).

Solution architecture

Here is a high-level architecture of a typical sales forecasting solution. It can be adapted depending on the individual business needs.

Sales forecasting solution architecture in Azure

Sales forecasting solution architecture in Azure (click to view full-size)

The process works as follows:

1. Bring together all your necessary structured, unstructured, and semi-structured data (logs, files, and media) using Azure Data Factory

2. Store data in Azure Data Lake Storage

3. Databricks analytical platform ingests data from the Data Lake. Data scientists use this data for:

  • Data exploration
  • Data preparation
  • Model designing
  • Model training
  • Model evaluation

4. Trained models are deployed as an API service to Azure Kubernetes Service (AKS), using Azure Machine Learning APIs to containerize and deploy the model’s API.

5. SQL Database stores historical data and prediction results for analytical reporting.

6. Business users query and report on data in Power BI.

How do sales forecasts work?

Sales forecasting is an example of time series forecasting, which is one of the most important topics in data science.

Everybody wants to be able to predict the future and make better decisions based on this knowledge. It is not surprising then that the topic is widely researched and has a lot of good scientific publications.

Below are the most popular approaches used in time series forecasts:

  • Time series regression models
  • Time series decomposition
  • Exponential smoothing
  • ARIMA models (including very popular SARIMAX)
  • Hierarchical or grouped time series
  • Bootstrapping and bagging time series
  • Deep learning model (including especially LSTM model)

Because every data set is different, it is difficult to recommend one particular approach. In practice, I recommend checking many models and using the one that gives the best results in your case. There is no one universal algorithm that is best for every situation.

How to create a sales forecast and what are the key steps?

Here is a short guide to getting started with sales forecasting.

Goal definition

First, you should define the objective in business terms. Think about how you want to use the newly acquired knowledge about future sales. How can it improve your business?

Answering these questions will help you better define the problem and create an optimal solution.

Data collection and preparation

Next, you should collect all the available data that has predictive power (i.e. can affect future sales).

Data that you can use for prediction in restaurants include:

  • Historical sales
  • Historical and planning marketing actions
  • Demographic data
  • Calendar events (weekends, holidays, etc.)
  • Weather (historical and predicted)
  • Industry-wide comparisons
  • Economic factors
  • Social media trends.

Model definition

Once you have a well-defined business goal and collected data, you can follow the machine learning project process:

  • Feature engineering
  • Machine Learning modeling
  • Data visualization
  • Operationalization (model deployment, serving, monitoring, maintenance).

Data visualization in Power BI

A good practice is to present the model’s accuracy and predicted values as a set of reports. Here are some examples from one of our recent projects.

Example report to analyze volume sales using Power BI AI features and find interesting insights.

Example report to analyze volume sales using Power BI AI features and find interesting insights.

You can use Power BI to present summaries of reported data, highlighting the important findings.

Example report to review and compare model results for different time periods. It features tools for data scientists to optimize model performance.

Example report to review and compare model results for different time periods. It features tools for data scientists to optimize model performance.

You can set up reports comparing predicted and actual data to see how accurate sales forecasts are and verify if the model needs adjustment.

Example report to check the sales forecast for the next 365 days. Tools for a restaurant manager.

Example report to check the sales forecast for the next 365 days. Tools for a restaurant manager.

This report was created with business users in mind, to help them plan for the future.

What next?

Sales forecasts are the first step in the optimization journey. When you can predict the future based on given parameters, you have great tools for what-if-analysis and process optimization (finding parameters that will result in the highest sales).

But knowing the future is only valuable when you use it correctly. If you’d like to discuss this further, get some advice, or see more examples of predictive analytics in action, get in touch today.

Key takeaways

  1. Now is a great time for sales forecasts because of economic, social, and technological reasons.
  2. Sales forecasting can influence almost every important decision in the restaurant business.
  3. Azure has great functionalities for quickly and efficiently creating a forecasting model.
  4. A sales forecast is a starting point for what-if-analysis and process optimization.

Sign up for Predica Newsletter

A weekly, ad-free newsletter that helps cutomer stay in the know. Take a look.


Want more updates like this? Join thousands of specialists who already follow our newsletter.

Stay up to date with the latest cloud insights from our CTO