How to only predict category IF the category field is empty

qprinsloo
Mega Sage

I'm working on enabling predictive intelligence on some of our incoming incidents reported. However, there are instances where the category may be set already on incident submission. After incident creation/submission the classification solution then sometimes changes the category already set on the incident. This is not desired. Is there a way to configure the solution to only attempt to predict the category IF the category field is empty? So for any incidents where the category is not empty, do not predict. 

1 ACCEPTED SOLUTION

Tai Vu
Kilo Patron
Kilo Patron

Hi @qprinsloo 

How currently the Category field is being set by the ML Solution in your instance?

I guess there's obviously a Business Rule or Client Script, which is handling it.

You can leverage the APIs in ServiceNow Predictive Intelligence to control the way of auto-populating the Category.

MLSolution - Global

MLSolution

Example

var mlSolution = sn_ml.MLSolutionFactory.getSolution("ml_incident_categorization");

var inputGR = new GlideRecord("incident");
inputGR.get("0ef47232db801300864adfea5e961912");

mlSolution.applyPrediction(inputGR);

 

So basically, you just need to check if the Category is empty then we fill it, otherwise just ignore it.

 

Cheers,

Tai Vu

View solution in original post

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@qprinsloo On your ML Solution Definition, try to put filter conditions and check if Category is empty.

predictive-intelligence-solution-description.png

 

 

Hope this helps.

 

Tai Vu
Kilo Patron
Kilo Patron

Hi @qprinsloo 

How currently the Category field is being set by the ML Solution in your instance?

I guess there's obviously a Business Rule or Client Script, which is handling it.

You can leverage the APIs in ServiceNow Predictive Intelligence to control the way of auto-populating the Category.

MLSolution - Global

MLSolution

Example

var mlSolution = sn_ml.MLSolutionFactory.getSolution("ml_incident_categorization");

var inputGR = new GlideRecord("incident");
inputGR.get("0ef47232db801300864adfea5e961912");

mlSolution.applyPrediction(inputGR);

 

So basically, you just need to check if the Category is empty then we fill it, otherwise just ignore it.

 

Cheers,

Tai Vu

qprinsloo
Mega Sage

Timi, thanks for the reply. I ended up using a flow action to set category if empty by following the below documentation. Also yes, category was set by a client script on our incident record producer.

 

https://docs.servicenow.com/bundle/vancouver-intelligent-experiences/page/administer/predictive-inte...

rmeadows1116
Giga Contributor

Do you have a list of categories and sub categories that you are using for incident management? I have been tasked to set ours up?