The following guide will help you set up D365 Demand Forecasting with Azure Machine Learning.

We will go through the following steps:

  1. Deploying Azure Resources
  2. Using Azure Machine Learning Studio
  3. Connecting D365 with Azure Machine Learning Studio

Deploying Azure Resources

In this step, we will deploy Azure resources for two aspects. First, the resources function as a usage and accounting monitor. Second, you can define where (in which datacenter) the resources are located. In principle, this step is not mandatory: you can use MS-managed resources but then you do not have control over the datacenter location storing your data. Hence, in this step we show how to create resources you can manage yourself.

The Azure resource is called “Machine Learning Workspace” (more information).

Setting up the Machine Learning Studio Workspace

Creating an app in Microsoft Azure

Click “Get it now” > “Continue”. After you log in, you are redirected to the Azure resource creation panel.

How to use the Azure resource creation panel

 You will find more details about the available pricing schemas here

Azure Web Service Plan Pricing

Finish by clicking "Create". After a short time, the required resources show up in the resource group you selected / created.

Azure Machine Learning Studio Workspace

Using Azure Machine Learning Studio

In this step, we will use the predefined Azure Machine Learning Studio experiment, deploy it to our workspace and create a web service endpoint which is accessible from outside.
First go to the Azure AI Gallery.

Azure AI Gallery

Select “Open in Studio (classic)”. You will be asked in which workspace you want the experiment to be deployed. It should show something like the following:

Using Azure Machine Learning Studio

Now, if you skipped the first step (you did not deploy the Azure Machine Learning Workspace resource), then this would be your option to select. If you deployed the corresponding resource in the previous step, select the region (datacenter location) and the workspace you created earlier.

How to use Azure Machine Learning Studio

Finish by hitting the check button. Within the Azure ML Studio you should find something similar to the following screenshot.

Microsoft Azure ML Studio

Check that you are using the right workspace in the upper right corner. Then, under experiments (left menu bar), you should find one experiment with the name “Dynamics ax7 – demand forecasting” in the status “Draft”. Open the experiment by clicking on it. Now the experiment opens and should look like the following.

Microsoft Azure Machine Learning Studio How to

Execute the experiment once by clicking “Run” in the menu bar on the bottom. This should be done in a few seconds and all the blocks in the image receive a green checkmark. Then click “Deploy Web Service” on the bottom menu. Two options open, select “Deploy Web Service [Classic]” as shown in the following screenshot.

Microsoft Dynamics Machine Learning Studio setup

You are directed to a page which shows some information on the handling of the web endpoint (see the following screenshot).

Demand forecasting with Microsoft Dynamics Machine Learning

Then click “Test preview” and you will be redirected to a different page which gives a lot of web endpoint management options.

Demand forecasting wth Microsoft Dynamics Ax7

Under “Dashboard” you find different monitoring information. It is worthwhile to browse through the different menu items on this page and see the options. Finally, go to “Consume” and find the API key and the request endpoints.

Microsoft Azure Machine Learning Studio Dashboard

Connecting D365 With Azure Machine Learning Studio

Within your D365 environment, go to “Master Planning” > “Setup” > “Demand Forecasting” > “Demand Forecasting Parameters” and in the form click on “Azure Machine Learning”.

In this form, type in the API Key into the “Web Service API Key”-Field. For the Web service endpoint address take the Batch-Requests URL and modify slightly by just taking the characters up to the last “/”. In our case it would be the following (modify according to your settings):

Enter this URL in the Web service endpoint address.

How to connect D365 with Azure Machine Learning Studio

The storage account is used to store logging data about the usage of the web endpoint. If you wish to do so, go to Azure and fetch the storage account name and key from the account you created earlier within the Azure Machine Learning Workspace resource. For now, you do not need the storage account. Click “Save” and you are ready to create your first baseline forecast.

Questions? Suggestions? Get in touch with our expert!