Now that I have a way to import Dynamics data to the Machine Learning Studio, it would be great to see if I can use it to, well, start predicting something.
Here is the scenario I’m going to try:
In Dynamics, I have added a few fields to the out-of-the-box case entity:
- Resolution Time (decimal)
- First Assignee (user lookup)
Would it be possible to use Machine Learning with Dynamics in order to choose the best First Assignee for every new case?
In a nutshell, I am guessing it’s supposed to work this way:
- First, I will import some test data to Dynamics
- Then, I will create a model in the Machine Learning Studio and train it using the data from Dynamics
- After that, I will create a web service
- And, finally, I will create a plugin to consume that web service and to automatically assign a case to a user based on the web service predictions
For the test data, I simply used an excel spreadsheet to get 10 cases in Dynamics. You will see those cases on the screenshot below:
In the test data, I used 10000 for those cases which were closed as unresolved.
To set up the experiment in the Machine Learning Studio, I pretty much followed this link:
https://docs.microsoft.com/en-us/azure/machine-learning/studio/create-experiment
So, here is what the experiment looked like as a result:
Import data component was set up exactly the the way it was described in the previous post, except that I used a different SQL query this time:
SELECT
title,
CustomerIdName,
ita_FirstAssigneeName,
CAST(ita_resolutiontime * 100 AS INT) AS ResolutionTime,
ProductIdName
FROM Incident
Notice that I could not use my decimal field as is, so there is a cast to int.. Also, if you look at the experiment screenshot above, you’ll see “Select Columns in Dataset” component. That one is there to remove case title from the columns. I could have changed the query, but it’s a learning exercise for me, too, so I left the query as is, and, then, the reason I needed that “select columns” component is that, whatever the title is, it’s unlikely to affect case resolution time. So we can simply exclude it before training the model:
At this point, everything was ready, so I followed another article to create a web service:
Ran the experiment, created a predictive Web Service:
That created a “predictive experiment”, so I ran that one.. and was, finally, able to create a web service:
Got a web service, so I can test it now:
Now I just need to create a plugin that will consume this web service and do case assignment based on the score.. This is for the next post, but, it seems, that part is going to be relatively straightforward – all the code required to consume this web service is available on the “consume” tab: