in servicenow, i have a flow designer where i trigger approval for 3 groups and i am a member of 2 groups, if i approve the request, then how should i know which group member approves the approval, because i am in both groups but from which group i approved is crucial, how to tackle this
Assistant
User
i do it in this way, but once a user from group A approves the request then in approval section it shows requested for remaining group, how to make them no longer required once request approved
Assistant
This is a common challenge in ServiceNow Flow Designer when multiple group approvals are involved and a user belongs to more than one approval group. You want to track from which group context the approval was made.
Problem Recap
You have one approval action that sends approval requests to 3 different groups.
A user belongs to 2 of those groups.
The user approves once.
You want to identify from which group context the approval happened.
Why Is This Complex?
Because the approval record itself generally only tracks the approver and the approval state — not directly which group context triggered that approval for multi-group approval scenarios.
How to Tackle the Problem
Option 1: Create Separate Approval Actions Per Group
In Flow Designer:
Instead of sending a single Approval action to multiple groups at once, split the approval actions per group.
Each Approval action targets only one group.
This way, each approval record will clearly show which group the approval was for.
A user who belongs to multiple groups may receive multiple approval requests (on separate records).
You can then identify which group the approval came from by looking at the approval record's "Approval Group" or "Assignment Group" field.
Option 2: Use Multiple Parallel Approval Actions with Group Context
Add three parallel approval actions — one per group.
Capture the group information in some way in each approval action (e.g., add a custom field or use the "Approval group" reference on the approval record).
Since approvals are separate, you know exactly which group each approval belongs to.
Option 3: Create Custom Approval Records With Group Reference
If for some reason you want a single combined approval action — not recommended — you can:
Extend the Approval table or Approval record with a reference field to the group.
In the approval action, create custom approval records that include the group context for each user.
This requires scripting or custom action to generate approvals per user per group.
Option 4: Use Approval Workflows / Assign Approval Requests to Group Members Individually with Metadata
Create approval requests for each user-group pair.
Add metadata fields to track group context for each approval.
This is more complex and requires custom scripting and may be overkill.
Best Practice and Recommended Approach
Create multiple approval actions per group in your Flow Designer, sending approvals distinctly to each group.
This way:
Each approval record clearly shows the group.
When you query the approval, you can know: "This approval was for Group A"
vs "This approval was for Group B"
If a user belongs to multiple groups, they will get multiple distinct approval records and can approve each separately.
Summary
Approach
Pros
Cons
Single approval action with multiple groups
Simple config
Cannot identify group context
Multiple approval actions (one per group)
Clear group identification
Slightly more complex flow
Custom approval records with group references
Precise tracking
Requires scripting and complexity
Custom user-group pair approvals with metadata
Detailed control
Complex setup, maintenance
Additional Tips from ServiceNow Docs & Community
Use the sysapproval_approver table to track who approved what and from which approval request.
The sysapproval_approver record has a field called group that holds the approval group.
When a user approves via UI or mobile, this group linkage is preserved if you send approvals per group.
You can add UI or notification logic to show group context dynamically.
If you want, I can provide sample configuration or Flow Designer steps/scripts to implement multiple approval actions per group — just let me know!
Got it! You have multiple approval actions running in parallel for multiple groups, and when one group approves, you want to mark the other groups’ approvals as no longer required (i.e., automatically complete or cancel the remaining approvals), so the overall request doesn’t keep waiting for approvals from other groups.
Scenario Recap:
Approval requested from Groups A, B, and C.
User from Group A approves.
The other groups’ approvals are still showing as pending.
You want to auto-complete/cancel/ignore the remaining group approvals once any one group approves.
How to Solve This in ServiceNow Flow Designer
1. Make Approvals "Any Approver" — Use OR logic for approvals
If your approval logic is: “Approve if any group approves” (logical OR), then you want the entire approval to be complete once any one group approves, and remaining approvals cancelled/rejected automatically.
In Flow Designer, the default Approval action sends approvals and waits for all of them to be approved (AND logic).
To implement "approval by any group," configure the approval condition or handle logic yourself.
2. Handling OR Approval Logic in Flow Designer
Since Flow Designer's standard approvals do not have a built-in "OR" mode (out-of-box each approval action waits for all approvals to complete), to simulate "approve if ANY group approves," you should:
Option A: Single Approval action sending to multiple groups with "approval criteria = Any approver"
In the Approval action, set the "Approval type" to "Any approver".
This makes approval complete when any group member approves.
But: you do not get separate approval records per group, so group info is lost (which you wanted to keep).
Since your design wants distinct approvals per group, this is a limitation.
Option B: Use multiple Approval actions (one per group) + custom logic to cancel remaining approvals once one approves
Because you want multiple approval actions (per group) and group context, here's what you can do:
How to implement:
Use multiple parallel Approval actions — one for each group.
After all parallel approvals are triggered, add a Wait step that waits until any approval is approved.
When any approval record is approved:
Use a script or action to cancel or reject the remaining pending approval records.
Then, move the flow forward as "approved."
Step-by-step Example
text
Start
|
Parallel:
|-- Approval action 1 (Group A)
|-- Approval action 2 (Group B)
|-- Approval action 3 (Group C)
|
Wait step: Wait for "any one approval record among these approvals" to become Approved
|
Script step or "Update Records" to cancel/reject other pending approvals
|
Continue flow as approved.
How to implement the Wait step?
Unfortunately, Flow Designer doesn't have an out-of-the-box "wait for any approval to be completed" step.
You can use:
Wait for Condition action on the approval records, condition like:
approval.state == approved AND approval.sys_id IN [list of approval record IDs]
Or split your approvals, save their sysapproval_approver IDs, then wait for one to reach approved.
How to cancel or reject other approvals?
Use a Script step in Flow Designer or Update Records action.
Find all pending approvals for the current request except the one approved.
Update their state to "cancelled" or "rejected" (state = rejected or special cancel value).
Sample GlideScript to Cancel Approvals
javascript
(function execute(inputs, outputs) {
// inputs.approvalSysIds = array of all approval sys_ids sent
var approvedApprovalSysId = inputs.approvedSysId; // approval sys_id that user just approved
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sys_id', 'IN', inputs.approvalSysIds);
gr.addQuery('sys_id', '!=', approvedApprovalSysId);
gr.addQuery('state', '!=', 'approved');
gr.query();
while (gr.next()) {
gr.state = 'rejected'; // or 'cancelled', depending on your requirements
gr.update();
}
})(inputs, outputs);
You can pass parameters (approval IDs) through Flow Designer's inputs.
3. UI / Notification Update
Once you cancel the other approvals, the system UI (request > Approvals related list) will show the approved group and the cancelled/rejected others, clearly reflecting current status.
4. Alternative approach: Use the Approval - User + Approval - Group combined approach
If you assign approvals both to groups and users simultaneously (i.e., explicitly assign approvals to group members individually), approvals auto-decline when one member approves. But this is complex and usually unnecessary.
Summary
What to do
How
Identify each group's approval separately
Create one approval action per group
Wait until any group approves
Add a Wait for Condition step or logic
Cancel other pending approvals
Run a Script or Update Records action to reject/cancel others
Move flow forward after approval
Continue your flow with "approved" status
Final Notes
This approach requires some scripting or logic after parallel approvals.
Flow Designer does not currently have a native "Approval OR" control that works across multiple approval actions.
Remember to test the flow with scenarios involving multiple members in multiple groups.
If you'd like, I can help you create a sample Flow Designer flow including the Wait condition and the script to cancel remaining approvals — just ask!