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

Updates 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 update. Must be a 32-character alphanumeric string (not UUID format).                                                    | `"fa7616894723b210f89ff3ac416d43c2"`                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **fields**     | Required    | Map    | Incident fields to update in the ServiceNow incident. See the fields reference table below.                                                                  | `"{\"short_description\": \"Updated incident description\", \"state\": \"2\", \"work_notes\": \"Investigating the issue\", \"assigned_to\": \"john.doe\", \"priority\": \"2\"}"` See [JSON object format](https://www.servicenow.com/docs/r/api-reference/web-services/c_JSONObjectFormat.html) for a sample object.                                                                                                                                                          |
| **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`   |

> #### ⚠️ INCIDENTDATA FIELDS REFERENCE
>
> | Field                   | Type   |
> | ----------------------- | ------ |
> | **short_description**   | String |
> | **description**         | String |
> | **caller_id**           | String |
> | **category**            | String |
> | **subcategory**         | String |
> | **urgency**             | String |
> | **impact**              | String |
> | **priority**            | String |
> | **assignment_group**    | String |
> | **assigned_to**         | String |
> | **state**               | String |
> | **contact_type**        | String |
> | **business_service**    | String |
> | **cmdb_ci**             | String |
> | **comments**            | String |
> | **work_notes**          | String |
> | **opened_by**           | String |
> | **opened_at**           | String |
> | **correlation_id**      | String |
> | **correlation_display** | String |
> | **close_code**          | String |
> | **close_notes**         | String |
> | **resolved_by**         | String |
> | **resolved_at**         | String |

## Outputs

| Output Field     | Type    | Example                                                                                                                                                                                                                        |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **response**     | Object  | ```yaml { "result": {     "number": "INC0019382",     "sys_id": "ed59ab193b67ba10e811026aa5e45a2d",     "short_description": "The server is on fire.",     "description": "The server is on fire."     "priority": "3" } } ``` |
| **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: create-servicenow-update description: to update a incident in ServiceNow  steps:   - type: action     name: updateIncident     action: serviceNow.incident.update     version: 1     inputs:       domain: "your-domain"       apiKey: "${{ :secrets:serviceNowApiKey }}"       sysId: "ed59ab193b67ba10e811026aa5e45a2d"       fields:          short_description: "Test incident from New Relic WFA"         assigned_to: "npitchuka"         contact_type: "slack"       parameters:         sysparm_display_value: "true"         sysparm_fields: "number,short_description,description,priority,sys_id"       selectors:         - name: sysId           expression: .responseBody.result.sys_id     next: end ``` |
