Preview feature: Microsoft Cognitive Services integration
Applies to Dynamics 365 (online), version 9.x
This section describes how to integrate Microsoft Cognitive Services with Dynamics 365 (online) features, such as similar cases and suggest knowledge articles.
- 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.
- 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:
About Microsoft Cognitive Services
Microsoft Cognitive Services includes several APIs that leverage the power of machine learning. Some Dynamics 365 features can use the Text Analytics APIs to detect sentiment, key phrases, topics, and language from the text found in your Dynamics 365 data.
Set the text analytics connection
Dynamics 365 features that use the Cognitive Services Text Analytics service for keyword matching, like Document Suggestions, similar cases, and knowledge article suggestions, require a Cognitive Services Text Analytics service connection. This connects Dynamics 365 to the Cognitive Services Text Analytics service.
Go to Settings > Administration > Azure Text Analytics Service Configuration.
Review the information and click Continue.
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.
Click Test Connection to validate your settings.
Once the connection is successful, 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 Dynamics 365. Notice that you can only create one similar records suggestions rule for each entity type.
Go to Settings > Data Management > Similar Records Suggestions Settings.
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 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.
For opportunity similarity rules, notice that sample mappings are already added. To add a mapping, scroll down to Match Fields, and then click New ().
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.
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.
Go to Settings > Customizations > Customize the System.
Expand Entities, expand the entity that you want to enable exact matching, such as the Account entity, and then click Views.
Click Quick Find Active Accounts, click More Actions, and then click Edit.
Under Common Tasks, click Add Find Columns, and then select the field that you want to enable exact matching.
Click OK, and then click Save and Close on the Quick Find Active Accounts page.
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.
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:
Case topic analysis
Similar cases suggestions
An administrator can enable the Text Analytics feature under Settings > Administration > System Settings > Preview tab in the Dynamics 365 organization.
By enabling the Text Analytics feature, when you set up text analytics–based knowledge suggestions within 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 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 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.
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 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 is used for communicating the model version and organization context between the Azure API app and the Web job.
Web jobs temporarily store data in Azure Blob Storage and delete it once the Logic App pipeline has finished execution.
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.