ServiceNow connection¶
Introduction¶
A ServiceNow connection, created using the ServiceNow connector, establishes access to ServiceNow. Once a connection is configured, you can create instances of ServiceNow activities associated with that connection to be used either as sources (to provide data in an operation) or as targets (to consume data in an operation).
Note
Before configuring a ServiceNow connection, review the ServiceNow prerequisites to ensure that the ServiceNow instance has been configured correctly.
Note
This connector supports the Enable Re-authentication on Change organization policy. If enabled, a change to the Client ID, Username, or Instance in this connection requires users to re-enter the Client Secret and Password for the connection.
Create or edit a ServiceNow connection¶
A new ServiceNow connection is created using the ServiceNow connector from one of these locations:
- The design component palette's Project endpoints and connectors tab (see Design component palette).
- The Global Connections page (see Create a global endpoint in Global Connections).
An existing ServiceNow connection can be edited from these locations:
- The design component palette's Project endpoints and connectors tab (see Design component palette).
- The project pane's Components tab (see Component actions menu in Project pane Components tab).
- The Global Connections page (see Edit a global endpoint in Global Connections).
Configure a ServiceNow connection¶
Each user interface element of the ServiceNow connection configuration screen is described below.
Tip
Fields with a variable icon support using global variables, project variables, and Jitterbit variables. Begin either by typing an open square bracket [
into the field or by clicking the variable icon to display a list of the existing variables to choose from.
-
Connection Name: Enter a name to use to identify the connection. The name must be unique for each ServiceNow connection and must not contain forward slashes
/
or colons:
. This name is also used to identify the ServiceNow endpoint, which refers to both a specific connection and its activities. -
Client ID: Enter the client ID for the ServiceNow instance. See ServiceNow prerequisites for details.
-
Client Secret: Enter the client secret for the ServiceNow instance. See ServiceNow prerequisites for details.
-
Username: Enter the username for the ServiceNow instance. See ServiceNow prerequisites for details.
-
Password: Enter the password for the ServiceNow instance. See ServiceNow prerequisites for details.
-
Instance: Enter the URL of the ServiceNow instance, such as
https://example.service-now.com/
. -
Advanced Configurations: When selected, shows the Advanced Configurations Properties table, which is used to add additional configuration properties as key-value pairs. Click the add icon to add a row to the table below and enter a key-value pair for each property.
To save the row, click the submit icon in the rightmost column.
To edit or delete a single row, hover over the rightmost column and use the edit icon or delete icon .
To delete all rows, click Clear All.
-
Test: Click to verify the connection using the provided configuration. When the connection is tested, the latest version of the connector is downloaded by the agent(s) in the agent group associated with the current environment. This connector supports suspending the download of the latest connector version by using the Disable Auto Connector Update organization policy.
-
Save Changes: Click to save and close the connection configuration.
-
Discard Changes: After making changes to a new or existing configuration, click to close the configuration without saving. A message asks you to confirm that you want to discard changes.
-
Delete: After opening an existing connection configuration, click to permanently delete the connection from the project and close the configuration (see Component dependencies, deletion, and removal). A message asks you to confirm that you want to delete the connection.
Configure OAuth connections¶
This connector supports a connection using OAuth by using specific configuration properties. After specifying the advanced configuration property InitiateOAuth, you can specify the required configuration using additional properties, as described below.
Note
Additional IDs, secrets, scopes, and other authentication tokens may be required in order to successfully complete the OAuth authentication. Check the endpoint documentation for additional information on their requirements.
For this connector, two scenarios are supported. In either scenario, you will need to use a third-party tool (such as Postman or a similar tool) to obtain the required access token or tokens from the endpoint involved. both of these scenarios work only for single-agent groups. These are agent groups that consist of a single agent.
-
Scenario 1: Using an OAuth access token that expires after a set period of time.
With this configuration, you supply an OAuth access token that lasts for a set period of time, as determined by the particular endpoint. The connector will use the token to make the connection. The connection, however, will no longer work once the access token expires. You would configure the connector to use the token by setting these properties:
Configuration Property Value InitiateOAuth OFF
OAuthAccessToken Set to the value of the OAuth access token obtained from the endpoint -
Scenario 2: Using an OAuth access token combined with an OAuth refresh token to enable automatic refresh of access.
With this configuration, the connector will use a refresh token to obtain a new access token once the current access token has expired. This is generally the best method of configuring OAuth.
You supply an OAuth access token and an OAuth refresh token, as determined by the particular endpoint. You would configure the connector to use these tokens by setting these properties:
Configuration Property Value InitiateOAuth REFRESH
OAuthAccessToken Set to the value of the OAuth access token obtained from the endpoint OAuthRefreshToken Set to the value of the OAuth refresh token obtained from the endpoint
Next steps¶
After a ServiceNow connection has been created, you place an activity type on the design canvas to create activity instances to be used either as sources (to provide data in an operation) or as targets (to consume data in an operation).
Menu actions for a connection and its activity types are accessible from the project pane and design component palette. For details, see Actions menus in Connector basics.
These activity types are available:
-
Query: Retrieves records from ServiceNow and is intended to be used as a source in an operation.
-
Create: Creates new records at ServiceNow and is intended to be used as a target in an operation.
-
Update: Updates existing records at ServiceNow and is intended to be used as a target in an operation.
-
Delete: Deletes existing records from ServiceNow and is intended to be used as a target in an operation.