# ServiceNow

> Raise and update ServiceNow incidents, change requests and problems, look up users and groups, and read or write any table on the instance.

App · Help Desk · 20 actions. Web page: https://docs.lodol.com/docs/integrations/servicenow

## Actions

### Add incident comment

Add a comment or an internal work note to an incident's activity log. An additional comment is visible to the caller and notifies them; a work note is not.

**Inputs**

- Incident (`incident`, text, required): The incident's number or sys_id.
- Comment (`comment`, text, required): The text to add.
- Kind of note (`comment_type`, text): Whether the caller can see it. Defaults to an additional comment. One of: `comments` (Additional comment (the caller can see it)), `work_notes` (Work note (internal, agents only)).

**Outputs**

- `comment_type` (text)
- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "comment_type": "comments",
  "number": "INC0010023",
  "record": {
    "number": "INC0010023",
    "priority": "3",
    "short_description": "Printer on the second floor is offline",
    "state": "2",
    "sys_id": "9c573169c611228700193229fff72400"
  },
  "status": "success",
  "sys_id": "9c573169c611228700193229fff72400",
  "table": "incident",
  "url": "https://dev12345.service-now.com/incident.do?sys_id=9c573169c611228700193229fff72400"
}
```

### Create change request

Raise a change request, with its type, risk, planned window and the plans a change board expects to read.

**Inputs**

- Summary (`short_description`, text, required): One line describing the issue. This is the record's headline.
- Description (`description`, text): The full details, as much as you have.
- Type (`change_type`, text): Normal goes to the change board, standard is pre-approved, emergency skips ahead.
- Category (`category`, text): What is being changed - hardware, software, network.
- Risk (`risk`, text): How risky the change is judged to be.
- Impact (`impact`, text): How widely the issue is felt. Together with urgency this sets the priority, which is why priority itself cannot be written directly.
- Planned start (`start_date`, date and time): When the change is planned to begin. Stored in UTC.
- Planned end (`end_date`, date and time): When the change is planned to finish. Stored in UTC.
- Justification (`justification`, text): Why the change is worth making, and what happens if it is not.
- Implementation plan (`implementation_plan`, text): The steps to carry the change out, in order.
- Backout plan (`backout_plan`, text): How to put things back if the change goes wrong.
- Test plan (`test_plan`, text): How the change will be tested before and after.
- Assign to (`assigned_to`, text): The person to assign this to - their user name, email address or sys_id. Use List users to find one. Leave empty to leave it unassigned.
- Assignment group (`assignment_group`, text): The group to assign this to - its name or sys_id. Use List groups to find one. Groups are not offered as a dropdown because an instance can hold thousands of them.

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "CHG0030041",
  "record": {
    "number": "CHG0030041",
    "short_description": "Patch the reporting database",
    "state": "-5",
    "sys_id": "3a2d1c4b47410200e90d87e8dee49036",
    "type": "normal"
  },
  "status": "success",
  "sys_id": "3a2d1c4b47410200e90d87e8dee49036",
  "table": "change_request",
  "url": "https://dev12345.service-now.com/change_request.do?sys_id=3a2d1c4b47410200e90d87e8dee49036"
}
```

### Create incident

Raise a ServiceNow incident, and optionally set the caller, category, impact, urgency, state, assignee and group.

**Inputs**

- Summary (`short_description`, text, required): One line describing the issue. This is the record's headline.
- Description (`description`, text): The full details, as much as you have.
- Caller (`caller`, text): The person the incident is for - their user name, email address or sys_id. Leave empty to file it under the connected account.
- Category (`category`, text): Which kind of service the issue is about.
- Subcategory (`subcategory`, text): A narrower classification inside the category. It has to be one the chosen category allows, so set the category first.
- Impact (`impact`, text): How widely the issue is felt. Together with urgency this sets the priority, which is why priority itself cannot be written directly.
- Urgency (`urgency`, text): How soon it needs attention.
- State (`state`, text): Which state to open the incident in.
- Assign to (`assigned_to`, text): The person to assign this to - their user name, email address or sys_id. Use List users to find one. Leave empty to leave it unassigned.
- Assignment group (`assignment_group`, text): The group to assign this to - its name or sys_id. Use List groups to find one. Groups are not offered as a dropdown because an instance can hold thousands of them.
- Work note (`work_notes`, text): An internal note to add to the record's activity log. Only people with a role can read it.

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "INC0010023",
  "record": {
    "number": "INC0010023",
    "priority": "3",
    "short_description": "Printer on the second floor is offline",
    "state": "2",
    "sys_id": "9c573169c611228700193229fff72400"
  },
  "status": "success",
  "sys_id": "9c573169c611228700193229fff72400",
  "table": "incident",
  "url": "https://dev12345.service-now.com/incident.do?sys_id=9c573169c611228700193229fff72400"
}
```

### Create problem

Open a problem record for the underlying cause behind one or more incidents.

**Inputs**

- Summary (`short_description`, text, required): One line describing the issue. This is the record's headline.
- Description (`description`, text): The full details, as much as you have.
- Impact (`impact`, text): How widely the issue is felt. Together with urgency this sets the priority, which is why priority itself cannot be written directly.
- Urgency (`urgency`, text): How soon it needs attention.
- Assign to (`assigned_to`, text): The person to assign this to - their user name, email address or sys_id. Use List users to find one. Leave empty to leave it unassigned.
- Assignment group (`assignment_group`, text): The group to assign this to - its name or sys_id. Use List groups to find one. Groups are not offered as a dropdown because an instance can hold thousands of them.
- Work note (`work_notes`, text): An internal note to add to the record's activity log. Only people with a role can read it.

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "PRB0040012",
  "record": {
    "number": "PRB0040012",
    "short_description": "Reporting database runs out of connections weekly",
    "state": "1",
    "sys_id": "d7296d02c0a801670085e737da016e70"
  },
  "status": "success",
  "sys_id": "d7296d02c0a801670085e737da016e70",
  "table": "problem",
  "url": "https://dev12345.service-now.com/problem.do?sys_id=d7296d02c0a801670085e737da016e70"
}
```

### Create user

Add a person to ServiceNow. Only the user name is required, and it has to be unique across the instance. No password is set, so the record cannot sign in until an administrator gives it one.

**Inputs**

- User name (`user_name`, text, required): The sign-in name, unique across the instance - often the email address or an employee id.
- First name (`first_name`, text): Their given name.
- Last name (`last_name`, text): Their family name.
- Email (`email`, text): Their email address.
- Job title (`title`, text): Their job title.
- Phone (`phone`, text): Their business phone number.
- Department (`department`, text): The department they belong to.
- Active (`active`, true/false): Off creates the record deactivated. Default: `true`.

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": null,
  "record": {
    "active": "true",
    "email": "sam.rivera@example.com",
    "name": "Sam Rivera",
    "sys_id": "62826bf03710200044e0bfc8bcbe5df1",
    "user_name": "sam.rivera"
  },
  "status": "success",
  "sys_id": "62826bf03710200044e0bfc8bcbe5df1",
  "table": "sys_user",
  "url": "https://dev12345.service-now.com/sys_user.do?sys_id=62826bf03710200044e0bfc8bcbe5df1"
}
```

### Delete record

Delete one record from any table by its sys_id - an incident, a change request, a user, anything the connected user is allowed to delete. This is permanent.

**Inputs**

- Table (`table`, text, required): The table's technical name, the one in the URL - 'incident', 'sys_user', 'sc_request', 'cmdb_ci_server'. Not its label.
- Record id (`sys_id`, text, required): The record's sys_id - 32 hexadecimal characters. A record URL copied from ServiceNow works too; the id is read out of it.

**Outputs**

- `deleted` (true/false)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)

**Example output**

```json
{
  "deleted": true,
  "status": "success",
  "sys_id": "9c573169c611228700193229fff72400",
  "table": "incident"
}
```

### Get change request

Read every field of one change request, by its number (CHG0030041) or its sys_id.

**Inputs**

- Change request (`change_request`, text, required): The change request's number or sys_id.
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "CHG0030041",
  "record": {
    "number": "CHG0030041",
    "short_description": "Patch the reporting database",
    "state": "-5",
    "sys_id": "3a2d1c4b47410200e90d87e8dee49036",
    "type": "normal"
  },
  "status": "success",
  "sys_id": "3a2d1c4b47410200e90d87e8dee49036",
  "table": "change_request",
  "url": "https://dev12345.service-now.com/change_request.do?sys_id=3a2d1c4b47410200e90d87e8dee49036"
}
```

### Get incident

Read every field of one incident, by its number (INC0010023) or its sys_id.

**Inputs**

- Incident (`incident`, text, required): The incident number as ServiceNow shows it, or its sys_id. A record URL works too.
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "INC0010023",
  "record": {
    "number": "INC0010023",
    "priority": "3",
    "short_description": "Printer on the second floor is offline",
    "state": "2",
    "sys_id": "9c573169c611228700193229fff72400"
  },
  "status": "success",
  "sys_id": "9c573169c611228700193229fff72400",
  "table": "incident",
  "url": "https://dev12345.service-now.com/incident.do?sys_id=9c573169c611228700193229fff72400"
}
```

### Get problem

Read every field of one problem, by its number (PRB0040012) or its sys_id.

**Inputs**

- Problem (`problem`, text, required): The problem's number or sys_id.
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "PRB0040012",
  "record": {
    "number": "PRB0040012",
    "short_description": "Reporting database runs out of connections weekly",
    "state": "1",
    "sys_id": "d7296d02c0a801670085e737da016e70"
  },
  "status": "success",
  "sys_id": "d7296d02c0a801670085e737da016e70",
  "table": "problem",
  "url": "https://dev12345.service-now.com/problem.do?sys_id=d7296d02c0a801670085e737da016e70"
}
```

### Get record

Read one record of any table by its sys_id.

**Inputs**

- Table (`table`, text, required): The table's technical name, the one in the URL - 'incident', 'sys_user', 'sc_request', 'cmdb_ci_server'. Not its label.
- Record id (`sys_id`, text, required): The record's sys_id - 32 hexadecimal characters. A record URL copied from ServiceNow works too; the id is read out of it.
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "REQ0010004",
  "record": {
    "number": "REQ0010004",
    "sys_id": "1c832706c0a8016400d8a125ca7957e2"
  },
  "status": "success",
  "sys_id": "1c832706c0a8016400d8a125ca7957e2",
  "table": "sc_request",
  "url": "https://dev12345.service-now.com/sc_request.do?sys_id=1c832706c0a8016400d8a125ca7957e2"
}
```

### Get user

Read every field of one user, by sys_id, user name or email address - the usual way to turn an email address into the sys_id an assignment needs.

**Inputs**

- User (`user`, text, required): Their sys_id, user name or email address.
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": null,
  "record": {
    "active": "true",
    "email": "sam.rivera@example.com",
    "name": "Sam Rivera",
    "sys_id": "62826bf03710200044e0bfc8bcbe5df1",
    "user_name": "sam.rivera"
  },
  "status": "success",
  "sys_id": "62826bf03710200044e0bfc8bcbe5df1",
  "table": "sys_user",
  "url": "https://dev12345.service-now.com/sys_user.do?sys_id=62826bf03710200044e0bfc8bcbe5df1"
}
```

### List change requests

List change requests, filtered by state, type or group, or by any ServiceNow encoded query.

**Inputs**

- Filter (`query`, text): A ServiceNow encoded query, the same string the list view's filter builder produces under Copy query. Combined with the fields above rather than replacing them.
- State (`state`, text): Only changes in this state.
- Type (`change_type`, text): Only changes of this type.
- Assignment group (`assignment_group`, text): Only changes assigned to this group - name or sys_id.
- Open records only (`active_only`, true/false): On hides anything already closed or cancelled. Default: `false`.
- How many (`limit`, number): How many records to return (1-100). From 1 to 100. Default: `25`.
- Skip (`offset`, number): How many records to skip before the first one returned. Use it with How many to read a second or third page. At least 0.
- Sort by (`order_by`, text): Which field to order the records by. One of: `number`, `opened_at` (Opened), `priority`, `short_description` (Short description), `state`, `sys_created_on` (Created), `sys_updated_on` (Last updated).
- Order (`order`, text): Which end of the list to start from. One of: `asc` (Oldest first), `desc` (Newest first).
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `count` (number)
- `records` (list)
- `status` (text): Status of the action execution ("success" on success).
- `table` (text)
- `total_count` (number)

**Example output**

```json
{
  "count": 1,
  "records": [
    {
      "number": "CHG0030041",
      "short_description": "Patch the reporting database",
      "sys_id": "3a2d1c4b47410200e90d87e8dee49036"
    }
  ],
  "status": "success",
  "table": "change_request",
  "total_count": 7
}
```

### List groups

List the assignment groups on the instance, with their sys_ids - how a workflow turns a group name into something it can assign to.

**Inputs**

- Filter (`query`, text): A ServiceNow encoded query.
- Active groups only (`active_only`, true/false): On hides groups that are no longer in use. Default: `true`.
- How many (`limit`, number): How many records to return (1-100). From 1 to 100. Default: `25`.
- Skip (`offset`, number): How many records to skip before the first one returned. Use it with How many to read a second or third page. At least 0.
- Sort by (`order_by`, text): Which field to order the records by. One of: `name`, `sys_created_on` (Created), `sys_id` (Record id), `sys_updated_on` (Last updated).
- Order (`order`, text): Which end of the list to start from. One of: `asc` (Oldest first), `desc` (Newest first).

**Outputs**

- `count` (number)
- `records` (list)
- `status` (text): Status of the action execution ("success" on success).
- `table` (text)
- `total_count` (number)

**Example output**

```json
{
  "count": 1,
  "records": [
    {
      "name": "Service Desk",
      "sys_id": "d625dccec0a8016700a222a0f7900d06"
    }
  ],
  "status": "success",
  "table": "sys_user_group",
  "total_count": 18
}
```

### List incidents

List incidents, filtered by state, assignee, group or caller, or by any ServiceNow encoded query.

**Inputs**

- Filter (`query`, text): A ServiceNow encoded query, the same string the list view's filter builder produces under Copy query. Combined with the fields above rather than replacing them.
- State (`state`, text): Only incidents in this state.
- Assigned to (`assigned_to`, text): Only incidents assigned to this person - user name, email address or sys_id.
- Assignment group (`assignment_group`, text): Only incidents assigned to this group - its name or sys_id.
- Caller (`caller`, text): Only incidents raised for this person - user name, email address or sys_id.
- Open records only (`active_only`, true/false): On hides anything already closed or cancelled. Default: `false`.
- How many (`limit`, number): How many records to return (1-100). From 1 to 100. Default: `25`.
- Skip (`offset`, number): How many records to skip before the first one returned. Use it with How many to read a second or third page. At least 0.
- Sort by (`order_by`, text): Which field to order the records by. One of: `number`, `opened_at` (Opened), `priority`, `short_description` (Short description), `state`, `sys_created_on` (Created), `sys_updated_on` (Last updated).
- Order (`order`, text): Which end of the list to start from. One of: `asc` (Oldest first), `desc` (Newest first).
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `count` (number)
- `records` (list)
- `status` (text): Status of the action execution ("success" on success).
- `table` (text)
- `total_count` (number)

**Example output**

```json
{
  "count": 1,
  "records": [
    {
      "number": "INC0010023",
      "short_description": "Printer on the second floor is offline",
      "sys_id": "9c573169c611228700193229fff72400"
    }
  ],
  "status": "success",
  "table": "incident",
  "total_count": 42
}
```

### List problems

List problem records, filtered by group or by any ServiceNow encoded query.

**Inputs**

- Filter (`query`, text): A ServiceNow encoded query, the same string the list view's filter builder produces under Copy query. Combined with the fields above rather than replacing them.
- Assignment group (`assignment_group`, text): Only problems assigned to this group - name or sys_id.
- Open records only (`active_only`, true/false): On hides anything already closed or cancelled. Default: `false`.
- How many (`limit`, number): How many records to return (1-100). From 1 to 100. Default: `25`.
- Skip (`offset`, number): How many records to skip before the first one returned. Use it with How many to read a second or third page. At least 0.
- Sort by (`order_by`, text): Which field to order the records by. One of: `number`, `opened_at` (Opened), `priority`, `short_description` (Short description), `state`, `sys_created_on` (Created), `sys_updated_on` (Last updated).
- Order (`order`, text): Which end of the list to start from. One of: `asc` (Oldest first), `desc` (Newest first).
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `count` (number)
- `records` (list)
- `status` (text): Status of the action execution ("success" on success).
- `table` (text)
- `total_count` (number)

**Example output**

```json
{
  "count": 1,
  "records": [
    {
      "number": "PRB0040012",
      "short_description": "Reporting database runs out of connections",
      "sys_id": "d7296d02c0a801670085e737da016e70"
    }
  ],
  "status": "success",
  "table": "problem",
  "total_count": 3
}
```

### List records

Read records from any table on the instance - requests, catalog tasks, configuration items, a custom table - with a ServiceNow encoded query.

**Inputs**

- Table (`table`, text, required): The table's technical name, the one in the URL - 'incident', 'sys_user', 'sc_request', 'cmdb_ci_server'. Not its label.
- Filter (`query`, text): A ServiceNow encoded query, the same string the list view's filter builder produces under Copy query.
- Only these fields (`return_fields`, list): Return just these columns instead of every one. Leave empty for the whole record.
- How many (`limit`, number): How many records to return (1-100). From 1 to 100. Default: `25`.
- Skip (`offset`, number): How many records to skip before the first one returned. Use it with How many to read a second or third page. At least 0.
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `count` (number)
- `records` (list)
- `status` (text): Status of the action execution ("success" on success).
- `table` (text)
- `total_count` (number)

**Example output**

```json
{
  "count": 1,
  "records": [
    {
      "number": "REQ0010004",
      "sys_id": "1c832706c0a8016400d8a125ca7957e2"
    }
  ],
  "status": "success",
  "table": "sc_request",
  "total_count": 12
}
```

### List users

List users, filtered by department or by any ServiceNow encoded query - for example a name that starts with 'Riv'.

**Inputs**

- Filter (`query`, text): A ServiceNow encoded query. Combined with the fields below rather than replacing them.
- Department (`department`, text): Only users in this department.
- Active users only (`active_only`, true/false): On hides deactivated users. Default: `false`.
- How many (`limit`, number): How many records to return (1-100). From 1 to 100. Default: `25`.
- Skip (`offset`, number): How many records to skip before the first one returned. Use it with How many to read a second or third page. At least 0.
- Sort by (`order_by`, text): Which field to order the records by. One of: `name`, `sys_created_on` (Created), `sys_id` (Record id), `sys_updated_on` (Last updated).
- Order (`order`, text): Which end of the list to start from. One of: `asc` (Oldest first), `desc` (Newest first).
- Values to return (`display_values`, text): ServiceNow stores a choice as a number and shows a label. Stored values are what another step can compare or write back; display values are what a person reads. Defaults to stored values. One of: `false` (Stored values (1, 2, 3)), `true` (Display values (High, Medium, Low)), `all` (Both).

**Outputs**

- `count` (number)
- `records` (list)
- `status` (text): Status of the action execution ("success" on success).
- `table` (text)
- `total_count` (number)

**Example output**

```json
{
  "count": 1,
  "records": [
    {
      "name": "Sam Rivera",
      "sys_id": "62826bf03710200044e0bfc8bcbe5df1",
      "user_name": "sam.rivera"
    }
  ],
  "status": "success",
  "table": "sys_user",
  "total_count": 1204
}
```

### Update change request

Change a change request's summary, state, risk, planned window, plans, assignee or group. Only the fields you set are changed.

**Inputs**

- Change request (`change_request`, text, required): The change request's number or sys_id.
- Summary (`short_description`, text): Replace the change's headline.
- Description (`description`, text): The full details, as much as you have.
- State (`state`, text): Move the change to this state.
- Risk (`risk`, text): Change how risky it is judged to be.
- Impact (`impact`, text): How widely the issue is felt. Together with urgency this sets the priority, which is why priority itself cannot be written directly.
- Planned start (`start_date`, date and time): Move the planned start. Stored in UTC.
- Planned end (`end_date`, date and time): Move the planned end. Stored in UTC.
- Implementation plan (`implementation_plan`, text): Replace the implementation plan.
- Backout plan (`backout_plan`, text): Replace the backout plan.
- Test plan (`test_plan`, text): Replace the test plan.
- Assign to (`assigned_to`, text): The person to assign this to - their user name, email address or sys_id. Use List users to find one. Leave empty to leave it unassigned.
- Assignment group (`assignment_group`, text): The group to assign this to - its name or sys_id. Use List groups to find one. Groups are not offered as a dropdown because an instance can hold thousands of them.
- Work note (`work_notes`, text): An internal note to add to the record's activity log. Only people with a role can read it.

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "CHG0030041",
  "record": {
    "number": "CHG0030041",
    "short_description": "Patch the reporting database",
    "state": "-5",
    "sys_id": "3a2d1c4b47410200e90d87e8dee49036",
    "type": "normal"
  },
  "status": "success",
  "sys_id": "3a2d1c4b47410200e90d87e8dee49036",
  "table": "change_request",
  "url": "https://dev12345.service-now.com/change_request.do?sys_id=3a2d1c4b47410200e90d87e8dee49036"
}
```

### Update incident

Change an incident's summary, state, impact, urgency, category, assignee, group or resolution. Only the fields you set are changed. Resolving an incident is this action with the state set to Resolved and a close code and close notes filled in.

**Inputs**

- Incident (`incident`, text, required): The incident's number or sys_id.
- Summary (`short_description`, text): Replace the incident's headline.
- Description (`description`, text): The full details, as much as you have.
- State (`state`, text): Move the incident to this state.
- On-hold reason (`hold_reason`, text): Why the incident is waiting. Only meaningful while the state is On Hold.
- Impact (`impact`, text): How widely the issue is felt. Together with urgency this sets the priority, which is why priority itself cannot be written directly.
- Urgency (`urgency`, text): How soon it needs attention.
- Category (`category`, text): Change which kind of service the issue is about.
- Subcategory (`subcategory`, text): A narrower classification inside the category.
- Assign to (`assigned_to`, text): The person to assign this to - their user name, email address or sys_id. Use List users to find one. Leave empty to leave it unassigned.
- Assignment group (`assignment_group`, text): The group to assign this to - its name or sys_id. Use List groups to find one. Groups are not offered as a dropdown because an instance can hold thousands of them.
- Resolution code (`close_code`, text): How the incident was resolved.
- Resolution notes (`close_notes`, text): What was done to resolve it.
- Work note (`work_notes`, text): An internal note to add to the record's activity log. Only people with a role can read it.

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "INC0010023",
  "record": {
    "number": "INC0010023",
    "priority": "3",
    "short_description": "Printer on the second floor is offline",
    "state": "2",
    "sys_id": "9c573169c611228700193229fff72400"
  },
  "status": "success",
  "sys_id": "9c573169c611228700193229fff72400",
  "table": "incident",
  "url": "https://dev12345.service-now.com/incident.do?sys_id=9c573169c611228700193229fff72400"
}
```

### Update record

Write fields onto any record by its sys_id. Only the fields you name are changed; every other column keeps its value.

**Inputs**

- Table (`table`, text, required): The table's technical name, the one in the URL - 'incident', 'sys_user', 'sc_request', 'cmdb_ci_server'. Not its label.
- Record id (`sys_id`, text, required): The record's sys_id - 32 hexadecimal characters. A record URL copied from ServiceNow works too; the id is read out of it.
- Fields to set (`fields`, object, required): The columns to write, by their technical names - 'short_description', not 'Short description'.

**Outputs**

- `number` (text)
- `record` (object)
- `status` (text): Status of the action execution ("success" on success).
- `sys_id` (text)
- `table` (text)
- `url` (text)

**Example output**

```json
{
  "number": "REQ0010004",
  "record": {
    "number": "REQ0010004",
    "sys_id": "1c832706c0a8016400d8a125ca7957e2"
  },
  "status": "success",
  "sys_id": "1c832706c0a8016400d8a125ca7957e2",
  "table": "sc_request",
  "url": "https://dev12345.service-now.com/sc_request.do?sys_id=1c832706c0a8016400d8a125ca7957e2"
}
```
