Service Now Service Now: Incidents

Summary

This module contains actions related to ServiceNow Incidents.

Actions

service_now.incidents.

get_by_number

Get one or more incidents by number.

Minimum Plugin Version: 1.0.0

Input
Output

A list of Incident Dictionaries.

Example
1
2
3
4
5
- service_now.incidents.get_by_number:
    number: TEST-INCIDENT
  load:
    access_details: service_now_api_info
  save: test_incidents

service_now.incidents.

get_by_number_interactive

Interactively search for an incident using the number field.

Minimum Plugin Version: 1.0.0

Input
Output

An Incident Dictionary.

Example
1
2
3
4
- service_now.incidents.get_by_number_interactive:
  load:
    access_details: service_now_api_info
  save: incident

service_now.incidents.

output_table

Display a list of incidents in a table.

The table will have the following columns:

  • Number
  • Short Description
  • Active

Minimum Plugin Version: 2.0.0

Input
Output

Nothing is outputted by this action.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
- service_now.users.search:
    user_name: john.smith
  load:
    access_details: service_now_api_info
  save: users

- ppa_tools.lists.get_first_item:
  load:
    items: users
  save: user

- service_now.incidents.search:
  load:
    assigned_to: user.sys_id
    access_details: service_now_api_info
  save: user_incidents

- service_now.incidents.output_table:
    text: Incidents for {{ user.user_name }}
  load:
    incident_list: user_incidents

service_now.incidents.

Search for incidents. Supports multiple search fields and values.

Advanced search techniques & filters are not supported yet.

Each supplied field & value will be converted to field=value in the search query.

Minimum Plugin Version: 2.0.0

Input
Output

A list of Incident Dictionaries.

Example

Searching for all active incidents.

1
2
3
4
5
- service_now.incidents.search:
    active: true
  load:
    access_details: service_now_api_info
  save: active_incidents

service_now.incidents.

update

Update an incident using one or more sets of fields & values

Minimum Plugin Version: 1.0.0

Input
Output

The updated incident as an Incident Dictionary.

Example

Resolving a incident TEST-INCIDENT with a comment and note.

1
2
3
4
5
6
7
8
9
- service_now.incidents.update:
    number: TEST-INCIDENT
    state: 6
    close_notes: Resolved via PPA
    comment: Resolving an incident from a PPA task
  load:
    access_details: service_now_api_info
    sys_id: incident.sys_id
  save: resolved_incident