Automating major incident management
Problem
Managing major incidents for priority 1 (P1) and priority 2 (P2) tickets requires fast communication, root cause assignment, and consistent updates across teams. Handling these tasks manually causes delays and errors, and slows resolution in IT service management (ITSM) platforms such as ServiceNow. This extends downtime and reduces productivity.
Solution
Nexthink helps you automate major incident management (MIM) for P1 and P2 tickets by integrating with an ITSM solution such as ServiceNow. The integration consists of two parts:
A ServiceNow workflow built in ServiceNow Flow Designer, that creates the ticket, retrieves the devices of MIM team members, and queries Nexthink over the Nexthink Query Language (NQL) API.
A Nexthink workflow triggered by the ServiceNow workflow through the Nexthink Workflows API, that sends a Nexthink campaign to notify MIM team members, collects their response, and calls the ServiceNow API to move the ticket to the resolving team.
Prerequisites
Before you integrate ServiceNow with Nexthink for major incident management, ensure you have the following:
A Nexthink license including Flow — required to trigger a Nexthink workflow through the Workflows API, as described in Step 5: Trigger the Nexthink MIM workflow
ServiceNow integrated with Nexthink.
Nexthink API credentials (a client ID and client secret) created in your Nexthink instance — refer to API credentials for details.
Administrator permissions in both ServiceNow and Nexthink.
Integration flow
This integration automates the first part of the MIM notification process to ensure immediate awareness of P1 or P2 tickets and collaboration to find the root cause.
Retrieve MIM group members and devices
Once the P1 or P2 ticket exists, the ServiceNow workflow retrieves MIM group members from Active Directory (AD) through Lightweight Directory Access Protocol (LDAP) synchronization, checks the Configuration Management Database (CMDB) for their assigned devices, and gathers the necessary resources.
To retrieve MIM group members:
In ServiceNow, go to Flow Designer.
Click Create new, and select Action.

In the Action properties, fill in the relevant properties, and click Submit.
Click + to add a script that retrieves the users from the group and their devices.

Script example:
Generate an API authentication token
To obtain the token required for API transactions with Nexthink, create a REST step in the ServiceNow workflow with the following fields:
Connection: Define Connection Inline.
Base URL:
https://<instancename>.api.<region>.nexthink.cloudResource Path:
/oauth2/default/v1/tokenHTTP Method: POST
Headers:
Authorization: Basic <Base64 encoded clientId:clientSecret>. Encode your client ID and client secret in Base64 format to get this value.
Click the icon in the top-right corner to save the fields.
Send device information to the Nexthink API
The ServiceNow workflow retrieves the device names from the CMDB and sends them to the Nexthink API, which returns the Collector IDs associated with those devices. ServiceNow then uses this information to update the ticket.
Create a second REST step in the ServiceNow workflow with the following fields:
Connection: Define Connection Inline.
Base URL:
https://<instancename>.api.<region>.nexthink.cloudResource Path:
/api/v2/nql/executeHTTP Method: POST
Headers:
Accept: application/json,text/csv
Authorization: use the Data Picker — click the icon next to the field, and select 2 - Rest Step > Response Body. Apply the following filters using the Fx icon:
String > Split, with separator
"access_token":Utilities > Get Last Item from Array
String > Split, with separator
,"scope"Utilities > Get First Item from Array
Content-Type: application/json
Request Content: add the body content needed for the Nexthink API query execution, for example an NQL query.
Request body example:
Execute an NQL API Query in Nexthink that retrieves a list of the Collector UIDs for the devices sent. Use the following NQL query code:
Trigger the Nexthink MIM workflow
Before ServiceNow can trigger it, the Nexthink workflow that sends the MIM campaign and calls back to ServiceNow must already exist and be enabled for API calls.
In Nexthink:
Confirm you have an active Nexthink workflow with the following Workflow details:
Workflow name to automatically get a unique
workflowId— use this ID in the request body below.Ticked API checkbox to make the workflow available for API calls.
Ensure the Campaign thinklet within the workflow logic uses the related MIM campaign — you must have preconfigured and published in Nexthink — with an API trigger set up.
Confirm the campaign has only single-answer questions. Refer to the Notify MIM team members with a Nexthink campaign section on this page.
Ensure there is a Service/API thinklet after the Campaign thinklet within the workflow logic, to call back to ServiceNow.
With the Nexthink workflow ready, the ServiceNow workflow retrieves the Collector IDs for the devices belonging to MIM team members and sends this data through the Nexthink Workflows API to trigger the Nexthink workflow.
In ServiceNow:
Create a new REST step in the ServiceNow workflow with the following fields:
Connection: Define Connection Inline.
Base URL:
https://<instancename>.api.<region>.nexthink.cloudResource Path:
/api/v1/workflows/executeHTTP Method: POST
Headers:
Authorization: same Data Picker and filter steps as in Step 4, using the token generated in Step 3.
Content-Type: application/json
Request Body: add the body content needed to trigger the Nexthink Workflow.
Notify MIM team members with a Nexthink campaign
Once triggered, the Nexthink workflow — configured in Step 5: Trigger the Nexthink MIM workflow— sends an urgent Nexthink campaign to MIM team member devices, notifying them so they can take immediate action to resolve the issue.
The following screenshot displays how the MIM team members see the campaign:

The campaign includes the following:
General information: Details about the incident or issue.
Link to join the war room: A direct link for team members to join the virtual war room for real-time collaboration.
Two options for response:
Last updated
Was this helpful?






