0

Could anyone please tell me if there is a way to close the servicenow incidents automatically through automation process.

I am dealing with bulk p3 incidents daily. I want to figure out a way to reduce the manual effort.

Thank you Pushpanth

Never_Give_Up
  • 126
  • 1
  • 9

1 Answers1

1

You could write JavaScript to find and close the Incidents, and run it from a scheduled job.

var grInc = new GlideRecord('incident');
// Add filtering logic here ...
grInc.addQuery( ...
grInc.addQuery( ...
grInc.query();
while (grInc.next()) {
    grInc.state = 7; // Closed
    grInc.update();
}

OR

If you do not want to write any JavaScript, you could do it using Flow Designer: (https://docs.servicenow.com/bundle/paris-servicenow-platform/page/administer/flow-designer/concept/flow-designer.html)

giles3
  • 465
  • 2
  • 9
  • If you could help me with some sample code that will be helpful for me. – Never_Give_Up Oct 08 '20 at 19:31
  • 1
    The trick is knowing which incidents to close (and which ones to leave open). I do not know enough about your situation to answer that question. If you do not already know JavaScript, then I would strongly recommend that you use Flow Designer. It is easy to get yourself in trouble with ServiceNow JavaScript. – giles3 Oct 08 '20 at 19:54
  • Okay.. I will try exploring the Flow designer and see how exactly we can do that. Thank you for suggestion. – Never_Give_Up Oct 09 '20 at 10:16