Start integrating with ONEiO for free!
SIGN UP

How to configure ServiceNow for integration with ONEiO

ServiceNow Integration Hub

If you are using ServiceNow's Integration Hub and Automation Engine for integrations, you can also utilize our ONEiO Spoke for integrating with ONEiO. You can read the full instructions on our ServiceNow Store page.

Overview

This article explains the steps to set up a bi-directional integration between ServiceNow and ONEiO. The process involves two main tasks:

If you have any questions about setting up the integration, feel free to email support@oneio.cloud.

You can sign up for a free ONEiO trial using the link below.

ONEiO Free Trial

1. Configuring Message Flow from ServiceNow to ONEiO

Screenshot_2022-01-28_at_13.44.01.png

ServiceNow communicates with ONEiO via a REST message as part of the ServiceNow REST API. This REST message is pre-configured in the Update Set provided by ONEiO.

 

1.1 Retrieve the Update Set

For your convenience, ONEiO provides a pre-configured Update Set that includes everything needed for ServiceNow to communicate with ONEiO. While not mandatory, it simplifies the configuration process. You can download it from the ServiceNow Developer site using the button below.

The update set contains:

  • The REST message,
  • a Business Rule for the incident table, and
  • 2 Business Rules for sending out attachments.

Download Update Set

 

1.2 Import the Update Set to ServiceNow

Begin the import process by uploading the Update Set at:

System Update Sets   Retrieved Update Sets   Import Update Set from XML

update_set_snow.png

 

Upload the update set retrieved previously.

update_set_import_snow.png

 

1.3 Commit the Update Set in ServiceNow

Open ONEiO Integration Components

open_int_comp_snow.png

 

Following Business Rules are included in the Update Set:

  • ONEiO Incident Integration Post: Used to send incident data from the Incident table.
  • ONEiO Attachment After Correlation ID: Handles attachment transfer when an incident is initially created.
  • ONEiO Send Attachment: Used to send attachments as part of an update to an existing incident.

Select Preview Update Set, close the dialog, then select Commit Update Set and close the dialog:

update_set_commit_snow.png

 

1.4 Configure the REST Message in ServiceNow

To enable communication from ServiceNow to ONEiO, a REST message is used with ONEiO-specific settings for the target URL, HTTP method, and content type. Authentication must be configured individually for each endpoint.

You can find the REST message settings under:

System Web Services   Outbound   REST Message   ONEiO

rest_message_snow.png

 

The Endpoint field in the REST message contains the ONEiO receiver URL. The available endpoints are:

  • QA: https://rest-receiver-test.service-flow.com/api
  • Production: https://rest-receiver.service-flow.com/api

 

By default, the QA URL is pre-configured. Update it to the production URL if required:

rest_message_conf_snow.png

 

1.5 Create an Endpoint for ServiceNow in ONEiO

For each integration endpoint - such as a ServiceNow instance - you need to create an endpoint once in ONEiO. After that, it can be reused in other integrations.

To create the endpoint, log in to ONEiO, select the appropriate environment, and navigate to:

Endpoints   New Endpoint
 
 
In the dialog that appears, scroll down, select ONEiO’s pre-configured “ServiceNow” endpoint, and click Create.
 
In the endpoint, enter the following information:
  • Name: the name for the endpoint (free text)
  • ServiceNow root URL: insert the root URL of your ServiceNow (without a path or a trailing slash)
  • Timezone: select the timezone you are in or that you use in ServiceNow
Save the endpoint.
 
Further reading:

 

1.6 Configure ONEiO Authentication in ServiceNow

In ONEiO you have two options to configure authentication for messages received from ServiceNow:

 

1.6 Basic Authentication

The ONEiO Username and Password required for configuration are available in your ServiceNow endpoint settings in ONEiO. The Username is always visible, but you’ll need to switch to Edit mode to access the Generate new password button. Copy the password to the clipboard and close the dialog.

ONEiO__Sebastian_Sandbox_User_pass.png

Important

After generating the new password, make sure to save the ServiceNow endpoint in ONEiO for the changes to take effect.

Return to your ServiceNow instance and configure the Basic Auth Profile within the REST Message.
To do this, click the info icon next to the Basic Auth profile field, then select Open Record. Insert the ONEiO Username and the Password and click Update in the dialog.

rest_message_basicauth_conf_snow.png

 

1.7 OAuth 2.0 Authentication (skip if you are using Basic Authentication)

You can also authenticate using OAuth 2.0 as an alternative to Basic Authentication. For detailed instructions on how to set up OAuth 2.0, please refer to this article.

1.8 Verify the Integration and Send a test message in ServiceNow to ONEiO

With authentication now configured, it’s time to verify that the connection is working as expected.
To support this, the Update Set includes a REST message specifically for testing purposes. This test message uses a hardcoded payload and is not dynamically populated with actual ticket data.

rest_message_test_auth_snow.png

 

To run the test, open "Test Authentication to ONEiO" and click the Test link on the left side of the screen.

rest_message_test_snow.png

 

This sends a test payload to ONEiO and, if successful, returns an HTTP 202 status along with a Response ID:

rest_message_test_success_snow.png

 

This message will also be visible in the ONEiO Message View:

rest_message_test_success_oneio.png

 

1.9 If needed: Handling Encrypted Attachments

If your ServiceNow instance uses field encryption and restricts encryption module access by roles, the integration user must have the appropriate role to forward encrypted attachments to the target system.
You can either:
  • Create a dedicated role with access to the encryption module and assign it to the integration user, or
  • Grant encryption module access to an existing role, such as ITIL.
Without the necessary permissions, ONEiO will receive a 404 – Not Found error from ServiceNow when attempting to download encrypted attachments.
 

1.10 Verify the Integration by Creating a Test Incident in ServiceNow

Now that the ServiceNow integration is set up we can create our first incident. 

Incident   Create new

new_incident_snow.png

Fill in the required fields such as Caller and Short Description and any other information required for your test scenario. Click to Submit the Incident.

Note: receiving attachments in ONEiO only works after the ServiceNow credentials are configured in ONEiO (see details here), and after ONEiO sets the correlation ID (which requires the initial rules to be configured).

The Incident should show up in the ONEiO Message View.

ONEiO__Sebastian_Sandbox_Message_View.png

Congratulations, you have successfully integrated your ServiceNow with ONEiO.

 

1.11 If Needed: Adjust Business Rules

Business Rule: ONEiO Incident Integration Post

Navigate to:

System Definition   Business Rules   ONEiO Incident Integration Post

Select the Advanced tab:

 

Here, you can edit the condition that determines when messages are sent to ONEiO. By default, messages are not sent if they were updated by the ONEiO integration user "oneio", to prevent “echoes” back to ONEiO when messages are received from it.

If you’re using a custom User ID for the integration in ServiceNow, adjust the condition accordingly.

Additionally, you can specify fields to exclude from the payload sent to ONEiO. To do this, add a comma-separated list of field names to the exclusion array within the post call in the script. For example:

new ONEiOLibrary().post(current, 'ONEiO', 'post', ['assigned_to', 'sys_created_by']);

Once you’ve made your changes, click Update to save them.

 

Business Rules for Attachment Handling:

“ONEiO Attachment after Correlation ID” and “ONEiO Send Attachment” handle attachments during Create and Update operations, with default conditions provided for convenience.

If you’re using a custom User ID for the integration in ServiceNow, or if the external system’s ticket ID won’t be recorded in the default correlation_id field, make sure to adjust the conditions accordingly.


1.12 If Needed: Duplicate Business Rules for Additional Processes

The steps above apply to the default Incident integration. To integrate additional processes in ServiceNow, simply clone or extend the existing Business Rules as needed.

To do this navigate to:

System Definition   Business Rules   ONEiO Incident Integration Post

Then:

  1. Right-click the top gray menu bar.
  2. Select Insert and Stay to create a clone of the current rule.

Screenshot_2022-09-30_at_9.20.56.png

 

Return to the Business Rules list view. You can now see two ONEiO Incident integration Post rules:

Screenshot_2022-09-30_at_9.23.29.png

 

Edit the newly created Business Rule and update the Name and Table fields to align with your specific process.

In the example below, we are configuring it for the Problem process:

Screenshot_2022-09-30_at_9.30.22.png

 

This approach also allows you to send tickets from ServiceNow’s Problem table to ONEiO.

If your Problem process includes sending attachments, also clone the ONEiO Attachment After Correlation ID Business Rule and change the Table from Incident to the one relevant to your process (e.g. Problem).

There’s no need to clone the ONEiO send attachment Business Rule, as it operates on the sys_attachment table and applies globally.

 

2. Configuring Message Flow from ONEiO to ServiceNow

Screenshot_2022-01-28_at_13.44.15.png

ONEiO accesses ServiceNow through its REST API.

 

2.1 Create an Integration user in ServiceNow

An integration user is used to allow for creating and updating records via ServiceNow’s Table API.
Make sure the credentials match those configured in the ServiceNow adapter settings in ONEiO.

In ServiceNow, navigate to:

Organization   Users   New

add_user_snow.png

 

Define the details for the integration user:

  • User ID:oneio”. This username is pre-configured in the Business Rules. You may use a different name, but be sure to update all relevant references in the Business Rules.
  • Access: Enable "web service access only".
  • Save the user: Right-click on the gray header area (User - New record) and select "Save".

new_user_snow.png

 


2.2 Provide Permissions for the Integration User

At the bottom of the User record, select the Roles tab and click on Edit

user_roles_snow.png

 

Search for the Collection itil, add it to the Roles List and click Save:

Screenshot 2023-07-18 at 13.45.09.png

 

Click Set Password, then select Generate and copy the password to your clipboard. Save it in a secure location for future use.

Next, click Save Password and close the dialog.

Finally, click Update in the top-right corner to complete the user creation.

 

2.3 Configure ServiceNow Authentication in ONEiO

After completing the steps above, you can proceed to configure ServiceNow authentication in ONEiO. There are two options for setting up authentication for messages received by ServiceNow:


2.3.1 Basic Authentication

Under ONEiO -> ServiceNow on the right, select "Basic" as method and enter the integration user's credentials into the ServiceNow User and Password fields. Then save your endpoint.

Screenshot 2023-07-18 at 12.41.21.png

 

2.3.2 OAuth 2.0 Authentication (skip if you are using Basic Authentication)

Configure the ServiceNow integration user, password, Client ID, and Client Secret.

Screenshot 2023-07-18 at 9.42.57.png

 

How to get Client ID and Client Secret in ServiceNow

In ServiceNow, select:

System OAuth   Applicaiton Registry  New

Screenshot 2023-07-18 at 13.10.png

 

Select option Create an OAuth API endpoint for external clients

Screenshot 2023-07-18 at 13.31.47.png

 

Here you can create your OAuth 2.0 credentials

Screenshot 2023-07-18 at 13.28.08.png

 

The Client ID is generated automatically. For the Client Secret, you can either enter your own value or leave it blank - if left blank, it will be generated automatically when the OAuth 2.0 record is saved.

Next, return to ONEiO, enter the Client ID and Client Secret into the corresponding fields, and save your endpoint.

Screenshot 2023-07-18 at 9.42.57.png

 

2.4 Attachment handling

ONEiO sends attachments to ServiceNow using ServiceNow's Attachment API. To enable this, the outbound message must include the attribute sys_id, containing the sys_id of the target record in ServiceNow.

2.5 Verification of the Integration

To verify an integration from ONEiO to ServiceNow, a second endpoint must be configured.

For example, to set up a bi-directional integration between ServiceNow and Jira using ONEiO, you’ll also need to integrate Jira and create a corresponding endpoint in ONEiO. In addition, you’ll define Routing Rules to correctly map fields between ServiceNow and Jira.

For details on integrating Jira with ONEiO, refer to this article. A video tutorial is also available that walks through the complete ServiceNow–Jira integration.

We have many more tutorials available on our support site.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.