Use custom models from Azure Machine Learning


On September 1, 2023, we merged and renamed Dynamics 365 Marketing and Dynamics 365 Customer Insights. Dynamics 365 Marketing is now called Dynamics 365 Customer Insights - Journeys. Dynamics 365 Customer Insights is now called Dynamics 365 Customer Insights - Data. For more information, see Dynamics 365 Customer Insights FAQs.

Workflows in Dynamics 365 Customer Insights - Data help you choose the data you want to generate insights from and map the results to your unified customer data. Your workflows can include custom models enhanced with artificial intelligence (AI) that you create in Azure Machine Learning.



Support for Machine Learning Studio (classic) will end on August 31, 2024. We recommend you transition to Azure Machine Learning by that date. You can no longer create new Machine Learning Studio (classic) resources, but you can continue to use your existing resources through August 31, 2024.

Custom models in Customer Insights - Data don't support data sources that are updated with incremental refresh.

Data is transferred between your Customer Insights - Data environment and the selected Azure web services or pipelines in the workflow. When you transfer data to an Azure service, make sure the service is configured to process data in the manner and location necessary to comply with any legal or regulatory requirements.

Set up an Azure Machine Learning connection

  1. In Customer Insights - Data, go to Settings > Connections.

  2. Scroll to Miscellaneous connections.

  3. Select Set up on the Azure Machine Learning tile.

  4. Enter connection information:

    • Display name: Enter a unique, recognizable name that describes the connection. It must start with a letter and contain only letters, numbers, and underscores.
    • Tenant: Enter the tenant that's linked to your Azure Machine Learning workspace. Sign in if prompted.
    • Workspace: Enter the Azure Machine Learning workspace.

    Screenshot of the Azure Machine Learning connection page.

  5. Review the data privacy and compliance information and select I agree.

  6. Select Save.

Add a new workflow

  1. Go to Insights > Predictions.

  2. On the Create tab, select Use this model on the Custom model (Azure Machine Learning v2) tile.

  3. Select the information about the connection:

    • Connection: Select a connection to your Azure Machine Learning workspace or select Add connection to set up a new one.
    • Pipeline: Select a pipeline that's linked to your Azure Machine Learning workspace.
    • Output Path: Select the output path that's linked to your pipeline.
    • Output Datastore: Select the output datastore that's linked to your pipeline.
  4. Select Get started.

  5. In the Model name step, enter or select the following information:

    • Name: A recognizable name for the model.
    • Output table name: An output table name for the pipeline output results.
    • Primary key: The attribute you want as the primary key for your output table.
    • Customer ID: The matching attribute that corresponds to the unified customer ID.

    Screenshot of the Custom model Azure Machine Learning Model name page.

  6. Select Next.

  7. In the Required data step, select Add data.

  8. Add the data to use for your custom model. Map all the attributes in the data and select Save.

    You can save and come back to this step, but you can't run the model unless you map all the attributes. You can't add optional attributes. To edit the attributes, change them in your Azure Machine Learning workspace.

  9. Select Next.

  10. In the Review and run step, review the model details and make changes if necessary.

  11. Select Save and run.

Manage a workflow

  1. Go to Insights > Predictions and select the My predictions tab.

  2. Select the vertical ellipsis () next to a model to view the actions you can take.

    • Edit a workflow to change the model configuration or the connection.
    • Refresh a workflow on demand. The workflow also runs automatically with every scheduled refresh.
    • Delete a workflow. The table that was used to create the workflow isn't deleted.

View the results

Results from a workflow are stored in the Output table name you defined. View it from the Data > Tables page or with API access.

API Access

To get data from a custom model table, use the following OData query:<your instance id>/data/<custom model output table name>%3Ffilter%3DCustomerId%20eq%20'<guid value>'

  1. Replace <your instance id> with the ID of your Customer Insights environment, as shown in your browser's address bar.

  2. Replace <custom model output table> with the table name you provided during the Model name step.

  3. Replace <guid value> with the Customer ID of the customer you want to see, as shown in the CustomerID field on the customer profiles page.