How to trigger a single notification to requestor for the Approval record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
We have a requirement to auto cancel any RITMs, that are not approved within 30days. We are looping through approval records (sysapproval_approver) table, fetching the RITMs, then calling the notification which is sending emails to each approver separately for the same approving record.
Current behavior: User is receiving multiple notifications along with approving user.
Expected Behavior: Our goal is to notify the user via Additional comments (without sending multiple notifications to the requestor).
Flow configuration:
Notification:
Please verify our Flow and let us know how can we trigger a notification to the Requestor (via single notification specific to one ticket) instead of multiple notifications which is happening happening via For-each loop.
Thank you in advance!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @SubhashreeS4370 ,
What is the trigger configured for the Flow? If the Flow trigger is scheduled, I would suggest handling the cancellation and notification at the RITM level rather than triggering the notification from each approval record. This will help avoid sending multiple notifications for the same RITM when there are multiple approvers.
You can follow the below approach:
- Fetch the approval records from the sysapproval_approver table that were created more than 30 days ago and are still in Requested state.
- From these approval records, identify the associated RITM sys_ids and store them in a Flow variable.
- Reject the pending approval records associated with those RITMs and exit the loop.
- Perform a Look Up Records on the RITM [sc_req_item] table using the collected RITM sys_ids using filter sys id is one of <Flow variable>.
- Use a For Each loop to iterate through the RITMs returned by the lookup.
- Within the loop, trigger the cancellation notification from the RITM level.
If you find this approach useful, please mark the response as Helpful and Accept the Solution.
Regards,
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @HarishKumar6668 ,
Thank you for the solution. However,
We are facing an issue with storing multiple RITM Sys IDs in a flow variable. Currently, the flow variable is configured as a String type, and it only stores a single RITM Sys ID.
Could you please advise on the best approach to store multiple RITM Sys IDs in a flow variable so that they can be referenced in a subsequent step to update the RITM stage to "Request Cancelled"?
Any guidance or recommended implementation would be greatly appreciated. Please find the attached screenshots of flow variable and flow designer.
Flow variable:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @JaganN971616731 ,
Sorry for the late reply.
Store the comma-separated sys_ids in a Flow Variable and use the Look Up Records action with a filter where the sys_id is one of the values from the Flow Variable. You can then use a For Each loop within the flow to process the returned records.You don't need to use an Array-type variable for this.
Regards,
Harish
