Creating an incident in ServiceNow
This documentation references external sources. Nexthink does not have control over the accuracy of third-party documentation, nor any external updates or changes that might create inconsistencies with the information presented on this page. Please report any errors or inconsistencies to Nexthink Support.
This document demonstrates how to configure Nexthink Webhook to detect alerts and events and transmit them to ServiceNow to create an incident.
In ServiceNow
Verify that the proper roles of the user are in place in order to define credentials in Nexthink.
Go into User Administration and select Users.
Verify that the user has been assigned the following roles:
rest_api_explorer
itil
Once the user has been set up in ServiceNow, gather the proper Resource and Payload information necessary for the Webhook configuration page in Nexthink. Rely on the Rest API Explorer option within ServiceNow:
Go into System Web Services, then REST and select Rest API Explorer.
Verify that you have selected the following values:
Namespace = now
API Name = Table API
API Version = latest
Click on the option Create a record (POST)
In the Prepare request section, for tableName select Incident from the drop-down list:
Take information from the Create Record section and apply it to the Method and Resource fields on the Webhook configuration page in Nexthink.
For this particular example:
Method: POST
Resource: api/now/table/incident
Replace {tableName} with the previously selected tableTo define Payload on the Webhook configuration page in Nexthink, go to the Request Body section and select the Builder tab located at the bottom of the page:
Add different fields to build the request. For instance, if you want to create an incident with the
caller
,impact
,urgency
,business service
,configuration item
,short description
anddescription
, use the drop-down menu to select the proper fields from ServiceNow and then input text to assign values to them:If you want to add more fields, use the plus button to create as many new rows as necessary and fill in the information as described in the previous step. Below is an example of the final result:
CODE{ "short_description":"This is an issue create by a Nexthink Alert", "description":"Nexthink Alert {{alert_config.name}} has been triggered", "impact":"2", "urgency":"2", "cmdb_ci":"{{diagnostic.alerts.device}}", "caller_id":"Nexthink Integration" }
In Nexthink
Webhook Credential
For the Instance URL, use the Create Record URL from ServiceNow until the first slash, for example:
https://ven01063.service-now.com/
Choose the Basic option from the Authentication type drop-down list that utilizes the username and password you previously created in ServiceNow.
Webhook
When creating a new Webhook, fill in the Method and Resource fields with the information provided in Create Record in ServiceNow, for example:
Method: POST
Resource: api/now/table/incident
For the Payload field, copy the value created in the Request Body in ServiceNow. No formatting is needed.