Set RITM Assignment Group Based on Selected Checkbox Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Community,
I have a catalog item with multiple checkbox variables. Based on the checkbox selected by the user, I need to set the RITM Assignment Group to the corresponding group.
For example:
Checkbox variable Expected RITM Assignment Group
abc ABC_Group
bcd BCD_Group
cde CDE_Group
def DEF_Group
efg EFG_Group
fgh FGH_Group
There is also a Partner variable. If Partner = Others, separate assignment logic is already in place, so this Business Rule should only execute when Partner is not Others.
The related SCTASKs are being created correctly and their assignment groups are also being populated correctly based on the selected checkbox.
The issue is with the RITM assignment group.
For example:
Checkbox abc = true
→ SCTASK is correctly assigned to ABC_Group ✅
→ RITM should also be assigned to ABC_Group ❌
I tried a Before Insert Business Rule on sc_req_item with the following script:
(function executeRule(current, previous) {
var partner = current.variables.partner + '';
// Do not handle Others
if (partner == 'Others') {
return;
}
var abc = current.variables.abc + '';
var bcd = current.variables.bcd + '';
var cde = current.variables.cde + '';
var def = current.variables.def + '';
var efg = current.variables.efg + '';
var fgh = current.variables.fgh + '';
// ABC
if (abc == 'true') {
current.setValue(
'assignment_group',
'ABC_GROUP_SYS_ID'
);
return;
}
// BCD
if (bcd == 'true') {
current.setValue(
'assignment_group',
'BCD_GROUP_SYS_ID'
);
return;
}
// CDE
if (cde == 'true') {
current.setValue(
'assignment_group',
'CDE_GROUP_SYS_ID'
);
return;
}
// DEF
if (def == 'true') {
current.setValue(
'assignment_group',
'DEF_GROUP_SYS_ID'
);
return;
}
// EFG
if (efg == 'true') {
current.setValue(
'assignment_group',
'EFG_GROUP_SYS_ID'
);
return;
}
// FGH
if (fgh == 'true') {
current.setValue(
'assignment_group',
'FGH_GROUP_SYS_ID'
);
}
})(current, previous);
The Business Rule configuration is:
Table: Requested Item [sc_req_item]
When: Before
Insert: True
Update: False
What would be the recommended approach to set the RITM assignment group based on the selected checkbox after catalog submission?
Is a Business Rule the correct approach, or should this assignment be handled through the Flow/Workflow after the variables and RITM are fully available?
Any suggestions would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi ,
Hardcoding assignment group sys_ids is not a good approach. Also, You are using if condition for each value, it should be nested if/else conditions or switch.
My Recommendation:
You should create a decision table to store this logic in the table, then create a flow on RITM (OR use existing), use add a decision flow logic to get the assignment group based on the selection and update the RITM with the correct group.
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @Anand__99
There is a standard flow for all catalog items. It creates a task in a custom table and populates the basic details based on the catalog variable conditions. That’s why I’m trying to implement this through a Business Rule.
If you have any articles or documentation regarding Decision Tables that could help with this requirement, that would be helpful for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
You can use decision builder and inside BR use that table to get the assignment group dynamically.
Refer this : https://www.servicenow.com/community/virtual-agent-forum/using-decision-builder-in-servicenow-using-...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
you must be already having flow associated to your catalog item
Why not use that and use "Update Record" flow action to update the RITM Group?
You can use Decision table to grab the sysId based on variable value
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader