Dynamics 365 FinOps Demand Forecasting with Azure Machine Learning

Hello Dynamics Community ! First of all happy new year for all of you & your family !

Let’s start 2020 with some new topic in D365 FinOps with Azure Machine Learning. Indeed, with the amount of transactionnal data in the System, I tend to show customers that data is a gold mine for the business to make the system smarter, and gather full stack of useful insights and predictive data.

For this article, we will talk about Demand Forecasting in the ERP as a good example !

Demand forecasting is used to predict independent demand from sales orders and dependent demand at any decoupling point for customer orders. The enhanced demand forecast reduction rules provide an ideal solution for mass customization.

To generate the baseline forecast, a summary of historical transactions is passed to a Microsoft Azure Machine Learning service that is hosted on Azure. Because this service isn't shared among users, it can easily be customized to meet industry-specific requirements. You can use Supply Chain Management to visualize the forecast, adjust the forecast, and view key performance indicators (KPIs) about forecast accuracy.

Key features of demand forecasting

Here are some of the main features of demand forecasting:

  • Generate a statistical baseline forecast that is based on historical data.

  • Use a dynamic set of forecast dimensions.

  • Visualize demand trends, confidence intervals, and adjustments of the forecast.

  • Authorize the adjusted forecast to be used in planning processes.

  • Remove outliers.

  • Create measurements of forecast accuracy.

Major themes in demand forecasting

Three major themes are implemented in demand forecasting:

  • Modularity – Demand forecasting is modular and easy to configure. You can turn the functionality on and off by changing the configuration key at Trade > Inventory forecast > Demand forecasting.

  • Reuse of the Microsoft stack – Microsoft launched the Machine Learning platform in February 2015. Machine Learning, which is now part of the Microsoft Cortana Analytics Suite, lets you quickly and easily create predictive analysis experiments, such as demand estimation experiments, by using algorithms R or Python programming languages and a simple drag-and-drop interface.

    • You can download the Demand forecasting experiments, change them to meet your business requirements, publish them as a web service on Azure, and use them to generate demand forecasts. The experiments are available for download if you've purchased a Supply Chain Management subscription for a production planner as enterprise level user.

    • You can download any of the currently available demand prediction experiments from the Cortana Analytics Gallery. Whereas the Demand forecasting experiments are automatically integrated with Supply Chain Management, customers and partners must handle the integration of experiments that they download from the Cortana Analytics Gallery. Therefore, experiments from the Cortana Analytics Gallery aren't as straightforward to use as the Finance and Operations Demand forecasting experiments. You must modify the code of the experiments so that they use the Finance and Operations application programming interface (API).

    • You can create your own experiments in Microsoft Azure Machine Learning Studio, publish them as services on Azure, and use them to generate demand forecasts.

    • If you don’t require high performance, or if you don't require that a large amount of data be processed, you can use the Machine Learning free tier. I recommend that you always start from this tier, especially during implementation and testing phases. If you require higher performance and additional storage, you can use the Machine Learning standard tier. This tier requires an Azure subscription and involves additional costs. For details about Machine Learning pricing, see Machine Learning Studio pricing.

  • Forecast reduction at any decoupling point – Demand forecasting in builds on this functionality, which lets you forecast both dependent and independent demand at any decoupling point.

Basic flow in demand forecasting

demand-forecasting-introduction.png

Demand forecast generation starts in Supply Chain Management. Historical transactional data from the Supply Chain Management transactional database is gathered and populates a staging table. This staging table is later fed to a Machine Learning service. By performing minimal customization, you can plug various data sources into the staging table. The data sources can include Microsoft Excel files, comma-separated value (CSV) files, and data from Microsoft Dynamics AX 2009 and Microsoft Dynamics AX 2012. Therefore, you can generate demand forecasts that consider historical data that is spread among multiple systems. However, the master data, such as item names and units of measure, must be the same across the various data sources.

If you use the Demand forecasting Machine Learning experiments, they look for a best fit among five time series forecasting methods to calculate a baseline forecast. The parameters for these forecasting methods are managed in Supply Chain Management.

The forecasts, historical data, and any changes that were made to the demand forecasts in previous iterations are then available in Supply Chain Management.

You can use Supply Chain Management to visualize and modify the baseline forecasts. Manual adjustments must be authorized before the forecasts can be used for planning.



So How to setup this feature ?

First of all, you will need an Azure Subscription

After that :

  1. Go to Azure AI Gallery : https://gallery.azure.ai/Experiment/Dynamics-Ax7-demand-forecasting-29

  2. Click on Open in Studio (classic)

forecasting.PNG

Copy the Expirement to your Azure Machine Learning Workspace like this :

capture.PNG

After that, you will need to do 3 things in this order :

  1. Save the Expirement

  2. Run the Expirement (it can take 5 minutes)

  3. Publish the Web Service

You can see here the Pipeline of the Demand Forecasting. Of course, you can also change some part of this pipeline before Publishing the Web Service. This is the standard AML Pipeline as is. If you don’t have any knowledge of AML I recommend to stay like this but you have to customize a little, I suggest you take a look on the EXECUTE R SCRIPT part on the middle.


AML.PNG

AML2.PNG

Now that you have your Web Service of AML deployed, you can go here to get your API KEY & API URL

AML3.PNG

Click on Request/Response for the URL

AML4.PNG

An example of these 2 parameters that you will need in D365 FinOps



FinOps1.PNG

Now go to your Dynamics 365 FinOps instance

You will have to go to the Master Planning Module. And in “Demand Forecasting Parameters”


FinOps2.PNG

Few setup to do…

Forecast Dimensions, Forecast unit dimension and Item allocation keys.


After that, you can go to the Azure Machine Learning Part and you can copy/paste your AML URL & API KEY like this :

FinOps4.PNG


You are done, you can now generate your “Demand Forecasting”

Finops5.PNG
FinOps6.PNG

Few parameters to setup…

Fill every forecast parameters based on your need.

ml23.png



And about 10 minutes later…

ml24.png

Now it’s executed successfully, we can view the forecast from Master planning \ Forecasting \ Demand forecasting \ Adjusted demand forecast.

ml25.png





For further articles, I will go deep dive to AML with D365 FinOps to do custom AML Pipeline for Sales/Purchase Data with the basics of AML (experiments, training model, cleaning data, select the good algorithm etc…)