Using Sentiment Analysis to Analyze Dynamics 365 data

Customer experience is as important as the product itself. Many companies use different software to collect customer feedback for their services/products. But what better way to do it than using Sentiment Analysis offered by Azure cognitive services with Microsoft Dynamics 365.  

Different ways of collecting feedback would be through emails which can be directly synced with Microsoft Dynamics 365, or by various forms and syncing the data to Dynamics 365 and running marketing campaigns on it, creating cases, or contacting the customer as per need. 

But all of this involves a lot of manual input and can be cumbersome if the amount of data is enormous. Keeping a check on all the data and providing an urgent response in case of any problem is challenging.

So, to avoid all this hassle and automate this process to some extent, we can take the help of the Microsoft Azure Text Analytics connector and Power Automate.  

We will run an example on how to analyze the data using Sentiment Analysis on the feedback provided by a customer. The sentiment analysis model will then evaluate the data on sentiment analysis score to provide us with accurate feedback. 

Using Sentimnt Analysis with Dynamics 365Use Case Scenario 

We will assume that the customer experience is recorded in the “description” field of the Microsoft Dynamics 365 “incident” entity (Case). This can be regarding an issue or feedback about the product/service that a company offers.

A custom field “sentiment” on the incident entity has already been created and added to the form. It would help to categorize the cases depending on the overall sentiment of the customer experience. The Dynamics 365 users can then prioritize the actions on these lists accordingly. 

You can also try the Sentiment Analysis with Microsoft Forms Pro to check the overall sentiment analysis score or general survey opinion. 

Optimize Customer Service with Dynamics 365: Explore Now

Learn More

Setting up Azure Congitive Services

Create a new Azure Cognitive Service Resource in the Azure portal and set up a new Text Analytics service under it. 

Azure Cognitive Service

Grab the Endpoint URL and keys as shown below and save them for later. They will be used to make connections in Power Automate. 

Sentiment Analysis

Regenerate Keys

Now go to Power Automate and set up the required connections: 

  1. Text Analytics 

Enter the Key 1 copied above into Account Key and Endpoint into Site URL 

Text Analytics

Account Key | text Analysis

2. Microsoft Dataverse 

image011

MICROSOFT DATAVERSE 

Setting up Sentiment Analysis Model 

Now let us create a new Automated cloud flow which will create sentiment analysis model automatically. 

Sentiment Analysis Model 

The “description” field in the Select Column will be used to trigger the flow in case of Modified (Update), and overall, the flow will be triggered on the Create of a new Case row.  

Any other field can be added in Select columns or keep it empty (depending upon the requirements). 

Analysis D365 Data

Next, choose Sentiment Analysis amongst the few other options available under the Text Analytics connector. 

choose Sentiment Analysis

Fill in the mandatory required fields. Here, Unique Identifier of Case is used as an ID and Description field as a text (on which we are running the Sentiment Analysis). Any OOB or Custom text field can be used for this purpose. 

OOB or Custom text field

Next, let us update the custom “sentiment” field with the output from Sentiment Analysis.

 custom 

Add the same Unique Identifier from the first step to the Row ID and choose Sentiment (Dynamic Content) for the sentiment field. 

Row ID and choose Sentiment

Row added, modified or deleted

Once done, save and test it! 

save and test it

Note: Apply to each is added automatically. 

Sentiment Analysis Scores 

Here are the test results after creating new cases with the following descriptions: 

creating new cases

The sentiment analysis score changed from neutral to positive when additional feedback was added to the first records description (description modified). 

testing sentiment analysis

Conclusion 

Sentiment Analysis can now be used in all fields, such as businesses, social media, politics, sports, finance, and E-commerce. Gauging opinion and using it to improve services was never easier than before. Apart from Sentiment Analysis, Azure cognitive services offer many other services, which can be used in combination to be more beneficial, e.g. Text, Vision, Speech, Language, etc. Since Natural language Processing (NLP) is a vast domain, some of the other provided functionality in Text Analytics API is Named Entity Recognition (NER), Key phrase extraction, Language Detection, Text Summarization and Sentiment Analysis.  

Let us know if you want us to write more about other features.