Help with a business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2026 12:41 PM
I would like to create a business rule. The requirement is as follows: When a certain assignment groups are updated on sys_user_grmember table, i would like to automatically create a request using 'General Request' catalog item and assign the task a team. Can someone please help me with this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2026 12:55 PM - edited 01-28-2026 12:57 PM
Hi @Jen11
Can you explain in detail of the requirement, Do you want to track add/remove of group members?
As per your question - you can write a BR Accordingly and trigger the catalog item from BR using Cart JS API
Refer below link
https://www.servicenow.com/docs/r/yokohama/api-reference/server-api-reference/c_CartJSScoped.html
For the Task creation, The flow attached to the catalog item should be configured to 'create catalog task' and assignment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2026 12:56 PM
everytime a user is added or removed from the group, i'll like to create a request using the general request catalog item and assign it to a team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2026 11:37 PM
Yes a BR works perfectly in this scenario as @Its_Azar mentioned
You can directly call Cart API from BR or create a flow which submits the catalog item and call that flow from script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2026 06:06 PM
Hi there @Jen11
Since you want a request created every time a user is added or removed from a group, the correct pattern is:
Business Rule on sys_user_grmember → detect add/remove
Trigger a Flow → submit the General Request catalog item
Let the catalog flow handle task creation and assignment'
(function executeRule(current, previous) {
var action;
if (current.operation() == 'insert') {
action = 'ADD';
} else if (current.operation() == 'delete') {
action = 'REMOVE';
} else {
return;
}
var inputs = {};
inputs.user = current.user.toString();
inputs.group = current.group.toString();
inputs.action = action;
var flowAPI = new sn_fd.FlowAPI();
flowAPI.startFlow('x_your_scope.create_general_request', inputs);
})(current, previous);