Public Preview: Microsoft Cognitive Services integration

 

Applies To: Dynamics 365 (online), Dynamics CRM Online

This section describes how to integrate Microsoft Cognitive Services with several Dynamics 365 (online) features, such as to make product recommendations and suggest knowledge articles.

Important

Azure DataMarket will be retired on March 31, 2017 and DataMarket APIs will no longer be supported with Microsoft Dynamics CRM Online 2016 Update 1. Customers with Microsoft Dynamics CRM Online 2016 Update 1 must migrate to the Cognitive Services Text Analytics and Recommendation APIs before this date to ensure no loss of service. To migrate services, follow these steps:

  1. Switch the Recommendation Service and Text Analytics Service connections to Cognitive APIs and reactivate. More information:  Getting started with Text Analytics APIs to detect sentiment, key phrases, topics and language and Upgrading to Version 2 of the Text Analytics API.

  2. Delete and re-create the existing product recommendation and topic models so that they use Cognitive Services. More information:  Public Preview: Create and manage models to make product recommendations and Create a topic model

  3. Once the Text Analytics connection is switched to Cognitive APIs, reactivate Knowledge search rules and similarity rules . More information:  Create similar record suggestion rules

Important

  • Cognitive Services integration with Dynamics 365 (online) is only available for instances in the United States (US) region.

  • A preview feature is a feature that is not complete, but is made available before it’s officially in a release so customers can get early access and provide feedback. Preview features aren’t meant for production use and may have limited or restricted functionality.

  • We expect changes to this feature, so you shouldn’t use it in production. Use it only in test and development environments.

  • Microsoft doesn't provide support for this preview feature. Microsoft Dynamics 365 Technical Support won’t be able to help you with issues or questions. Preview features aren't meant for production use and are subject to a separate supplemental terms of use.

  • We are making this preview available so that you can try it and let us know what you think. Your feedback will help us prioritize work to include the capabilities you need most. We ask that you give us your suggestions and report problems by using our publicly available feedback site:

In this topic

About Microsoft Cognitive Services

Set the text analytics connection

Set the recommendations connection

Create similar record suggestion rules

About Microsoft Cognitive Services

Microsoft Cognitive Services includes several APIs that leverage the power of machine learning. Some Microsoft Dynamics 365 features can use the Text Analytics APIs to detect sentiment, key phrases, topics, and language from the text found in your Microsoft Dynamics 365 data. Similarly, using the recommendation API, Microsoft Dynamics 365 can automatically make product recommendations to your users.

Set the text analytics connection

Microsoft Dynamics 365 features that use the Cognitive Services Text Analytics service for keyword matching, like Document Suggestions, similar cases, topic analysis, and knowledge article suggestions, require a Cognitive Services Text Analytics service connection. This connects Microsoft Dynamics 365 to the Cognitive Services Text Analytics service.

  1. Go to Settings > Administration > Azure Text Analytics Service Configuration.

  2. Review the information and click Continue.

  3. Next, fill in the connection information.

    Item

    Description

    Name (required)

    A logical name for the connection.

    Azure Service URL (required)

    The service URL for the Cognitive Services Text Analytics service.

    Azure Account Key (required)

    You will need to sign up for the Text Analytics API and obtain an API key. More information:  Signing up for Text Analytics API. A $0.00 account is available for trying out this feature.

    Description

    A description of the connection.

  4. Click Test Connection to validate your settings.

  5. Once the connection is successful, click Activate.

Set the recommendations connection

Microsoft Dynamics 365 features that use the Cognitive Services Recommendations service for recommendation modeling, like product recommendations, require an Cognitive Services Recommendations service connection. This connects Microsoft Dynamics 365 to the Cognitive Services Recommendations service.

Important

The Cognitive Services Recommendation API required for this feature will be removed as of February 15, 2018, which means this feature will no longer work after that date and cross-sell product recommendations based on an active recommendation model will return an error. We recommend that you deactivate existing active product recommendation models and use Product Relationships. More information:  Recommendations API and Define related products to increase chances of sales

  1. Click Settings > Administration > Azure Recommendation Service Configuration.

  2. After reading the disclaimer, click Continue.

Next, fill in the connection information and activate the connection to the Cognitive Services recommendation service.

  1. Fill in the connection information.

    Item

    Description

    Name (required)

    A logical name for the connection.

    Azure Service URL (required)

    The service URL for the Cognitive Services recommendation service.

    Azure Account Key

    You will need to sign up for the Recommendations API and obtain an API key. More information:  Quick start guide for the Cognitive Services Recommendations API. A $0.00 account is available for trying out this feature.

    Description

    A description of the connection.

  2. Click Test Connection to validate your settings.

  3. Once the connection is successful, click Activate.

  4. If this is your first recommendation model, click Activate. If you have other models to activate, select the checkbox and then click Activate.

Create similar record suggestion rules

Set up automatic suggestion of similar records by creating rules. The rules you create can use either Cognitive Services Text Analytics or some features let you use the built-in similarities matching engine in Microsoft Dynamics 365. Notice that you can only create one similar records suggestions rule for each entity type.

  1. Go to Settings > Data Management > Similar Records Suggestions Settings.

  2. Click New.

  3. Fill in the fields on the New Advanced Similarity Rule dialog.

    Item

    Description

    Name (required)

    The name of the topic model.

    Source Entity (required)

    The entity for which similar records are suggested. Select either Account, Case, Contact, Lead, Opportunity, or a custom entity that has an N:N relationship with one of the entities supported for similarity rules.

    Description

    A description of the similarity rule.

    Use Text Analytics for Target Match

    Default: No. Will use Microsoft Dynamics 365 for keyword matching.

    However, if you are using Cognitive Services Text Analytics, set this to Yes. More information:  Set the text analytics connection

    Filter Result by Status

    Filter records by status. For example, you can filter Lead records on Qualified while ignoring Open and Disqualified Lead records.

    Advanced Text Match Settings

    Maximum Number of Key Phrases (required)

    The maximum number of keywords or key phrases to be determined with text searches. Acceptable values are 0 to 1,000.

    Text Analytics similarity rule configuration

  4. Click Save.

  5. For opportunity similarity rules, notice that sample mappings are already added. To add a mapping, scroll down to Match Fields, and then click New (Add button).

  6. In the New Text Analytics page, enter values for the following fields. These values are used to determine the keywords or key phrases from source records using text analytics to match with target records using text search. This helps to achieve keyword-based similarity between source and target records.

    Item

    Description

    Criteria

    Exact match: only fields from the source entity are matched.

    Note

    By default, not all fields are enabled for exact matching. More information:  Enable a field for exact matching of similar records

    Text match: Text in these fields is used for finding key phrases to match. For example, if you select Case Title or Description, text in these fields will be matched.

    Entity

    Choose an entity to use in creating a text search rule to find matching records in Dynamics 365. The following entities are available: Activity, Case, Case Resolution, Email, Fax, Note.

    • Source entity, like Case and Note.

    • Activity and out-of-box activity entities like Email, Fax, Letter, Phone Call, and Appointment.

    • Any custom Activity entity related to the source entity.

    Field*

    Choose the field to use in creating a text search rule to find matching target records. The following types of fields are available: Option Set, Single Line of Text, Multiple Lines of Text.

    Two types of fields are used for similarity analysis:

    Structured fields: Used for exact match on a field to field basis. All fields except Multiple Lines of Text are available for exact match. Each field can be used only once.

    Text fields: Only fields of type Text or Option Set are available. For Option Set, the corresponding label in the language of the user is used. Text fields are used for fuzzy match in similarity analysis with keywords/key phrase extraction. Each field can be used only once.

  7. Click Save.

  8. Click Activate.

  9. Add more mappings to create a comprehensive search of related records.

Enable a field for exact matching of similar records

To enable a field for exact match, add the field in the Quick find view of the corresponding entity.

  1. Go to Settings > Customizations > Customize the System.

  2. Expand Entities, expand the entity that you want to enable exact matching, such as the Account entity, and then click Views.

  3. Click Quick Find Active Accounts, click More Actions, and then click Edit.

  4. Under Common Tasks, click Add Find Columns, and then select the field that you want to enable exact matching.

  5. Click OK, and then click Save and Close on the Quick Find Active Accounts page.

  6. Because adding a field to a view is a customization, you must publish the customization to enable exact matching for the field. To do this, in the left navigation pane click the entity, such as Account, and then click Publish. To publish all customizations, click Publish All Customizations.

Privacy notice

Text Analytics feature

By enabling the Text Analytics feature, you enable dependent features within Dynamics 365 that leverage the Azure Cognitive Services Text Analytics API to offer advanced insights. These dependent features are:

  • Knowledge suggestions

  • Case topic analysis

  • Similar cases suggestions

An administrator can enable the Text Analytics feature under Settings > Administration > System Settings > Preview tab in the Microsoft Dynamics 365 organization.

By enabling the Text Analytics feature, when you set up text analytics–based knowledge suggestions within Microsoft Dynamics 365, the case and its related entities’ data is sent to the Azure Text Analytics API to extract keywords/phrases. No data is stored with the Azure Text Analytics API. Only configured fields in the Knowledge Article configuration are sent to the Azure Text Analytics API to extract the terms. The administrator or customizer does have the option to deactivate the Knowledge Article Configuration to stop making API calls to the Azure Text Analytics API. Also, the customizer can stop using Text Analytics–based suggestions by switching back to Field-based suggestions in the Case Entity Form configuration.

By enabling the Text Analytics feature, when you set up case topic analysis within Microsoft Dynamics 365, the case and its related entities data is sent to the Azure Text Analytics API for topic determination. No data is stored with the Azure Text Analytics API. Only configured fields in the Topic Model Configuration are sent to the Azure Text Analytics API to extract the topics. The administrator or customizer does have the option to deactivate the Topic Model to stop making Azure Text Analytics API calls.

By enabling the Text Analytics feature, when you set up similar cases suggestions within Microsoft Dynamics 365, if the Advanced Text Analytics option is enabled in the Similarity Rule, then the case and its related entities’ data is sent to the Azure Text Analytics API to extract keywords and phrases. Only text fields configured in the Similarity Rule are sent to the Azure Text Analytics API. No data is stored with the Azure Text Analytics API. The administrator or customizer does have the option to deactivate the Similarity rule to stop making Azure Text Analytics API calls.

Azure components and services that are involved with Text Analytics–based features are detailed in the following sections.

Note: For more information about additional Azure service offerings, see the Microsoft Azure Trust Center.

Azure API App

The Azure API app triggers the Web jobs that read the data from the Dynamics 365 organization and send data to the Text Analytics API to do topic analysis. The Azure API App uses a Web job to do the actual data processing in the background and write the data output to Azure Blob Storage. The data is stored temporarily in Azure Blob Storage. Finally, data is deleted from Azure Storage once topic determination has been done.

Azure Scheduler

Azure Scheduler is used to trigger a Web job on a scheduled basis to perform topic analysis. Only the topic model build schedule is shared with the scheduler.

Azure Table

Azure Table is used for communicating the model version and organization context between the Azure API app and the Web job.

Azure Blob Storage

Web jobs temporarily store data in Azure Blob Storage and delete it once the Logic App pipeline has finished execution.

Azure Text Analytics API

The Azure Text Analytics API is sent data based on fields that are configured in active Knowledge Search fields or the Topic Model configuration or the Similarity Rule configuration. For example, case entity fields, such as title and description, plus the description field in related notes and activities, are configured in the Knowledge Search Field configuration.

Dynamics 365 Relevance Search

You can use Relevance Search, if it has been enabled by an administrator, to find similar records for cases. The text match fields and exact match fields used in the Similarity rule are used to invoke the Relevance Search API. Refer to the technical content for Dynamics 365 Relevance Search for data-handling details.

Product Recommendations feature

By enabling the Product Recommendations feature, when you build a recommendation model from within Microsoft Dynamics 365, the historical transaction data based on configured Basket Data entities and their filter will be sent to Azure and processed in Azure and stored temporarily in Azure Storage and finally sent to Azure Recommendations API to build the machine learning model. After the model has been built with Azure Recommendations API, data is deleted from Azure Storage. Note that only IDs (Account ID, Product ID, Transaction ID) are sent to Azure to build the recommendation model.

An administrator can enable the Product Recommendations feature under Settings > Administration > System Settings > Preview tab in the Microsoft Dynamics 365 organization. Data is sent to Azure Recommendations API only when a recommendation model is built. The system administrator does have the option to delete the existing model to delete data shared with the Azure Recommendations API. In addition, the system administrator can delete the connection to the Azure Recommendations API to stop building any recommendation models in the future.

Azure components and services that are involved with Product Recommendations are detailed in the following sections.

Note: For more information about additional Azure service offerings, see the Microsoft Azure Trust Center.

Azure Logic Apps

This provides the orchestrated data pipeline to synchronize product catalog and transaction data with the Recommendations API to build the recommendation model version. This pipeline executes as a multi-tenanted service with multiple API apps for communication between a Dynamics 365 organization and the Recommendations API. Logic apps are triggered from Dynamics 365 with minimal context, such as Model Version ID and the Dynamics 365 organization URL.

Azure API Apps

These are the web applications that trigger the Web jobs that read the data from the Dynamics 365 organization and send data to the Recommendations API to build the recommendation model. There are 3 API apps and corresponding Web jobs - one for reading product data, one for reading transaction data, and one for building a recommendation model. API apps use a Web job to do the actual data processing in the background and write the data output to Azure Blob Storage. The data is stored temporarily in Azure Blob Storage. Finally, data is deleted from Azure Storage once the model has been built.

Azure Table

Azure Table is used for communicating the model version and organization context between the API app and a Web job.

Azure Blob Storage

Data is stored temporarily in Azure Blob Storage by Web jobs and deleted once the Logic App pipeline has finished execution.

Azure Recommendations API

The Azure Recommendations API is sent with minimal data Product IDs, Transaction IDs, and Account IDs to build the recommendation model. Data is stored with the Recommendations API service until a corresponding model version exists.

See Also

Public Preview: Create and manage models to make product recommendations
Public Preview: Automatically suggest knowledge articles
Public Preview: Topic analysis
Public Preview: Suggest similar cases for a case
Enable document suggestions

© 2017 Microsoft. All rights reserved. Copyright