Supported objects

Sequin supports all custom ServiceNow objects, as well as all custom ServiceNow fields.

Sequin also supports the following standard ServiceNow objects:

Collection NameReadWrite
Approval
Asset
Catalog Item
Change Request
Configuration Item (CI)
Dashboard
Event
Group
Incident
Knowledge Base
Notification
Order Guide
Problem
Report
SLA
Service Level Agreement (SLA)
Service Request
Task
User
Workflow

Setup & installation

Enable OAuth 2.0 in ServiceNow

To enable OAuth 2.0 for your ServiceNow instance, follow these steps:

  1. Navigate to System OAuth > Application Registry.
  2. Click New to create a new OAuth API endpoint for Sequin.
  3. Select Create an OAuth API endpoint for external clients.
  4. Fill in the necessary fields:
    • Name the application (e.g., “Sequin”).
    • Enter a description.
    • Set the Redirect URL to Sequin’s OAuth callback URL, https://api.sequin.io/api/oauth2/callback/servicenow.
  5. Click Submit to save the OAuth API endpoint.

Create an OAuth Role

Next, create a role specifically for OAuth:

  1. Go to System Security > Roles.
  2. Click New.
  3. Name the role (e.g. oauth_role).
  4. Click Submit.

Assign OAuth Role to a User

Now, assign this role to the user who will be using OAuth to connect Sequin to your ServiceNow account:

  1. Navigate to User Administration > Users.
  2. Open the user record who will use OAuth to connect to Sequin.
  3. In the Roles tab, click Edit.
  4. Add the newly created OAuth role (e.g. oauth_role) to this user.
  5. Click Save.

Authenticate Sequin

With OAuth 2.0 setup on your ServiceNow instance, you’ll now be able to connect Sequin to your ServiceNow account. Over on Sequin, add ServiceNow as a source and follow the setup flow.

The syncing process

We first backfill your database with all your ServiceNow data. The time for the backfill depends on the size of your ServiceNow account. Unless your ServiceNow account has over a million records, the backfill should complete in under an hour. Smaller accounts complete in just a few minutes. We’ll email you when your backfill is complete and Sequin has loaded all your data into your database.

After the initial backfill, we’ll rely on ServiceNow Business Rules to monitor changes. Sequin will create the ServiceNow Business Rules it needs in your account. We backstop Business Rules with an occasional polling process to ensure we don’t miss any events.

This means changes on ServiceNow should propagate to your database in just a few seconds.

Learn more about our syncing process.

Read and write ServiceNow data using SQL

You’ll connect to your database via Sequin’s Postgres Proxy, which lets you read from your synced tables as well as write to them. You can use any SQL client that works with Postgres.

Here’s an example of what your ServiceNow tables might look like in your database:

db7hea89oah3tas=> \dt

                   List of relations
 Schema |           Name            | Type  |  Owner
--------+---------------------------+-------+----------
 public | _sync_cdc                 | table | sequin
 public | incident                  | table | sequin
 public | problem                   | table | sequin
 public | change_request            | table | sequin
 public | service_catalog           | table | sequin
 public | user                      | table | sequin
(6 rows)

You’ll see all the ServiceNow objects you selected when setting up your sync are now tables in your database. You’ll also see a _sync_cdc table which Sequin uses to manage your sync.

Here’s what it looks like to query the incident table:

select
    number,
    short_description,
    priority,
    assignment_group,
    assigned_to,
    state,
    opened_at,
    closed_at
from
    incident
where
    number = 'INC0012345';

Which returns a row that looks like:

-[ RECORD 1 ]-----+----------------------------------
number            | INC0012345
short_description | Spice production halted
priority          | 1 - Critical
assignment_group  | House Atreides
assigned_to       | Gurney Halleck
state             | In Progress
opened_at         | 2023-11-10T08:00:00.000Z
closed_at         |

Writing back to ServiceNow is as simple as writing a SQL query. For example, you can update the state of an incident like this:

update incident
set state = 'Resolved'
where number = 'INC0012345';

Sequin will write this change to both ServiceNow and your database at the same time.

If a write to ServiceNow fails, Sequin will roll back the write to your database. For example, if you try to set an invalid state for an incident, you’ll receive a Postgres error:

update incident
set state = 'invalid-state'
where number = 'INC0012345';

ERROR: [ServiceNow] Value `invalid-state` is not a valid value for `state`.

Next steps

Your ServiceNow tables are now available as fully readable and writeable tables in your database. You can query for all your data using SQL, and mutate data thanks to Sequin’s Postgres Proxy. To build on this foundation, here are some next steps:

  • Setup your ORM to work with your synced tables.
  • Edit the ServiceNow objects and properties you’re syncing at any time.
  • Create views on your ServiceNow data to tailor your schema to your needs.
  • Invite your team to your Sequin account and start building!

If you need assistance setting up your sync, just send us a note. We’re around and eager to help.