- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 08-14-2019 08:41 AM
This article will show how an organization can make minor modifications to OOB script includes in ServiceNow to return the level of confidence from from the prediction outcome from a given solution.
We implemented this at Novant Health so that we could present a "suggested group" based off the prediction and confidence level of the AI prediction.
This gave an opportunity to present to the process performer the option to use the default assignment group based off our AR routing rules, or to use an AI prediction based on the content of the incident.
To achieve this, we needed to create a client script on incident, modify some OOB utils and create a helper script of our own.
Below are screen-shots of the code we modified/created.
Modification of AiAjaxUtil:
Client Script for group suggestion:
Custom AI AJAX helper:
Business Rules:
- 719 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Fantastic work on this! Any chance you can show how you got the "Use Suggested Group" button next to your reference field? I can't seem to find anything in ServiceNows docs about that.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
jcarletto27,
We created a UI macro with code:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j2:set var="jvar_n" value="getSuggestedGroup_${ref}"/>
<a id="${jvar_n}" onClick="getSuggestedGroup()" title="Use Suggested Group" alt="Sets the Assignment group based on the Suggested group" tabindex="1" class="btn btn-default icon-user-group"></a>
<script>
function getSuggestedGroup() {
var suggested_group = g_form.getValue('u_suggested_group');
g_form.setValue('assignment_group', suggested_group);
}
</script>
</j:jelly>
I've attached an xml file of the one we use.