ServiceNow - Incident management connector thinklet

Configure ServiceNow - Incident management connector thinklets to take specific actions within your workflow.

Action: Add affected configuration item to incident

Add affected configuration item to incident adds a task entry to the Affected CIs tab of the incident ticket.

The ServiceNow - Incident management connector thinklet relies on the Table incident POST API endpoint.

  • Parameters: Configure the data used as parameters for this action. Hover over the tooltip icon for more information on how the parameter is mapped and what data is required.

    • Incident number or ID

    • Affected configuration item name or ID

  • Outputs: View the outputs of the connector thinklet.

    • Task configuration item record ID (TaskCIRecordID)

The table below shows the API Service connector details needed when recreating the connector:

Field
Value

Resource Path

api/now/table/task_ci

Method

POST

Payload

{"ci_item": "{{AffectedConfigurationItemRefernce}}","task": "{{IncidentReference}}"}

Outputs

Task record id: $.result.sys_id

Action: Add incident work note

Add incident work note adds a work note for the incident ticket.

The ServiceNow - Incident management connector thinklet relies on the Table incident PATCH API endpoint.

image-20240604-120125.png
  • Name: Enter a unique name for the connector thinklet.

  • ID: The system generates the ID automatically based on the name.

  • Description (optional): Describe the purpose of the connector thinklet and what it does. This information is useful for other workflow users who may not be familiar with it.

  • Select action: Select the action to be performed.

  • Credentials: Select the connection credentials for the integration. Configure them first on the Connector credentials page of the Administration module. Refer to the Connector credentials documentation for more information.

  • Parameters: Configure the data used as parameters for this action. Hover over the tooltip icon for more information on how the parameter is mapped and what data is required.

    • ServiceNow ticket ID: Identification to track ServiceNow ticket

    • Device name: The name of the device

    • Work note: Work notes text populated for the incident

  • Outputs: View the outputs of the connector thinklet.

The table below shows the API Service connector details needed when recreating the connector:

Field
Value

Resource Path

/api/now/table/incident/{{ServiceNowTicketID}}

Method

PATCH

Payload

{"work_notes":"Device Name: {{DeviceName}}, {{WorkNote}}"}

Outputs

-

Action: Change incident assignment group

Change incident assignment group updates the Assignment group field of an incident ticket to the value provided by the input parameter.

The ServiceNow - Incident management connector thinklet relies on the Table incident POST API endpoint.

  • Parameters: Configure the data used as parameters for this action. Hover over the tooltip icon for more information on how the parameter is mapped and what data is required.

    • ServiceNow ticket ID

    • User group name

The table below shows the API Service connector details needed when recreating the connector:

Field
Value

Resource Path

api/now/table/incident/{{ServiceNowTicketID}}

Method

PATCH

Payload

{"assignment_group":"{{UserGroupName}}"}

Outputs

Action: Create incident

Create Incident creates a new ServiceNow incident ticket.

The ServiceNow - Incident management connector thinklet relies on the Table incident POST API endpoint.

image-20240604-114738.png
  • Parameters: Configure the data used as parameters for this action. Hover over the tooltip icon for more information on how the parameter is mapped and what data is required.

    • Device name: Name of the device

    • ServiceNow assignment group: Assignment group populated for the incident

    • Business service: Business service populated for the incident

    • Caller: Caller populated for the incident

    • Description: Description populated for the incident

    • Impact: Impact populated for the incident, 1- High, 2- Medium, 3- Low

    • Short description: Short description populated for the incident

    • Urgency: Urgency populated for the incident, 1- High, 2- Medium, 3- Low

  • Outputs: View the outputs of the connector thinklet.

    • ServiceNow ticket ID (ServiceNowTicketID): ServiceNow ticket ID

The table below shows the API Service connector details needed when recreating the connector:

Field
Value

Resource Path

/api/now/table/incident

Method

POST

Payload

{"assignment_group": "{{ServiceNowAssignmentGroup}}", "business_service": "{{BusinessService}}","caller_id": "{{Caller}}","description": "{{Description}}","impact": "{{Impact}}","short_description": "{{ShortDescription}}","urgency": "{{Urgency}}", "cmdb_ci": "{{DeviceName}}"}

Outputs

ServiceNowTicketID: $.result.sys_id

Action: Get user group details by name

Get user group details by name retrieves group details using group names as search criteria.

The ServiceNow - Incident management connector thinklet relies on the Table incident POST API endpoint.

  • Parameters: Configure the data used as parameters for this action. Hover over the tooltip icon for more information on how the parameter is mapped and what data is required.

    • User group name: Name of the group

  • Outputs: View the outputs of the connector thinklet.

    • Group ID (GroupID)

    • Default assignee (DefaultAssignee)

    • Group email address (GroupEmailAddress)

    • Group manager ID (GroupManagerID)

    • Group status (GroupStatus): Is the group active - true or false

The table below shows the API Service connector details needed when recreating the connector:

Field
Value

Resource Path

api/now/table/sys_user_group?sysparm_query=name={{UserGroupName}}

Method

GET

Payload

Outputs

GroupStatus $.result[0].active

DefaultAssignee $.result[0].default_assignee

GroupEmailAddress $.result[0].email

GroupManagerID $.result[0].manager.value

Action: Resolve incident

Resolve incident changes the incident ticket state to Resolved and updates the resolution code and resolution notes.

The ServiceNow - Incident management connector thinklet relies on the Table incident PATCH API endpoint.

image-20240604-121433.png
  • Parameters: Configure the data used as parameters for this action. Hover over the tooltip icon for more information on how the parameter is mapped and what data is required.

    • ServiceNow ticket ID

    • Resolution notes: Description of the resolution

    • Resolution code: Resolution code populated for the ticket, e.g., Solved (Permanently)

The table below shows the API Service connector details needed when recreating the connector:

Field
Value

Resource Path

/api/now/table/incident/{{ServiceNowTicketID}}

Method

PATCH

Payload

{"state":"6","close_code":"{{CloseCode}}","close_notes":"{{CloseNotes}}"}

Outputs

Action: Search for incident

Search for incident searches for existing incident tickets using the search string as the search criterion.

The ServiceNow - Incident management connector thinklet relies on the Table incident POST API endpoint.

  • Parameters: Configure the data used as parameters for this action. Hover over the tooltip icon for more information on how the parameter is mapped and what data is required.

    • Search query: An encoded query string used to filter the results

  • Outputs: View the outputs of the connector thinklet.

    • ServiceNow ticket ID (ServiceNowTicketID)

    • ServiceNow ticket number (ServiceNowTicketNumber)

    • Created on (SysCreatedOn)

    • Opened by ID (OpenedByID)

    • Created by (CreatedBy)

    • Updated on (UpdatedOn)

    • Updated by (UpdatedBy)

    • Caller ID (CallerID)

    • State (State)

    • Incident state (IncidentState)

    • Hold reason (HoldReason)

    • Resolved by (ResolvedBy)

    • CMDB CI ID (CmdbCi): Configuration Management Database (CMDB) Configuration Item (CI) ID

    • Business service ID (Business service ID)

    • Impact (Impact)

    • Business impact (BusinessImpact)

    • Severity (Severity)

    • Priority (Priority)

    • Short description (ShortDescription)

    • Resolved at (ResolvedAt)

    • Reopened time (ReopenedTime)

    • Close code (CloseCode)

    • AssignmentGroupID (AssignmentGroupID)

    • Ticket class name (TicketClassName)

    • Closed by (ClosedBy)

    • Assigned to ID (AssignedToID)

    • SLA due (SlaDue)

    • Due date (DueDate)

    • Category (Category)

The following example search string retrieves incident tickets created by the workflow user. It excludes incidents with a status of closed, resolved, or canceled, includes only those with workflow_name in the short description, and applies a limit to the number of records retrieved.

Example search string for an input parameter
state!=6^state!=7^state!=8^sys_created_by={{global.nexthink_workflow_user}}^short_descriptionLIKEworkflow_name&sysparm_limit=1

The table below shows the API Service connector details needed when recreating the connector:

Field
Value

Resource Path

api/now/table/incident?sysparm_query={{SearchQuery}}

Method

GET

Payload

Outputs

AssignedToID $.result[0].assigned_to.value

AssignmentGroupID $.result[0].assignment_group.value BusinessImpact $.result[0].business_impact

Business service ID $.result[0].business_service.value

CallerID $.result[0].caller_id.value

Category $.result[0].category

CloseCode $.result[0].close_code

ClosedBy $.result[0].closed_by

CmdbCi $.result[0].cmdb_ci.value

DueDate $.result[0].due_date

HoldReason $.result[0].hold_reason

Impact $.result[0].impact Incident

State $.result[0].incident_state

ServiceNowTicketNumber $.result[0].number

OpenedByID $.result[0].opened_by.value Priority $.result[0].priority

ReopenedTime $.result[0].reopened_time

ResolvedAt $.result[0].resolved_at

ResolvedBy $.result[0].resolved_by

Severity $.result[0].severity

ShortDescription $.result[0].short_description

SlaDue $.result[0].sla_due

State $.result[0].state

TicketClassName $.result[0].sys_class_name

Action: Set incident state

Set incident state changes the incident ticket State code to one of the following: 1- New, 2- In Progress, 7- Closed and 8- Canceled

The ServiceNow - Incident management connector thinklet relies on the Table incident PATCH API endpoint.

image-20240604-122044.png
  • Parameters: Configure the data used as parameters for this action. Hover over the tooltip icon for more information on how the parameter is mapped and what data is required.

    • ServiceNow ticket ID

    • State code: 1- New, 2- In Progress, 7- Closed, 8- Canceled

The table below shows the API Service connector details needed when recreating the connector:

Field
Value

Resource Path

api/now/table/incident/{{ServiceNowTicketID}}

Method

PATCH

Payload

{"incident_state":"{{StateCode}}"}

Outputs

Action: Set incident On Hold

Set incident On Hold sets the incident ticket to On Hold and updates the On hold reason.

The ServiceNow - Incident management connector thinklet relies on the Table incident PATCH API endpoint.

image-20240604-122509.png
  • Parameters: Configure the data used as parameters for this action. Hover over the tooltip icon for more information on how the parameter is mapped and what data is required.

    • ServiceNow ticket ID

    • On hold reason: 1- Awaiting Caller, 2- Awaiting Evidence, 3- Awaiting Problem, 4- Awaiting Vendor, 5- Awaiting Change

The table below shows the API Service connector details needed when recreating the connector:

Field
Value

Resource Path

api/now/table/incident/{{ServiceNowTicketID}}

Method

PATCH

Payload

Outputs

Last updated

Was this helpful?