Service Now: Incidents
Summary
This module contains actions related to ServiceNow Incidents.
Actions
service_now.incidents.
choose_close_code
Get valid incident close codes from ServiceNow & allow the Task Operator to choose one.
Minimum Plugin Version: 2.1.0
Input
- access_details: an AccessDetails Dictionary
Output
The chosen close code as a string.
Example
1 2 3 4 5 6 7 8 9 10 |
|
service_now.incidents.
choose_priority
Get valid incident priorities from ServiceNow & allow the Task Operator to choose one.
Minimum Plugin Version: 3.0.0
Input
- access_details: an AccessDetails Dictionary
Output
A dictionary containing the name
& value
for the chosen priority.
Example
1 2 3 4 5 6 7 8 9 10 |
|
service_now.incidents.
choose_state
Get valid incident statuses from ServiceNow & allow the Task Operator to choose one.
Minimum Plugin Version: 3.0.0
??? info "Input"
- __access_details:__ an [AccessDetails Dictionary](../inputs_outputs/#accessdetails)
??? success "Output"
A dictionary containing the name
& value
for the chosen state.
??? example
```YAML linenums="1"
- service_now.incidents.choose_state:
load:
access_details: service_now_api_info
save: chosen_state
- service_now.incidents.update:
load:
sys_id: incident.sys_id
state: chosen_state
access_details: service_now_api_info
```
service_now.incidents.
get_by_number
Get an incident by its number.
Minimum Plugin Version: 4.0.0
Input
-
access_details: an AccessDetails Dictionary
-
number: the incident number to search for
Output
A single Incident Dictionary.
Incident Numbers
ServiceNow incident numbers are not unique by default, but for simplicity this action assumes they are.
If you do have shared incident numbers, you can use the search action to get multiples.
Example
1 2 3 4 5 |
|
service_now.incidents.
get_by_number_interactive
Interactively search for an incident using the number field.
Minimum Plugin Version: 1.0.0
Input
- access_details: an AccessDetails Dictionary
Output
Example
1 2 3 4 |
|
service_now.incidents.
get_valid_close_codes
Get valid incident close codes from the ServiceNow configuration.
Minimum Plugin Version: 3.0.0
Input
- access_details: an AccessDetails Dictionary
Output
A list of close codes in the following format:
1 2 3 4 5 6 7 |
|
Example
1 2 3 4 |
|
service_now.incidents.
get_valid_priorities
Get valid incident priorities from the ServiceNow configuration.
Minimum Plugin Version: 3.0.0
Input
- access_details: an AccessDetails Dictionary
Output
A dictionary of priorities in the following format:
1 2 3 4 5 |
|
Example
1 2 3 4 |
|
service_now.incidents.
get_valid_states
Get valid incident states from the ServiceNow configuration.
Minimum Plugin Version: 3.0.0
Input
- access_details: an AccessDetails Dictionary
Output
A dictionary of states in the following format:
1 2 3 4 5 6 |
|
Example
1 2 3 4 |
|
service_now.incidents.
input_table
Display a list of incidents in a table, & allow the task operator to make a selection.
The table will have the following columns:
- Number
- Short Description
- State
- Assigned To
- Active
Minimum Plugin Version: 3.0.0
Input
-
text: The title of the table
-
incident_list: A list of Incident Dictionaries to display in the table
-
minimum: The minimum number of acceptable selections
-
maximum: The maximum number of acceptable selections
Output
A list of Incident Dictionaries.
Tip
- If neither a minimum or maximum is provided, the task operator will be able to submit 0 selections.
- If minimum or maximum are provided, the operation will repeat until the task operator makes a valid number of selections.
Example
1 2 3 4 5 6 7 8 9 10 11 12 |
|
service_now.incidents.
output_table
Display a list of incidents in a table.
The table will have the following columns:
- Number
- Short Description
- State
- Assigned To
- Active
Minimum Plugin Version: 2.0.0
Input
-
text: the title of the table
-
incident_list: a list of Incident Dictionaries to display in the table
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.incidents.
search
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
-
access_details: an AccessDetails Dictionary
-
search_params: a dictionary containing Incident fields and values
Output
A list of Incident Dictionaries.
Example
Searching for all active incidents.
1 2 3 4 5 |
|
service_now.incidents.
update
Update an incident using one or more sets of fields & values
Minimum Plugin Version: 1.0.0
Input
-
access_details: an AccessDetails Dictionary
-
sys_id: the sys_id of the incident to update
-
update_data: a dictionary containing Incident Dictionary fields and values
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 |
|