ServiceNow

Get ServiceNow Incident Status

Looks up one ServiceNow incident by its number and returns its state.

Unverified

Add this first. This tool needs an access token, so add Get ServiceNow Access Token to the same bot. The bot calls it first and passes the token in.

What the model is told

Get a ServiceNow access token first if you do not already have one. Look up an incident using the incident number the customer gives you, such as INC0010002. The response has a result array. The first item has number, sys_id (needed by the other incident tools), state, urgency and short_description. If result is empty, tell the customer you could not find it. Only share the state and summary with the customer.

Request

GEThttps://YOUR_INSTANCE.service-now.com/api/now/table/incident?sysparm_query=number={{incidentNumber}}&sysparm_limit=1&sysparm_display_value=true&sysparm_fields=number,sys_id,state,urgency,short_description

Headers

  • AuthorizationBearer {{accessToken}}
  • Acceptapplication/json

Parameters

  • incidentNumber stringThe incident number, starting with INC.
  • accessToken stringThe access_token value returned by Get ServiceNow Access Token. Reuse it for the rest of the conversation.

Engage payload

{
  "source": "VOICE_AI",
  "tool": {
    "id": "e4bdd0d0-2a41-4da1-9030-f7066de891e2",
    "type": "HTTP_REQUEST",
    "label": "Get ServiceNow Incident Status",
    "name": "get_servicenow_incident_status",
    "customName": false,
    "description": "Get a ServiceNow access token first if you do not already have one. Look up an incident using the incident number the customer gives you, such as INC0010002. The response has a result array. The first item has number, sys_id (needed by the other incident tools), state, urgency and short_description. If result is empty, tell the customer you could not find it. Only share the state and summary with the customer.",
    "parameters": [
      {
        "name": "incidentNumber",
        "type": "string",
        "description": "The incident number, starting with INC."
      },
      {
        "name": "accessToken",
        "type": "string",
        "description": "The access_token value returned by Get ServiceNow Access Token. Reuse it for the rest of the conversation."
      }
    ],
    "config": {
      "endpoint": {
        "method": "GET",
        "url": "https://YOUR_INSTANCE.service-now.com/api/now/table/incident?sysparm_query=number={{incidentNumber}}&sysparm_limit=1&sysparm_display_value=true&sysparm_fields=number,sys_id,state,urgency,short_description"
      },
      "headers": [
        {
          "name": "Authorization",
          "value": "Bearer {{accessToken}}"
        },
        {
          "name": "Accept",
          "value": "application/json"
        }
      ],
      "body": null,
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.