Skip to main content

ServiceNow

J
Written by Johan Åkerman

Prerequisite: Third-party connectors are available only on the Sana Enterprise tier, with one exception: the Workday connector is included for both Sana Core and Sana Enterprise.

Introduction

Connect ServiceNow to Sana to explore, search, and manage your table records, including incidents, service catalog requests, and customer service and HR cases. Sana can also search your ServiceNow knowledge base and read full policy and knowledge articles, so you can get answers from your HR and IT content without knowing the exact article name.

In summary, the connector has the following key characteristics:

  • Category: Support

  • Connector type: Real-time

  • Auth type: OAuth

  • Hosting type: Managed

Tools

Tools are the operations the agent can use when you ask Sana about ServiceNow. In practice, the agent may call more than one to complete a single request.

Tool

Add item to cart

Check order status

Checkout cart

Checkout order guide

Create table record

Delete cart item

Delete table record

Empty cart

Find users

Get article

Get article attachment

Get catalog item variables

Get catalog UI policies

Get current user

Get incident

Get order guide items

Get question choices

Get record counts by field

Get requested items

Get table record by ID

Get table records

List knowledge bases

List tables

Order catalog item

Search catalog items

Search configuration items

Search knowledge base

Search records by keyword

Submit cart order

Submit record producer

Update table record

View cart

Note: This article lists the connector's full set of tools. Your workspace owner can disable individual tools for your workspace, so some of those listed here may not be available to your agents. If a tool you expected is missing, reach out to your workspace owner.

Scope and permissions

This connector uses OAuth. When you connect your account, you will need to sign into your account and grant the required permissions.

Before you start

Before anyone can connect ServiceNow, a ServiceNow admin needs to register two OAuth applications in your instance. Both are required: together they issue the access tokens and authenticate the REST API requests Sana makes on each user's behalf.

We recommend Central configuration. A Sana workspace owner saves the credentials in Sana once, and people in your workspace can then connect with their own ServiceNow account.

With Individual configuration, each person enters the instance name, Client ID, and Client Secret in the Pipedream pop-up when they connect. A ServiceNow admin registers the same two applications, using the callback URL shown in that pop-up as the Redirect URL in both. The admin then shares the three values with everyone who needs the connector.

The steps below set up Central configuration. Sana generates its Redirect URL when you save the credentials, so you visit ServiceNow twice. Already registered both applications for Individual configuration? Reuse them: skip step 1, save their Client ID and Client Secret in step 2, and change the Redirect URL in both to Sana's.

1. Create an OAuth API endpoint in ServiceNow

Go to System OAuth > Application Registry > New and select Create an OAuth API endpoint for external clients. Recent ServiceNow releases prefix this option with [Deprecated UI], and it's still the right one to choose. Set Name to anything recognizable, for example Sana.

Leave the other fields at their defaults and the Auth Scope list empty. The Redirect URL stays empty until step 3. ServiceNow generates the Client ID and Client Secret when you save.

2. Save the credentials in Sana

In Sana, select Workspace in the sidebar, then Connectors, and open ServiceNow. If it isn't enabled yet, click Add connector and select ServiceNow instead.

Under Credentials, or OAuth Setup in Add connector, choose Central configuration and enter:

  • Instance name: the part of your instance's URL before .service-now.com, for example acme for https://acme.service-now.com.

  • Client ID and Client secret: the values ServiceNow generated in step 1.

Save, then copy the Redirect URL that Sana shows.

3. Add Sana's Redirect URL to the endpoint

Back in ServiceNow, open the endpoint from step 1 and paste the URL you copied into its Redirect URL field.

4. Create an OAuth provider entry using the same credentials

Go to System OAuth > Application Registry > New again and select Connect to an OAuth Provider (simplified), shown as Connect to an OAuth Provider (simplified) - Outbound on recent releases. Then set:

  • Name: anything recognizable, for example Sana OAuth Validator.

  • Client ID and Client Secret: the values from step 1, not new ones.

  • Default Grant type: Authorization Code.

  • Token URL: oauth_token.do

  • Redirect URL: the URL you copied from Sana.

If you started from Add connector, click Enable in Sana to finish.

Note: Hardened or heavily customized instances can need more than the above, and a 504 Gateway Time-out or a similar error is a sign that yours is one of them. Assign a dedicated role and service account to the integration, and make sure that role has ACLs for the oauth_credential table as well as the tables you want Sana to reach.

Sana also reads and writes your records through ServiceNow's global Table API, so the endpoint from step 1 must not be narrowed to a single scope. If requests fail with Access to unscoped api is not allowed, set that endpoint's Scope Restriction to Broadly Scoped.

Set up instructions

Prerequisites:

  • You are a Sana Enterprise user – all third-party connectors except the Workday connector are available only for users on the Sana Enterprise tier.

  • Your Sana workspace owner has enabled this connector – if the workspace owner has disabled the connector it won't appear in the list of available connectors.

  • Your ServiceNow admin has completed the required set up – see Before you start above.

Step 1: Go to the connectors page in Sana

In Sana, click on your profile icon and name in the bottom left corner and select Connectors.

Step 2: Find ServiceNow in the list of available connectors

Scroll to the Available connectors section and locate ServiceNow.

Note: If you can't find a connector in this list, it means one of the following:

  1. You've already connected it — check the ”Active connectors” section at the top of the connectors page, or

  2. Your workspace owner has disabled this connector for your workspace — reach out to them for more information or to request that it be enabled.

Step 3: Hover the connector card and click the connect button

Hover the ServiceNow card and click the Connect button.

Tip: If you click the card itself instead of the Connect button, you'll open a connector detail page with more information about its capabilities.

Step 4: Initialize the Pipedream connection

When clicking Connect in the previous step, a pop-up will appear powered by Pipedream. Click the Continue button in the pop-up to initialize the set up.

Note: Sana uses Pipedream to connect your account. Pipedream is a Workday product, trusted by millions of people to keep their data secure.

Step 5: Enter the instance name, Client ID, and Client Secret, if asked

If the pop-up doesn't ask for these, your workspace uses Central configuration and there's nothing to enter. Go on to the next step.

If it does, your workspace uses Individual configuration. Enter the values your ServiceNow admin shared with you, then click Continue:

  • OAuth Client ID and OAuth Client Secret: the Client ID and Client Secret of the OAuth applications registered in your ServiceNow instance (see Before you start above).

  • Instance Name: your ServiceNow subdomain, the part before .service-now.com.

Step 6: Sign in to ServiceNow

ServiceNow opens in a new window. Sign in with your own ServiceNow account, and approve the connection if ServiceNow asks.

Step 7: Complete the set up

You've successfully connected your ServiceNow account. Click Continue to complete the setup and start using the connector.

Known limitations

  • Admin pre-setup required: Users can connect ServiceNow once a ServiceNow admin has registered two OAuth applications in your instance. With Central configuration, a Sana workspace owner also saves the applications' Client ID and Client Secret in Sana, so users don't have to enter them. See Before you start above.

  • No granular scopes: ServiceNow's OAuth implementation does not support resource-level scopes. Access is gated by the roles assigned to the connecting user (e.g. itil, admin, read_only_admin) and by table-level ACLs in your instance. Admins must ensure the connecting user has the right roles and that the relevant tables have GET/POST/PATCH/DELETE/PUT methods enabled for the operations Sana should perform.

  • Record counts can include records a user can't open: To answer questions like "how many incidents are there per priority?", Sana asks ServiceNow to calculate totals instead of fetching every record. ServiceNow calculates those totals without checking each record's access rules, so depending on how your instance is configured, totals can include records a user can't open, and the groups they're split by (for example, knowledge base names) can come from those records. ServiceNow's own aggregated reports count records the same way. Sana can still only retrieve and show the full records each user's own ServiceNow permissions allow.

  • Knowledge search works best with the Knowledge Management API: Searching and reading knowledge articles relies on ServiceNow's Knowledge Management API (the sn_km_api plugin). If it is not activated on your instance, Sana searches your knowledge article table directly instead. That search only returns published, unexpired articles, and it matches article titles and text rather than using your instance's search configuration. Article access is still governed by each user's knowledge base and article permissions.

  • Knowledge search quality depends on your ServiceNow configuration: Knowledge base search runs in real time against ServiceNow's own search, so how reliably an article is found depends on how your admin has configured search (for example, which fields are searchable). If an article's full body text is not indexed for search, a question that does not match its title, short description, or tags may not surface it. Sana can read an article's full text once it is found, but broad discovery search across a large knowledge base is not yet available.

Frequently asked questions

Q: Do non-admin users need the ServiceNow Client ID and Client Secret, and do they get admin access if they have them?

A: With Central configuration, users don't need them: a Sana workspace owner saves them in Sana once, and users never see them. With Individual configuration, your ServiceNow admin shares them with each user who connects, and that doesn't grant admin access. The Client ID and Client Secret identify the OAuth application, not the person signing in. Each user signs in with their own ServiceNow account, and the connector mirrors their individual access. Record counts are the one exception; see Known limitations.

Q: Can Sana answer a question from our knowledge base if we don't know the exact article name?

A: Yes. Sana searches your ServiceNow knowledge base by topic and then reads the full text of the most relevant articles to answer, so you don't need to know an article's title or number. How reliably the right article is found depends on your ServiceNow instance's search configuration — see Known limitations.

Did this answer your question?