How to use IBM App Connect with ServiceNow

ServiceNow is a cloud-based platform that supports service management for all departments of your business including IT, human resources, facilities, field service, and more.

Availability:
  • A connector in IBM App Connect Enterprise as a ServiceApp Connect Enterprise as a Service connector
  • A connector in IBM App Connect on IBM CloudCloud-managed connector
  • A local connector in a Designer instance of IBM App Connect in containers (Continuous Delivery release)Local connector in containers (Continuous Delivery release)
  • A local connector in a Designer instance of IBM App Connect in containers (Extended Update Support)Local connector in containers (Extended Update Support release)
  • A local connector in a Designer instance of IBM App Connect in containers (Long Term Support)Local connector in containers (Long Term Support release)

Connecting to ServiceNow

Complete the connection fields that you see in the App Connect Designer Catalog page or flow editor. If necessary, work with your ServiceNow administrator to obtain these values.

To connect App Connect to a ServiceNow account, select your preferred authorization method:
  • Provide a username, password, and client credentials (OAUTH 2.0 PASSWORD)
  • Provide credentials for App Connect to use (BASIC)
Then, specify values in the connection fields for your chosen authorization method:
Table 1. Connection fields for your chosen authorization method. Descriptions of the connection fields are given after this table.
Provide a username, password, and client credentials (OAUTH 2.0 PASSWORD) Provide credentials for App Connect to use (BASIC)
Username Username
Password Password
Client ID Endpoint URL
Client secret  
Endpoint URL  

Descriptions of the connection fields and examples of how to obtain them:

Endpoint URL
The URL of the ServiceNow instance that App Connect connects to, in the format https://<servicenow-id>.service-now.com
User name and User password
The user name and password that App Connect uses to connect to the ServiceNow instance.
Note: The Endpoint URL and this user name and password are for the ServiceNow instance that App Connect connects to. For example, if you are using a Developer instance the endpoint URL, user name and password are assigned when the instance is created, and the latter are different to the username and password that you use to sign in to the Developer site.

This user must be assigned the itil and soap roles to allow access to the features and capabilities required by App Connect. Your ServiceNow administrator should be able to assign these roles to your user account.

Note: If you are using a ServiceNow personal developer instance and access your instance using the default admin account for the System Administrator profile, you should already have the required access because this account is automatically assigned the admin role, which provides access to all features and capabilities.
Client ID and Client secret
A client ID (auto-generated) and client secret (user specified, or auto-generated if left blank). For information about obtaining a client ID and client secret, see Create an endpoint for clients to access the instance in the ServiceNow documentation. You can copy and paste the client ID and client secret values into App Connect when prompted.
Tip: You can use the ServiceNow / Application Registries screen to select an OAuth client application and copy its client ID and client secret values. You can also use this screen to create a new OAuth client application for use with App Connect. To quickly navigate to this screen, you can type oauth in the filter navigator, and then click Application Registry > New > Create an OAuth API endpoint for external clients

To connect to ServiceNow from the App Connect Designer Catalog page for the first time, under ServiceNow click Connect. This creates an account in App Connect. For more information about ways to connect to ServiceNow, see Managing accounts in App Connect.

  • Example of completed fields for connecting from App Connect
Tip:

Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Catalog page, select the account, open its options menu (⋮), then click Rename Account.

Accessing ServiceNow custom objects

To access objects in addition to the static objects that are provided by App Connect (as displayed in Events and actions), the user that App Connect uses to connect to the ServiceNow instance needs to have the soap_query role. Users with this role can access ServiceNow custom properties for any object. Your ServiceNow administrator should be able to assign roles to the user that App Connect uses to connect to the ServiceNow instance..

  • Table 2.
    Role Description
    incident_manager Manages incident properties and major incident trigger rules. This role is required to retrieve incident records for a user as well as to perform create, retrieve, update, and delete (CRUD) operations for the ‘Ticket’ object.
    knowledge Creates, updates, and reviews knowledge base articles. For more information, see Accessing and configuring the Knowledge object.
    knowledge_admin Manages the knowledge base. For more information, see Accessing and configuring the Knowledge object.
    personalize_dictionary To configure dictionary entries and labels.
    personalize_choices To configure choices and predefined responses for non-journal fields that are designated as choice or suggestion fields.
You can also create a custom role with access to particular tables in order to access custom properties for specific tables. The following instructions demonstrate how to:
  1. Create a custom role.
  2. Provide access to tables.
  3. Assign the custom role to a user.
1. Create a custom role

To create a custom role, complete the following steps.

  1. In a web browser, log in to your ServiceNow instance with an ID that has administration access (or ask your ServiceNow administrator to do the following steps for you).
  2. In the filter navigator field of your ServiceNow instance, type Roles and then select Roles when it is displayed.
  3. Click New.
  4. Update the fields as follows:
    Table 3. Custom role values
    Field Value
    Name custom_role_read_only
    Requires Subscription Unspecified
    Description This role is for read access to the following: object - sys_dictionary, sys_db_object and sys_choice
    Application Global
    Elevated privilege Leave cleared
  5. Click Submit.
2. Provide access to tables
To assign read only access controls to specific tables, complete the following steps.
  1. To allow you to modify the Access Control List, click System Administrator > Elevate role.
  2. In theElevate Roles pop-up window, select security_admin > OK.
  3. In the Filter navigator field, type ACL and then select Access Control (ACL).
  4. In the Access Controls window, New.
  5. For the purposes of this example, the following tables will be used:
    • Table [sys_db_object]
    • Choice [sys_choice]
    • Dictionary Entry [sys_dictionary]
    To create access controls for these tables, update the fields as follows.
    Note: You need to create a record for each table.
    Table 4. ACL configuration
    Access control fields Value
    Type record
    Operation read
    Admin overrides True (Checkbox)
    Name Table [sys_db_object]
    Tip: Click the name field and type sys_ in the search field to find the entry.
    -- None -- *
    Application Global
    Active True (Checkbox)
    Role custom_role_read_only.
    Tip: To add this role, double-click the Insert a new row. . . field and then click the green tick.
  6. Click Submit.
  7. In the 'Verify Security Rules for "sys_xx_xx" ' pop-up window, click Continue.
  8. Repeat steps 4 - 7 to create a record for sys_choice and sys_dictionary.
3. Assign the custom role to a user

To add the custom role that you created to a user, complete the following steps.

  1. In the Filter navigation panel, go to User Administration > Users and select the user you want to work with.
  2. In the Roles tab, click Edit.
  3. In the Collection list, type custom_role_read_only, select it when it is displayed and then click Add > Save.
  4. The user is now ready to access custom objects when they connect to ServiceNow in App Connect.

Accessing and configuring the Knowledge object

You can create, update, and delete knowledge management articles with the ServiceNow knowledge object in App Connect.

Figure 1. The ServiceNow knowledge object and actions in App Connect
The ServiceNow knowledge object and actions in App Connect
ServiceNow knowledge articles provide user information such as policy, release notes, and instructions for tasks. To access the knowledge object, you must be assigned the knowledge_admin user role in your ServiceNow instance. To do this, complete the following steps.
  1. In a web browser, log in to your ServiceNow instance with an ID that has administration access (or ask your ServiceNow administrator to do the following steps for you).
  2. In the Filter navigation panel, go to User Administration > Users and select the user you want to work with.
  3. In the Roles tab, click Edit.
  4. In the Collection list, select knowledge_admin, and then click Add > Save.
To use the Get additional knowledge metadata and Download knowledge article attachment action nodes in App Connect, you need to have the Knowledge API plugin installed in your ServiceNow instance. To do this, complete the following steps.
  1. In a web browser, log in to your ServiceNow instance with an ID that has administration access (or ask your ServiceNow administrator to do the following steps for you).
  2. Go to System Definition > Plugins.
  3. Search for Knowledge API.
  4. When the result is displayed, click Install.

General considerations for using ServiceNow in App Connect

Before you use App Connect Designer with ServiceNow, take note of the following considerations:

  • (General consideration) You can see lists of the trigger events and actions that are available on the Catalog page of the App Connect Designer.

    For some applications, the events and actions in the catalog depend on the environment (IBM Cloud Pak for Integration or App Connect on IBM Cloud) and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.

Events and actions

ServiceNow events

These events are for changes in this application that trigger a flow to start performing the actions in the flow.

Asset
New asset
Updated asset
Attachment
New attachment
Comments
New comment
Department
New department
Updated department
Incident
New incident
Updated incident
Problem
New problem
Updated problem
System user
New system user
Updated system user
Ticket
New ticket
Updated ticket

ServiceNow actions

These are actions on this application that you want a flow to complete.

Asset
Create asset
Update asset
Update assets
Retrieve assets
Delete assets
Update or create asset
Attachment
Create attachment
Retrieve attachments
Download File Attachment Content
Delete attachment
Comments
Create comment
Update comments
Retrieve comments
Delete comment
Update or create comment
Department
Create department
Update departments
Retrieve departments
Delete departments
Update or create department
Incident
Create incident
Update incidents
Retrieve incidents
Delete incidents
Update or create incident
Knowledge
Create knowledge
Download knowledge article attachment
Update knowledge
Get additional knowledge metadata
Retrieve knowledge
Update or create knowledge
Delete knowledge
Problem
Create problem
Update problems
Retrieve problems
Delete problems
Update or create problem
System user
Create system user
Updates system users
Retrieve system users
Delete system users
Update or create system user
Ticket
Create ticket
Update tickets
Retrieve tickets
Delete tickets
Update or create ticket

More items are available when you have connected App Connect to ServiceNow.

Examples

Screenshot of the dashboard tile for a template that uses ServiceNow

Use templates to quickly create flows for ServiceNow

Learn how to use App Connect templates to quickly create flows that perform actions on ServiceNow; for example, open the Templates gallery then search for servicenow.

Screenshot of the dashboard tile for a flow that connects Wufoo to ServiceNow and Gmail

Creating an event-driven flow that creates a ServiceNow incident and sends an email when a Wufoo form is submitted

Learn how to use App Connect Designer to create an event-driven flow that creates a ServiceNow incident when a Wufoo form is submitted, and then sends an email to the form submitter.

Troubleshooting

ServiceNow personal developer instances go into hibernation and are subsequently reclaimed after a certain period of developer inactivity. If your flows include one or more ServiceNow events or actions, and you haven't accessed your ServiceNow instance in a while, the connection between App Connect and ServiceNow might be lost because the instance is hibernating or has been reclaimed. If you see a related message in your App Connect flow, you can re-establish the connection in one of the following ways:

  • If your instance is in hibernation, either extend your instance, or log in to the ServiceNow console and generate some developer activity.
  • If your instance has been reclaimed, you'll need to use another instance and connect App Connect to that instance.