Welcome to the final post of this Dynamics CRM meets Machine Learning series where we have been discussing about using Machine Learning (ML) to interpret customer happiness by using certain cues and behaviour points based on Dynamics CRM data. If you have been following all along, you might notice that now the only remaining piece of this jigsaw puzzle is the usage of the ML insights i.e. the score of the email, inside Dynamics CRM.
We have already seen the ML engine and how CRM can connect to the ML web service that calculates the score of the email based on its content. Now we will focus on how to show the Happiness Index on the Contact record that will tell us about the level of satisfaction of a customer when we open their record.
Dynamics CRM customisations
We will be adding the following fields into CRM
|sentiment||This field will store the sentiment calculated by the Online Azure Machine Learning Web Service. Its value will either be 0 – Unhappy email or 4- Happy email|
|Contact||Total Emails||Total emails received from this contact|
|Average Sentiment Score||Average ML sentiment score based on all emails|
|Happiness Index||If more than 2 emails have been received then average sentiment score, otherwise 2|
I have used rollup and calculated fields that rollup the sentiment score from emails over to the contact record.
Displaying Happiness Index
The happiness index is shown on the Contact form and an emoticon is displayed based on the score e.g. in the example below the Index score is 2.4 which is on the happier side, so a happy face is shown. The below screen also shows various emails based on which the score for Jim Glynn was calculated by the ML web service.
Now let us look at a slightly unhappy customer Patrick Sands. You can look at his emails on the right to determine why is he unhappy. The scores in the Sentiment column have purely been calculated by the ML web service.
Script to show emoticons
I think these graphics look cool and add a face value to your customers. If you are curious to know more about how I displayed them, below is the script. Basically there is a html page added as a web resource and I replace the image based on the score
And below is the entire solution that shows plumbing on the CRM side of the fence
So there you have it, a simple solution that works end to end by consuming ML web service from within Dynamics CRM that gives you some insight into the satisfaction of your customers. The algorithm, that just uses body of the email, is indeed a simple one but it can be enhanced to take into account various other parameters and behaviour points that we have discussed in Part 2. This is just tip of the iceberg, there are lot of possibilities with Machine Learning.
Hope you enjoyed the series. Let me know if any comments or feedback.