Enabling Machine Learning in CRM For Dynamics 365

The machines are taking over!

We hear a lot about how machine learning is being used in many applications, and CRM for Dynamics 365 is no exception to that sentiment. There are several features in CRM for Dynamics 365 that utilize Microsoft Cognitive Services – a very powerful set of tools/APIs that use the power of machine learning. For Example:

– Keyword matching, similar cases, topic analysis, and knowledge article suggestions, require a Cognitive Services Text Analytics connection.

– Automatic product recommendations while creating opportunities and adding opportunity products requires a Cognitive Services Recommendations connection.

So, does that mean in order to use automatic product recommendations, keyword matching, automatic knowledge article suggestions, etc., we need to integrate Microsoft Cognitive Services with CRM for Dynamics 365?

Correct.

Before you do that though, you would want to enable the “Product Recommendation” and “Text Analytics” previews in your settings first. (Yes, they are still previews)

Go to Settings->Administration->System Settings, and click the (last) Preview tab.

Under Preview, set “Cross-sell Product Recommendations Preview” and “Text Analytics Preview for Case Topics analysis, Suggest Similar Cases and Suggest Knowledge Articles” to Yes.

 

Next, go to http://portal.azure.com and login with a Microsoft Id.

Once in, we will be looking for two specific Cognitive Services APIs – Recommendations and Text Analytics. Let’s start with Recommendations API.

Note: Calls to these APIs are not free. Having said that, Microsoft gives you 5,000/10,000 etc. calls per month for free depending on what API you choose. If you are likely to exceed these calls, Microsoft will prompt you to upgrade to a paid account.

Recommendations API

In the Azure portal, click the “+” button on the top left corner-> select “Intelligence + analytics” in the next pop up menu, and then Cognitive Services APIs (preview).

On the next “Create” screen, give the service a name, choose Subscription (start with Free), choose API type “Recommendations API (preview)”, Pricing tier f0, and create a resource group. Click Create.

On the next screen, you will see a bunch of tabs to the left. Under Overview, make note of Endpoint, then choose Keys. When you do, you will see a couple of keys to the right. You will use one of these keys to connect this Recommendations service to CRM for Dynamics 365.

Now head to CRM for Dynamics 365. Go to Settings-> Administration->Azure Machine Learning Recommendation Service Configuration.

Fill in all the self explanatory fields. In the “Azure Service URL” field, enter the Endpoint that you noted above. In “Azure Account Key”, enter one of the two keys from the Keys section above.

Save and Test Connection. Once successful, click Activate.

That’s it. You are now ready to start building your Product Recommendations in your Product Catalog. (More on that later)

Note: It is possible that your connection to the Recommendations service may not be successful at the first go. If one key doesn’t work, try the other. You may even want to regenerate the keys if you keep getting connection failure errors.

Text Analytics API

Well, you know the drill. Do what you did above in the Azure portal. This time, when you create a new  service, you will choose Text Analytics API.

Back in CRM, go to Settings ->Administration->Azure Machine Learning Text Analytics Configuration, and do what you did above with the Endnote and Key.

Now you are ready to create “Advanced Similarity Rules”. (More on this later)

That’s it!

Thanks for making it this far! Hopefully this article gives you an idea of how to get started with the basic building blocks of enabling machine learning for CRM for Dynamics 365.

Question or comments? Let me know.

3 thoughts on “Enabling Machine Learning in CRM For Dynamics 365”

Leave a Reply

Your email address will not be published. Required fields are marked *