Use machine-learning models

Completed

The built-in prediction capabilities of Customer Insights - Data help provide organizations with a starting point to creating predictions based on their data. However, as with many predefined options, they might not represent how your organization makes predictions. For example, your organization might want to predict something other than customer churn. Even in scenarios where you want to predict potential customer churn, your organization might structure their subscriptions differently than what is provided in the out-of-the-box churn model, or you might take different factors into consideration when deciding if a customer is going to churn.

Many organizations might already have created machine-learning models that are making predictions, or some might want to create a model that could be used in Customer Insights - Data. Customer Insights - Data supports using custom models and managing workflows based on Azure Machine Learning models in the application. Workflows help you identify the data that you want to generate and map the results to your Customer Insights data.

Dynamics 365 Customer Insights – Data supports the following custom models:

  • Azure Machine Learning V2: Allows you to import your Azure Machine Learning model to make predictions on your customer data.

  • Allows you to import your Azure Synapse model to make predictions on your customer data.

Responsible AI

Predictions offer capabilities to create better customer experiences, improve business capabilities, and revenue streams. AI results can have a real bearing on peoples lives. It's important you keep this in mind the more you use AI in your solutions. Responsible AI is the practice or designing, developing, and deploying AI with good intentions to empower employees and businesses. It includes fairly impacting customers and society an allowing companies to build trust and scale AI confidently.

We highly recommend you balance the value of your prediction against the effect it has on biases and might be introduced in an ethical manner. You can learn more about different techniques and processes for responsible machine learning here: Responsible Azure Machine Learning .

Machine learning concepts

Before we dive into creating different machine-learning modules, let’s examine a few key concepts and terminology.

  • Workspace: Workspaces are centralized places to manage resources for training and deployment of models, and store assets you create when you use Azure Machine Learning.

  • Computes: Computes are any machine or set of machines you use to run your training script or host your service deployment.

  • Datasets and datastores: Make it easier to access and work with your data. By creating a dataset, you create a reference to the data source location along with a copy of its metadata.

  • Environments: Where training or scoring of your machine-learning model happens. The environment specifies the Python packages, environment variables, and software settings around your training and scoring scripts.

  • Experiments: A grouping of many runs from a specified script.

  • Models: Pieces of code that takes an input and produces output. Creating a machine-learning model involves selecting an algorithm, providing it with data, and tuning hyperparameters.

Azure Machine Learning studio

Azure Machine Learning is a cloud service for accelerating and managing the machine-learning project lifecycle. Machine learning professionals, data scientists, and engineers can use it in their day-to-day workflows. Custom models created in Azure Machine Learning can be easily imported and used in Dynamics 365 Customer Insights - Data.

To get started using models, you'll need to:

  1. Set up Azure Machine Learning workspace: Workspaces can be created and Accessed in Azure Machine Learning studio.

  2. Create a batch pipeline with Azure Machine Learning designer: Azure Machine Learning designer provides a visual canvas where you can drag and drop datasets and modules. A batch pipeline created from the designer can be integrated into Customer Insights - Data if they're configured accordingly.

  3. Import pipeline into Customer Insights - Data: The designer provides the Export Data module that allows the output of a pipeline to be exported to Azure storage. Currently, the module must use the datastore type Azure Blob Storage and parameterize the Datastore and relative Path. Customer Insights - Data overrides both these parameters during pipeline execution with a datastore and path that is accessible to the product.

Azure Machine Learning Resources

Add a workflow for a custom model

After a custom model is created, it's added as a workflow in Customer Insights - Data. The workflow will send data from Customer Insights - Data to your Azure Machine Learning model and will then bring the results back into Customer Insights - Data. After the workflow is configured and the model is being used, you can use the model to create items like customer segments that can be used by other applications.

Custom models can be created by going to Intelligence, selecting Customer Models, and then selecting the New Workflow button.

The process to configure a workflow consists of three steps:

  • Provide workflow details.

  • Select the data to send.

  • Relate the results to customer data.

The first step is to define the necessary workflow details. The three items that you need to define are:

  • Name - Defines the name of the object in Customer Insights - Data.

  • Tenant - Specifies the Azure Machine Learning tenant where the web service that contains your model is deployed.

  • Web Service - Specifies the web service that your model is deployed to.

    Screenshot of the Workflow details step where you specify the name, tenant, and web service.

For the machine-learning model to provide you with results, Customer Insights - Data need to know what data to send to the model as inputs. The number of inputs vary depending on the model that you're working with. For each web service input that is listed, you'll need to supply a matching entity. The following example shows that the web service needs three inputs.

Screenshot of the Select data to send step where you specify entities to send to the web service as inputs.

Important

An entity will only be present in Customer Insights - Data if it has been ingested into the application. Before you create the workflow, make sure that any datasets that will be used as inputs have been ingested into the application.

The last step in the process is to select the field in your customer entity that represents the Customer ID. This field will be used to match the results back to the appropriate customer in the application.

Screenshot of the Relate results to customer data step where you specify the field to use as the Customer ID in the Customer entity.