- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2020 09:28 AM
Hi All,
the client asked me to implement a UI action to suggest an assignment group to the agent after changing some fields of the case (Business Service and other custom fields).
Is there a way to execute on-demand assignment rules, which I have defined to assign the case when it is created, and show the result to the agent who can decide whether or not to accept the suggestion?
I don't want the assignment group of the case always be recalculated on update.
Thanks,
Piero.
Solved! Go to Solution.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2020 03:42 AM
I've found the solution using GlideFilter.checkRecord() and GlideScopedEvaluator().evaluateScript() functions.
checkRecord allows me to find the assignment rule that match with new values of my record.
evaluateScript returns me the sys_id of the calculated group.
Thanks all for the support,
Piero

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2020 11:52 AM
you can configure business rule to show message with assignment group name.
this BR can lookup assignment rules lookup table data configured on your instance.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2020 01:54 AM
Some of the assignment rules that I've defined are scripted, so I need to match the exact one and get its response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2020 03:00 AM
Hi Piero,
As we aware that Assignment Lookup Rules are stored in dl_u_assignment tables, I have tried with UI Action and Script.
UI Action
Name : Assignment Group
Table : Incident
Client : true
OnClick : openEligibleAssignmentGroups()
Script:
function openEligibleAssignmentGroups() {
var ajaxHelper = new GlideAjax('AssignmentGroupLookupAjax');
ajaxHelper.addParam('sysparm_name', 'getEligibleAssignmentGroups');
ajaxHelper.addParam('sysparm_category', g_form.getValue('category'));
ajaxHelper.getXML(showEligibleAssignmentGroups);
}
function showEligibleAssignmentGroups(response) {
var answer = response.responseXML.documentElement.getAttribute('answer');
var refurl = reflistOpenUrl('incident.assignment_group', 'incident.assignment_group', 'sys_user_group', 'sys_user_group', 'null', 'false', '');
var url = 'sys_idIN' + answer;
var refurlquery = refurl + url;
popupOpenStandard(refurlquery, 'lookup');
}
Script Include:
Name : AssignmentGroupLookupAjax
Client Callable : true
Script:
var AssignmentGroupLookupAjax = Class.create();
AssignmentGroupLookupAjax.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getEligibleAssignmentGroups: function() {
var grAGL = new GlideRecord('dl_u_assignment');
grAGL.addQuery('category', this.getParameter('sysparm_category'));
grAGL.query();
var answer = "";
while (grAGL.next()) {
if (answer != "")
answer += ",";
answer += grAGL.assignment_group;
}
return answer;
},
type: 'AssignmentGroupLookupAjax'
});
Output you can get it, as below. When you click on "Assignment Group" the popup window will open with eligible assignment groups, when you click the chosen assignment group will get set Assignment Group in Incident form.
Regards,
Bala T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2020 06:47 AM
Off the top of my head I'd say use Flow Designer. Force the client to work out the process and visualize what they are asking. With Flow designer you have all the If/Else if option you need and actions to support it.