How agent automation can be implemented in servicenow

Ria
Tera Contributor

Requirement: Initial Incident Creation: When an agent's status shows "Down" for more than two hours, create an Incident in ServiceNow with the following attributes:
Default priority: Priority 4 (Low).

Priority Escalation After 6 Hours: If the agent's status remains "Down" for 6 hours, automatically escalate the incident's priority: Change the priority from P4 (Low) to P3 (Moderate).
Update the incident work notes with details of the prioritisation and timestamp the action for audit purposes.

Critical CI Handling After 24 Hours: If the affected CI is classified as Production, automatically raise the incident priority to P2 (High) 24 hours after the incident is created.

Incident Closure on Agent Recovery: As soon as the agent's status shows "Up", automatically close the incident with the following actions:
Add a resolution comment indicating that the agent's status is now "Up" and the issue has been resolved.
Update the incident resolution code to reflect the root cause or resolution type (e.g., "Agent Recovered Automatically").

2 REPLIES 2

pavani_paluri
Giga Guru

Hi @Ria ,

 

Use a Scheduled Job (Scheduled Script Execution) or Event-driven Flow that checks if an agent’s status is “Down” for > 2 hrs.

If true, create a new Incident with Priority = 4 (Low), Short Description = "Agent [Name] Down for > 2 hours", Assignment Group as per your process and Link the affected CI
Flow Designer:
Add a Timer/Wait for 6 hrs after Incident creation.If status is still “Down”, update the Incident then Priority → P3 (Moderate) and Add work notes

If CI Class = Production,After 24 hrs from Incident creation (still not resolved, CI still Down) increase Priority → P2 (High

You can create separate flow for Incident Closure on Recovery When Agent status = “Up”.

Find active Incident for the Agent. Update Incident State = Resolved/Closed, Resolution notes = Agent status is now 'Up'. Issue resolved automatically. and Close code = Agent Recovered Automatically

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P

M Iftikhar
Mega Sage

Hi @Ria,

This is a great use case for Flow Designer!

You can achieve this by creating a flow with a 'Record has been updated' trigger on the Agent Status.

Initial Incident (2 hours): Use a 'Wait For A Duration Of Time' (2 hours) with condition Status = Down. If true, create a P4 Incident. If the agent goes Up within 2 hours, no incident is created.

Priority Escalation (6 hours): Add another 'Wait For A Duration Of Time' (4 hours). If still Down, update the Incident to P3 and add Work Notes. If the agent goes Up, close the Incident with resolution comments.

Critical CI (24 hours): Add another 'Wait For A Duration Of Time' (18 hours). If still Down, look up the CI. If classified as Production, update the Incident to P2. If the agent goes Up, close the Incident.

Incident Closure: At any stage, if the agent status changes to Up, the same flow handles closure by updating the Incident with resolution notes and closing it automatically.

This structured approach ensures the full lifecycle (creation, escalation, closure) is managed in one flow without duplication.

Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.