Links

ServiceNow Inbound Integration

With the ilert ServiceNow integration, you can create alerts in ilert based on ServiceNow alerts.
ServiceNow is a platform-as-a-service (PaaS) provider of enterprise Service Management (SM) software.

In ilert

Create a ServiceNow alert source

  1. 1.
    Go to the "Alert sources" tab and click Create new alert source
  2. 2.
    Enter a name and select your desired escalation policy. Select "ServiceNow" as the Integration Type and click on Save.
  1. 1.
    On the next page, a ServiceNow URL is generated. You will need this URL below when setting up the hook in ServiceNow.

In ServiceNow

Create business rule

  1. 1.
    Go to ServiceNow, search for Incidents, **then open the header menu and choose Configure -> Business Rules**
  1. 1.
    In the Business Rules view click on New to create a new business rule
  1. 1.
    Name the business rule e.g. ilert Alerts, choose Advanced option, in the When to run section choose async then choose Insert and Update options
  1. 1.
    Go to Advanced tab and paste the following code into the script section:
(function executeRule(current, previous /*null when async*/) {
var iLertUrl = "<your alert source URL here>";
function glideRecordToJson(gr) {
var obj = {};
for (var prop in gr) {
if (gr[prop]){
obj[prop] = gr.getValue(prop);
}
}
return obj;
}
var obj = glideRecordToJson(current);
obj.server_url = gs.getProperty("glide.servlet.uri");
var body = JSON.stringify(obj);
var request = new sn_ws.RESTMessageV2();
request.setEndpoint(iLertUrl);
request.setHttpMethod("POST");
request.setRequestBody(body);
request.setRequestHeader("Accept", "application/json");
request.setRequestHeader("Content-Type", "application/json");
var response = request.execute();
gs.log(response.getBody());
})(current, previous);
  1. 1.
    Click on Submit or Update to save the business rule

ServiceNow Incident Lifecycle

When I create an ServiceNow ticket with status...
...then an ilert Alert...
New
is created
In Progress or Complete or Closed
will not be created and a
400 (bad request) error occurs
When I update an ServiceNow ticket with status...
...and the ilert alert...
...then the/an ilert Alert...
New
does not exist
is created
In Progress or Complete or Closed
does not exist
will not be created and a
400 (bad request) error occurs
New
exists
doesn't change
Complete or Closed
exists
change status to Resolved if not already resolved
In Progress
exists
change status to Accepted if not already accepted

Advanced configuration

iLert's ServiceNow integration allows you to easily configure advanced settings such as dynamic escalation policy routing and priority mapping.
To get access to the advanced features, you will have to provide access credentials to your ServiceNow instance first. The provided user will need the following permissions in ServiceNow:
  • sys_user
  • sys_user_group
  • cmdb_ci_service
  • service_offering
  • sys_choice
  • sys_dictionary
Afters you will get access to:

Dynamic priority mapping

When selecting priority mapping, ilert will contact your ServiceNow instance and fetch all available priorities of ServiceNow alerts. You will then be able to choose a mapping for each of these and determine how ilert will treat them when creating alerts in ilert.

Dynamic escalation policy routing

When selecting escalation policy routing, ilert will contact your ServiceNow instance and fetch all available alert fields. You will then be able to choose an alert field that should be used for incoming alerts in ilert to determine the routing key.
You may choose to give escalation policies in ilert a unique routing key.
With an incoming event ilert will try to find the right escalation policy based on the routing key and assign the alert to the escalation policy. If no routing key is provided, ilert will use the assigned escalation policy of the alert source.

Bidirectional alert synchronisation

When providing credentials you may choose to activate bidirectional mode on the ServiceNow alert source. This will cause your alert source to be automatically linked with an outbound connector and alert action. This way status changes to ilert alerts will synchronize to ServiceNow alerts.
When saving the ServiceNow alert source with bidirectional setting enabled, it will automatically create an outbound connector for you and take you to the creation page of the necessary alert action, please make sure to continue with the setup of the action to finish your bidirectional alert source setup.

Good to know

In the bidirectional setup, ilert will try to map users automatically (if Caller ID in alert action is left empty) based on their email address. This accounts for actions taken in ilert and synced back to ServiceNow, as well as actions taken in ServiceNow and send to ilert.
When providing a comment to the alert in ilert while resolving it, ilert will make sure sync the comments content as resolve information to the alert in ServiceNow.

FAQ

Will alerts in ilert be resolved automatically?
Yes
Can I connect ServiceNow with multiple alert sources from ilert?
Yes, simply create more business rules in ServiceNow.
(c) 2011 - 2022 iLert GmbH