Multiple Approval requests to same manager for same catalog item

MichaellaP
Tera Contributor
Is there a recommended way in Flow Designer to consolidate approvals by approver, so that if a manager owns multiple requested groups, they receive a single approval request listing all groups requiring their approval rather than one approval per group?
2 REPLIES 2

Chetna_Aggarwal
Tera Contributor

 

Option 1: Group requests by approver (Recommended)

  1. Determine all groups that require approval.
  2. Resolve each group's approver (for example, the group manager).
  3. Build a map such as:

 

 
Manager A
 - Group 1
 - Group 2
 - Group 5

Manager B
 - Group 3
 - Group 4
 

 

 
  1. Loop through each unique approver.
  2. Create one approval per approver.
  3. Include the list of all their groups in the approval description/work notes.

This results in:

  • Manager A → 1 approval covering Groups 1, 2, and 5.
  • Manager B → 1 approval covering Groups 3 and 4.

Option 2: Approval Coordinator Table

If the approval process is more complex:

  • Create a custom table that stores:
    • Request
    • Approver
    • Related Groups (JSON or related list)
  • Generate one approval from each coordinator record.
  • After approval, process all associated groups.

This scales well when approvals involve many items.


Option 3: Approval Summarization (Best for Catalog Requests)

Instead of creating an approval per group:

  • Build a formatted summary such as:

 

 
Please approve access for the following groups:

• Finance_Admin
• SAP_Read
• HR_Managers
• Network_Operators
 
 

Create one approval record and display this summary in:

  • Approval Description
  • Additional Comments
  • Approval Form

yashkamde
Giga Sage

Hello @MichaellaP ,

 

Here you can utilize scripted approval in flow designer :

Scripted Approvals in Flow Designer with Flow Variables 

 

In your case, since you're consolidating by manager (not by group), you're resolving sys_user_group.manager for each requested group into a de-duped list of manager sys_ids, then passing those into U[...] - so each manager gets exactly one approval covering all groups they own.

 

(function execute(inputs, outputs) {
    var approverMap = {};
    var groups = inputs.requested_groups; // array of group sys_ids

    groups.forEach(function(groupId) {
        var grGroup = new GlideRecord('sys_user_group');
        if (grGroup.get(groupId)) {
            var managerId = grGroup.getValue('manager');
            if (!managerId) return;

            if (!approverMap[managerId]) {
                approverMap[managerId] = [];
            }
            approverMap[managerId].push(grGroup.getValue('name'));
        }
    });

    var approverIds = Object.keys(approverMap); // unique manager sys_ids

    // Since each approver must independently approve
    var approvalSyntax = 'ApprovesAllU[' + approverIds.join(',') + ']';

    outputs.approval_syntax = approvalSyntax;
})(inputs, outputs);

 

If my response helped mark as helpful and accept the solution.