---
title: Resolve a ServiceNow incident
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/servicenow/servicenow-incident-resolve
---

Resolves an existing incident in ServiceNow using the Table API.

For authentication setup, see [ServiceNow Incident actions](https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/servicenow/servicenow-incident).

## Inputs

| Input Field    | Optionality | Type   | Description                                                                                                                                                  | Example                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| -------------- | ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **domain**     | Required    | String | Domain of the ServiceNow instance. Used to construct the base URL `your-domain.service-now.com`.                                                             | `"your-domain"`                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **apiKey**     | Required    | String | ServiceNow REST API Key for authentication. Passed as the `x-sn-apikey` request header. Must be provided as a secret.                                        | `"${{ :secrets:serviceNowApiKey }}"`                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **sysId**      | Required    | String | Unique system ID of the incident to resolve. Must be a 32-character alphanumeric string (not UUID format).                                                   | `"fa7616894723b210f89ff3ac416d43c2"`                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **closeCode**  | Required    | String | Close code for the incident. See the close code reference table below.                                                                                       | `"User error"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **closeNotes** | Required    | String | Closing notes describing how the incident was resolved.                                                                                                      | `"Issue resolved by restarting the service"`                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **resolvedAt** | Optional    | String | Timestamp when the incident was resolved.                                                                                                                    | `"2024-03-11 10:30:00"`                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **resolvedBy** | Optional    | String | Username of the person who resolved the incident.                                                                                                            | `"john.doe"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **parameters** | Optional    | Map    | Optional URL query parameters for the ServiceNow API request. Controls the format and content of the API response. See the parameters reference table below. | `"{\"sysparm_fields\": \"name,short_description\", \"sysparm_exclude_reference_link\": \"true\", \"sysparm_input_display_value\": \"false\", \"sysparm_display_value\": \"true\"}"` See [now_table_api_latest_spec.json](https://drive.google.com/file/d/130EHXmvz42ZwGBrGMPU2RL7Qd_DRC97K/view) or [Export to OpenAPI specification](https://www.servicenow.com/docs/r/api-reference/rest-api-explorer/export-openapi-specification.html) for a list of accepted parameters. |
| **selectors**  | Optional    | List   |                                                                                                                                                              | `[{\"name\": \"incidentNumber\", \"expression\": \".responseBody.result.number\"}]`                                                                                                                                                                                                                                                                                                                                                                                           |

> #### ⚠️ COMMON URL PARAMETERS REFERENCE
>
> | Parameter                           | Type   | Description                                                                                              | Default   |
> | ----------------------------------- | ------ | -------------------------------------------------------------------------------------------------------- | --------- |
> | **sysparm_fields**                  | String | Comma-separated list of fields to return in the response.                                                |           |
> | **sysparm_exclude_reference_link**  | String | `true` or `false` to exclude reference links from the response.                                          | `false`   |
> | **sysparm_display_value**           | String | `true`, `false`, or `all` to return display values instead of actual values.                             | `false`   |
> | **sysparm_input_display_value**     | String | `true` or `false`. When `true`, sets field values using their display value instead of the actual value. | `false`   |
> | **sysparm_suppress_auto_sys_field** | String | `true` or `false`. When `true`, suppresses auto-generation of system fields.                             | `false`   |
> | **sysparm_view**                    | String | Renders the response according to a specific UI view. Overridden by `sysparm_fields`.                    | `default` |
> | **sysparm_query_no_domain**         | String | `true` or `false`. When `true`, allows access to data across domains if authorized.                      | `false`   |

> #### ⚠️ CLOSE CODE REFERENCE
>
> | Close code             |
> | ---------------------- |
> | Duplicate              |
> | User error             |
> | Known error            |
> | No resolution provided |
> | Resolved by caller     |
> | Resolved by change     |
> | Resolved by problem    |
> | Resolved by request    |
> | Solution provided      |
> | Workaround provided    |

## Outputs

| Output Field     | Type    | Example                                                                                                                                                                                             |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | ```yaml { "result": {     "number": "INC0019382",     "sys_id": "ed59ab193b67ba10e811026aa5e45a2d",     "short_description": "The server is on fire.",     ....     .... } } ```                    |
| **success**      | Boolean | `success: true | false`                                                                                                                                                                             |
| **errorMessage** | String  | ```yaml [   {     "success": false,     "errorMessage": "{\"error\":{\"message\":\"User Not Authenticated\",\"detail\":\"Required to provide Auth information\"},\"status\":\"failure\"}"   } ] ``` |

## Example

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ```yaml name: resolve-servicenow-incident description: to resolve a basic incident in ServiceNow steps:   - type: action     name: resolveIncident     action: serviceNow.incident.resolve     version: 1     inputs:       domain: "your-domain"       apiKey: "${{ :secrets:serviceNowApiKey }}"       sysId: "a62bcdbd476b3610f89ff3ac416d4357"       closeCode: "Duplicate"       closeNotes: "Issue resolved by restarting the application server"       resolvedAt: "2024-03-11 10:30:00"       resolvedBy: "john.doe"       parameters:         sysparm_display_value: "true"     next: end ``` |
