Pavankumar_1
Mega Patron
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
03-07-2023 01:47 AM - edited 04-27-2023 05:02 AM
If you are looking to populate the Assignment group based on the old short descriptions and descriptions. This article will help you with complete steps.
Note: Predictive Intelligence solutions can not train on PDI.
Plugin required: Predictive Intelligence for Incident Management
Plugin Doc Link: https://docs.servicenow.com/bundle/utah-it-service-management/page/product/incident-management/task/...
- Create the solution definition under Classification module.
- Complete the form give name, table, output field, Fields, and word corpus and save or save and train.
Info: Word Corpus is the collection of words which will use to train the solution.
- Once you Click on Submit & Train it will create a ML solution record and Once State is Solution Complete then you can test the solution. Usually it will take some time to complete.
- Open the ML solution and click on Test Solution tab to test the solution and give the your Input fields and click on Run Test button. See Prediction Output which is Group name will display below.
- Once you trained the solution and tested and if everything looks good then create a Before insert business rule on Incident and your table with necessary conditions. Use below script.
(function executeRule(current, previous /*null when async*/ ) {
var mlSolution = sn_ml.ClassificationSolutionStore.get('ml_x_501390_global_global_assignment_on_inc_assign'); //add your solution definition name
var input = new GlideRecord("incident");
input.get(current.sys_id);
// configure optional parameters
var options = {};
var results = mlSolution.getVersion(1).predict(input, options);
var obj = JSON.parse(results);
var grp_name = obj[Object.keys(obj)][0].predictedValue; //it will give the predicted value
var grp = new GlideRecord('sys_user_group');
if (grp.get('name', grp_name)) {
current.assignment_group = grp.sys_id;
}
})(current, previous);
Hope it will help you.
- 2,244 Views