Your use of this download is governed by Stonebranch’s Terms of Use, which are available at https://www.stonebranch.com/integration-hub/Terms-and-Privacy/Terms-of-Use/
ServiceNow aims to deliver digital workflows that create great experiences and unlock productivity for enterprise operations. The company's core business revolves around management of "incident, problem, and change".
This Integration allows customers to create incident tickets in ServiceNow straight from the Universal Controller. A typical Use Case is creating a ticket in ServiceNow in the event of a Task failure within the Universal Controller.
Template Name | Extension Name | Extension Version |
---|---|---|
ServiceNow Incident | ue-servicenow-incident | 2.1.0 |
Refer to Changelog for version history information.
This integration requires a Universal Agent and a Python runtime to execute the Universal Task.
Tested with Python version 3.7.6 and 3.11.6 and with the Universal Agent bundled Python distribution.
Both Windows and Linux agents are supported.
Universal Controller Version 7.2.0.0 and later.
This integration is tested on ServiceNow Vancouver. It should be compatible with newer versions of ServiceNow as long as ServiceNow backward compatibility is preserved.
This Universal Extension provides the following key features:
To use the Universal Template, you first must perform the following steps.
This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.
To import the Universal Template into your Controller, follow the instructions here.
When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.
Modifications of this integration, applied by users or customers before or after import, might affect its supportability. For more information, refer to Integration Modifications.
For a new Universal Task, create a new task and enter the required input fields.
The input fields for this Universal Extension are described below.
Field | Input type | Default value | Type | Description |
---|---|---|---|---|
Action | Required | Create Incident | Choice | Action performed upon the task execution. Available actions.
|
ServiceNow Instance URL | Required | - | Text | URL of the ServiceNow instance. |
Authentication Type | Required | Basic Authentication | Choice | Authentication method to use. Available methods,
|
ServiceNow Credentials | Required | - | Credentials | Credentials for accessing ServiceNow via API. The Credentials definition should be as follows.
|
Client Credentials | Optional | - | Credentials | Credentials for authenticating using OAuth2 (retrieving access token). The Credentials definition should be as follows.
Required when Authentication Type is Oauth2 (ServiceNow API) |
Caller | Optional | - | Dynamic Choice | User who reported or is affected by this incident. |
Category | Optional | - | Dynamic Choice | The category for incident creation. If not provided, the default category defined on ServiceNow will be considered. |
Subcategory | Optional | - | Dynamic Choice | The subcategory for incident creation. The choice of Subcategory depends on the previous choice of Category. |
Impact | Optional | - | Dynamic Choice | The impact of the created incident |
Urgency | Optional | - | Dynamic Choice | The urgency of the created incident. |
Assigned To | Optional | - | Dynamic Choice | The user is primarily responsible for treating this incident in ServiceNow. |
Assignment Group | Optional | - | Dynamic Choice | Assignment group that is responsible for working on this incident in ServiceNow. |
Short Description | Required | - | Text | Short description of the incident. |
Description | Optional | - | Large Text | Description of the incident. |
Attach Output Source | Required | -- None -- | Choice | Parameter controlling whether an attachment will be attached to the incident and the source of it. The following options are available.
|
Output Type | Optional | All | Choice | The type of output to be used as an attachment. The following options are available.
|
Number of lines | Optional | 100 | Integer | The number of lines to be retrieved from the task instance output. The extension will provide up to the specified number of lines, less if there are not enough lines generated. Required when Attach Output Source is “Sibling Task” or “Any Task Instance”. The value must be greater than 0. |
Task Instance ID | Optional | - | Text | UUID of the task instance, the output of which is attached. UAC Functions can be used to resolve the required Task Instance ID. For more information, the reader can refer to the task examples. Required when Attach Output Source is “Sibling Task” or “Any Task Instance”. |
UC URL | Optional | - | Text | Base URL of the target Universal Controller. Required when Attach Output Source is “Sibling Task” or “Any Task Instance”. |
UC Credential | Optional | - | Credential for accessing the Controller. The Credentials definition should be as follows.
|
Using empty values for dynamic choice fields will result in ServiceNow setting a default value for the field if one exists. |
Using non-existing values for dynamic choice fields will result in ServiceNow setting an empty value or a default value for the field if one exists. |
Example of creation of an incident.
Example of creating an incident with an attachment from a sibling task within a workflow. The workflow is configured to create a ServiceNow incident when a task fails.
An example workflow where a ServiceNow Incident Universal Task follows the Failure transition of a SQL Task is provided below.
An example of a task configured to use the information from the failed Universal Task Instance as an attachment for creating a ServiceNow Incident is provided below.
Example of creation of an incident from any Task Instance.
Best practice to configure such a scenario within UAC is shown below.
Step 1: Create a Monitor Task that monitors for the failure of tasks by configuring Monitor Details.
Step 2: Configure the ServiceNow Incident task. The created Incident Task propagates the output of the failed Task Instance as an attachment to ServiceNow. For that, a Task Monitor trigger is required.
Step 3: Create a Task Monitor Trigger linked to the Monitor Task (on Step 1), which controls the action that needs to be taken when the monitor successfully monitors a failure, in this case, the trigger of an incident ticket configured on Step 2.
The exit codes for this Universal Extension are described below.
Exit Code | Status Classification Code | Status Classification Description | Status Description |
---|---|---|---|
0 | SUCCESS | Successful Execution | SUCCESS: Ticket Created |
1 | FAIL | Client Error. The error originated on the client side. | FAIL: Client Error: < Error description > |
1 | FAIL | Server Error. The error originated from the server side. | FAIL: Server Error: < Error description > |
2 | AUTHENTICATION_ERROR | Bad Credentials | AUTHENTICATION_ERROR: The account cannot be authenticated. |
3 | AUTHORIZATION_ERROR | Insufficient permissions | AUTHORIZATION_ERROR: The account is not authorized to perform the requested action. |
20 | DATA_VALIDATION_ERROR | Input fields validation error. | DATA_VALIDATION_ERROR: Some of the input fields cannot be validated. See STDERR for more details. |
In the context of a workflow, subsequent tasks can rely on the information provided by this integration as Extension Output.
Attribute changed
is populated as follows
The Extension output contains the attribute result
. Attribute result
contains the following sub-attributes:
Attribute | Type | Description |
---|---|---|
code | number | The HTTP Response Code from ServiceNow. |
ticket_number | string | The ticket number is given to the created incident. |
sys_id | string | The UID of the incident, generated by ServiceNow. |
An example of the Extension Output for creating a ServiceNow Incident using Oauth the output of a Task Instance ID as an attachment is presented below.
{ "exit_code": 0, "status_description": "SUCCESS: ServiceNow Incident Create Incident executed successfully!", "changed": true, "invocation": { "extension": "ue-servicenow-incident", "version": "2.1.0", "fields": { "action": "Create Incident", "authentication_type": "Oauth2 (ServiceNow API endpoint)", "servicenow_instance_url": "https://dev123456.service-now.com", "servicenow_credentials_username": "****", "servicenow_credentials_password": "****", "caller": null, "category": "Software", "subcategory": "Operating System", "impact": "2 - Medium", "urgency": "2 - Medium", "assigned_to": "Jewel Agresta", "assignment_group": "RMA Approvers", "short_description": "Short Decription", "description": "Long description", "attach_output_source": null, "output_type": null, "number_of_lines": null, "task_instance_id": null, "uc_url": null, "uc_credentials_username": null, "uc_credentials_password": null, "client_credentials_id": "f7338f849cad4fffbc4dd2fd9976a32b", "client_credentials_secret": "****" } }, "result": { "code": 201, "ticket_number": "INC0010056", "sys_id": "5115d027a30f383f6df5209c5e27a117" } } |
STDOUT and STDERR provide additional information to the User. The populated content can be changed in future versions of this extension without notice. Backward compatibility is not guaranteed.
Modifications applied by users or customers before or after import might affect the supportability of this integration. The following modifications are discouraged to retain the support level for this integration.
Users and customers are encouraged to report defects or feature requests at Stonebranch Support Desk.
This document references the following documents.
Document Link | Description |
---|---|
Universal Templates | User documentation for creating, working with, and understanding Universal Templates and Integrations. |
Universal Tasks | User documentation for creating Universal Tasks in the Universal Controller user interface. |
Credentials | User documentation for creating and working with credentials. |
Resolvable Credentials Permitted Property | User documentation for Resolvable Credentials Permitted Property. |
ServiceNow Documentation | User documentation for ServiceNow. |
breaking changes:
This integration is no longer importable on Universal Controller 7.0 or runnable on Agent version 7.0. (#34222)Fixed
: Remove value validation for the "Urgency" and "Impact" Dynamic Choice Fields. (#34232)