How to trigger approval from flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 07:57 AM
Hi Team,
Can anyone help me with Flow designer,I want to trigger an approval to specific groups,based on the logged in users' country,so there are around 11 countries and 11 groups and in future the countries can get increased,so how we can trigger the approval using flow designer,don't want to use so many if/else .
Thanks,
Karan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 08:44 AM
Perfect case for Decision table: https://docs.servicenow.com/bundle/utah-application-development/page/administer/decision-table/conce...
You pass in value(s) from your record and when the criteria matches, that's the group it will use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 11:40 AM
Hi @KARAN24
As @Michael Fry1 mentioned, you can leverage decision builders here.
Step 1 : Navigate to 'Decision Builder' under 'Decision Management' application
Step 2: Create a new decision table, I've named it as 'Approver Decision'
Inputs : Label: Country Type: String
In the decision table condition,create two columns one for country (string) and other for group (reference) and enter the approver group against it's respective country & save it
Step 3 : Add a new flow logic named 'Make a decision' to your flow and select the decision which you just created
In decision table inputs, toggle the script and use this script:
var userGR = new GlideRecord('sys_user');
user.addQuery("sys_id", gs.getUserID());
user.setLimit(1)
user.query();
if (userGR.next()) {
return userGR.country;
}
Step 4 : Add a 'Ask for approval' after this:
In the approver field use the result record data pill
Since you have decoupled the approver logic using decision builder, you can now add multiple countries and their respective approver there itself.
If my answer has helped with your question, please mark it as correct and hepful
Thanks,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 07:04 AM
Hi Karan,
I tried the above thing,but the issue is ,the flow is skipping the approval
Tried the same in Ask for approval as shown above,but it is coming as approval status as Skipped.
Thanks,
Karan