Performance Analytics Map assignment group in breakdown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2025 05:45 PM
I am working on creating a PA report titled "Closed Tickets Per Day," using the assignment group as a breakdown field. The source field is task.assignment_group from the task_sla table. Since there are many assignment groups, I would like to summarize them under generalized names. This way, the chart will display fewer assignment groups, with their counts representing the sum of the actual values from the individual assignment groups.
Assignment Group | Mapping |
Helpdesk L1 | Helpdesk |
Helpdesk L2 | Helpdesk |
Desktop Support | Helpdesk |
Network L1 | Network |
I tried with the scripted breakdown but it still shows the actual groups in this custom breakdown
function getMappedGroup(current) {
var mapping = {
"Helpdesk L1": "Helpdesk",
"Helpdesk L1.5": "Helpdesk",
"Desktop Support": "Helpdesk",
"Network L1": "Network",
"IT - EA": "Others",
"IT - Engineering": "Others"
};
var groupName = current.assignment_group.getDisplayValue();
if (mapping.hasOwnProperty(groupName)) {
return mapping[groupName];
}
return "Unmapped";
}
getMappedGroup(current);
Please advise if there is any easy way to achieve the same I have more than 39 groups so just looking for a summarized breakdown without changing or adding the values to actual assignment groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2025 08:31 PM
Hi @ChAhmed
Can you share the breakdown source that is currently associated with the scripted breakdown mapping from your screenshot?
To ensure that the mapping works correctly, we need to ensure that the returned values from your script align with the source data in the breakdown source.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2025 11:19 PM
Thanks for your feedback. Attached are the screenshots of the requested information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 10:12 PM
Hi @ChAhmed
Since your breakdown mapping is based on the assignment group, the breakdown source should be the Group [sys_user_group] table.
Recommended Approach:
Set up a parent-child relationship for assignment groups:
- Define Helpdesk as the parent group of Helpdesk L1, Helpdesk L1.5, etc.
- Then, in your scripted breakdown, simply return assignment_group.parent, and it should automatically map to Helpdesk or Network as expected.
Alternative Approach:
If your group data does not follow a parent-child structure, you can try this:
1. Use a Manual Breakdown to create a dataset where each generalized group (Helpdesk, Network, etc.) is explicitly defined.
2. Create a Breakdown Source using this manual breakdown data.
3. Modify your script to query the manual breakdown table and return the corresponding sys_id of the mapped group.
groupMapping(current.assignment_group.getDisplayValue());
function groupMapping(group){
var mapping = {
"Helpdesk L1": "Helpdesk",
"Helpdesk L1.5": "Helpdesk",
"DesktopSupport": "Helpdesk",
"Network L1": "Network",
"Network L1.5": "Network"
};
//Add these lines based on your script
var grManualBreakdown = new GlideRecord('pa_manual_breakdowns');
if(grManualBreakdown.get('value', mapping[group])){
return grManualBreakdown.getUniqueValue();
}
}
Enjoy!
Just keep in mind that the first approach is the recommended one.
Cheers,
Tai Vu