Schedule job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
we will do the development and deployment of an automation in that identifies and closes IT requests that have remained in an “Awaiting Approval” state for more than 45 days without any activity.
Automation will be built as mentioned below.
-Detect IT requests that have had no updates from the requestor within the 45‑day period.
-Detect requests where the assigned approver has taken no approval action (approve or reject) during that timeframe.
-Automatically transition qualifying requests to a Closed – Inactive status.
-Add a standardized system‑generated comment at closure to inform users of the reason for the auto‑closure and the appropriate next steps.
Auto‑Closure Comment:
“This request is proposed to be automatically closed due to inactivity while awaiting approval. No updates or approval actions were recorded during this period. If access or support is still required, the requestor may submit a new request.”
can anyone suggest me easily way to do it I'm getting error in this request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
so what you started and where are you stuck?
This looks like a complete big requirement.
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
I was try to do this by schedule job but the script is not working can you please suggest any simpler method to achieved this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
what script and what's not working?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @RoshaniB
Probable logic for the scheduled job:
- Query the sysapproval_approver table where state is Awaiting Approval.
- Filter records where sys_updated_on is more than 45 days ago.
- For each qualifying record:
Transition the associated request (e.g., change_request, sc_req_item) to Closed – Inactive //update it which state available in your project. - Set approval record to Cancelled .
- Add a system-generated comment " This request is proposed to be automatically closed due to inactivity while awaiting approval. No updates or approval actions were recorded during this period. If access or support is still required, the requestor may submit a new request." to the Tickets' Work notes.
