Handling of Requested Approvals for sc_req_item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2025 03:40 AM
Objective:
Create a scheduled job to manage requested approvals for sc_req_item records. The job will send notifications on the 4th and 6th day of requested approval and cancel the request along with associated approvals after the 8th day.
Detailed Requirements:
Scheduled Job:
- Name: RequestedApprovalNotification
- Frequency: Daily
- Functionality:
- Query sc_req_item records where the approval field is requested and the sys_created_on date is more than 5 days ago.
- Send notifications on the 5th and 7th day of requested approval.
- Cancel the request and associated approvals after the 8th day.
Notification Functionality:
- Function Name: sendApprovalNotifications
- Input: sys_id of sc_req_item
- Functionality:
- Check if the email has already been sent.
- If not, trigger an event to send an email to the requestor and CC all approvers.
Cancellation Functionality:
- Function Name: cancelRequestAndApprovals
- Input: sys_id of sc_req_item
- Functionality:
- Cancel the sc_req_item request.
- Cancel all associated approvals in the sysapproval_approver table.
Retrigger Approval Notifications:
- Function Name: retriggerApprovalNotification
- Input: Approval record
- Functionality:
- Trigger the "approval.inserted" event to resend the approval email.
Implementation Steps:
Create Scheduled Script Execution:
- Define the script to query requested approvals and handle notifications and cancellations.
Create Notification Events:
- Define events for approval.notification and approval.cancelled.
Create Notifications:
- Set up email notifications for the defined events.
Define Functions:
- Implement the sendApprovalNotifications, cancelRequestAndApprovals, and retriggerApprovalNotification functions in a Script Include.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2025 07:57 AM
I have something similar but instead of using a scheduled job I have a flow that gets attached to the approval records once it is created. The only difference is that we do 6 days instead of 8 with 2 reminder notifications.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2025 10:14 AM
Please see the following video : https://www.youtube.com/watch?v=hVctTUMWIcs