Extending Dynamics 365 Customer Insights with Azure ML-based custom models

AI-enabled Dynamics 365 Customer Insights helps unifying data from multiple sources within an organization and generates a single, end-to-end view of the customer. This 360-degree customer view can be used to discover insights to optimize customer engagement and drive personalized customer experiences.

This unified data is an ideal source to build machine learning (ML) models that can generate additional business insights. Customer Insights provides seamless integration with Azure ML (AML) to bring your own custom models to work on this integrated data. In this blog, we will share a step-by-step guide on how to do that.

As a prerequisite to following these steps, you need to have an active Azure subscription.

Get started: Export data from Dynamics 365 Customer Insights to Azure blob storage

  1. To access data in AML Studio, export the data from Customer Insights by opening Admin > Export destinations.Navigation item for export destinations
  2.  A screen is presented with the option to “Add destination” for the export on the top bar.Customer Insights Data Export Add Destinations
  3.  Select Add destination, and in the dialogue, select the type.
    Customer Insights Add Destination Options
  4.  Select the type, and provide the account details in the dialog. (For this scenario, we will use Azure Blob storage.)Export Destinations Blob Setup
  5. After entering the details, select Next to see list of entities that are available for export. This will also include the system-generated entities and custom measures. Select individual entities or all of the entities for export.
    Export Destinations Select Entities
  6. Select Save to finish the export setup.

Set up AML Studio

  1. In order to setup the AML Studio, visit www.portal.azure.com, and sign in with your credentials.
  2. Select the option + Create a resource at the top of the left navigation.Azure Portal New Resource
  3. Search the marketplace for “machine learning studio” in the search bar, and select Machine Learning Studio Workspace from the suggested results.Azure Machine Learning Studio
  4. On the Machine Learning Studio Workspace, select Create.Azure Machine Learning Studio Workspace

  5. Enter the required details to create the resource. Select the Web service plan pricing tier based on the size of data you will be importing from Customer Insights. For best performance, select the Location that is geographically closest to you.Azure ML Studio Workspace Setup
  6. After creating the resource, the Machine Learing Studio workspace dashboard appears.Azure ML Studio Dashboard
  7. Select Launch Machine Learning Studio to open the AML studio user interface.

Work with AML Studio

You can now create an new experiment from scratch, or you can import an existing experiment from the gallery. As part of Customer Insights, Microsoft provides experiments for three standard scenarios:

  1. Churn prediction
  2. Product recommendation
  3. Customer lifetime value

These experiments can be imported from the gallery. Below is a screenshot of the AML Studio when launched for the first time.

Azure ML Create New Experiment

Whether creating a brand new experiment or using an experiment template from the gallery, you will need to import the Customer Insights data that is exported to blob storage into the AML Studio experiment. AML Studio provides standard import blocks for this purpose and the image below is a snapshot of customizing the import block. Use the wizard or directly provide the location and credentials of the Azure blob storage with your Customer Insights data. Once this is set up, the data from Customer Insights will be accessible in the AML Studio experiment.

Azure ML Studio Canvas

After importing the data, a data scientist can build a custom processing pipeline in AML Studio for cleaning the data, extracting features, and training a suitable model. The model performance can be evaluated and optimized. Once a model is ready, a Predictive Web Service can be automatically created from the training experiment.

Azure ML Studio Setup Webservice

This option imports the trained model and the featurization pipeline from the training experiment to a predictive service, which can take another set of input data with same schema as used in the training experiment to make the predictions.

Once the predictive web service experiment is successful, it can be deployed for auto scheduling. The following figure shows this option. In order for the deployed web service to work with Customer Insights, please choose the Deploy Web Service [New] Preview option. For more details, see Deploy an Azure Machine Learning Studio web service.

Azure ML Studio Deploy Webservice

Integrating Dynamics 365 Customer Insights

In order to make these predictions available in Customer Insights, you need to export these predictions along with the customer IDs to the same blob location, and then Customer Insights can import it. The predictive web service can be scheduled to run at predetermined intervals to auto update the scores. To find more information about managing the deployed web service, see Manage a web service using the Azure Machine Learning Studio Web Services portal. The updated scores can then automatically show up in the Customer Insights’ dashboards. We are working on making the integration with AML web service a part of the Customer Insights app itself, and we will update when the feature is publicly available.

More information

Read our Team blog to stay up-to-date with the latest features and ongoing innovation.

Engage with us on our Community site and provide ideas and feedback on product here.