> For the complete documentation index, see [llms.txt](https://docs.appstrategy.com/apprules-r-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/customerservice/servicenow.md).

# ServiceNow

## 1          Connecting to ServiceNow

Before you can connect to data, you will need to ensure the authenticating user has the following permissions assigned at minimum, required for listing metadata. Before you can do this, the administrator of the account must elevate their role by navigating to **User menu -> Elevate Roles -> check the security\_admin box -> OK**. For the tables listed below, the user must have both row-level permission, such as sys\_db\_object, as well as field-level permission, such as sys\_db\_object.\*. For additional tables which the user wishes to access, they must have at least row-level permission.

The connection property Url is a required property on all connections.

### 1.1          READ sys\_db\_object

Access to sys\_db\_object is required to connect to data. You can enable access to this as follows:

1. Navigate to the **System Security -> Access Controls (ACL)**. Select **New** to create an access control object.
2. For **Type**, select **record**.
3. For **Operation**, select **read**.
4. For **Name**, select **Table \[sys\_db\_object]** in the first drop-down and **--None--** in the second drop-down.
5. In the **Requires role** section, **double-click the text box that says Insert a new row\...**. Search for and select your desired role.
6. Click **Submit** to create the ACL object.
7. Assign the role which has the created ACL to the authenticating user. To do this, navigate to **User Administration -> Users -> Select authenticating user -> Roles -> Edit... -> add your role from collection.**

### 1.2          READ sys\_glide\_object

Access to the sys\_glide\_object is required for certain ServiceNow table metadata. You can enable access to this by repeating the above procedure, but instead selecting **Field class \[sys\_glide\_object]** for the ACL's name.

### 1.3          READ sys\_dictionary

Access to sys\_dictionary is required to retrieve schema information from ServiceNow. You can enable access to this by navigating to **User Administration -> Users -> Select authenticating user -> Roles -> Edit... -> add "personalize\_dictionary" role from collection.**

## 2          Authenticating to ServiceNow

Connects to ServiceNow via the Table, Attachment, Aggregate, Service Catalog, and Import Set APIs. Walks the full table inheritance chain to surface inherited fields.

###

### Connection Properties

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Property</td><td valign="top">Key (conn string)</td><td valign="top">Required?</td><td valign="top">Description</td></tr><tr><td valign="top">Instance</td><td valign="top">Instance</td><td valign="top">Yes</td><td valign="top">ServiceNow instance name, e.g. mycompany (resolves to mycompany.service-now.com) — or full URL.</td></tr><tr><td valign="top">User</td><td valign="top">User</td><td valign="top">Yes</td><td valign="top">ServiceNow username.</td></tr><tr><td valign="top">Password</td><td valign="top">UserPassword</td><td valign="top">Yes</td><td valign="top">ServiceNow password.</td></tr><tr><td valign="top">Auth Scheme</td><td valign="top">AuthScheme</td><td valign="top">No</td><td valign="top">Basic (default) or OAuth.</td></tr><tr><td valign="top">OAuth Client Id</td><td valign="top">OAuthClientId</td><td valign="top">No</td><td valign="top">Required if AuthScheme=OAuth.</td></tr><tr><td valign="top">OAuth Client Secret</td><td valign="top">OAuthClientSecret</td><td valign="top">No</td><td valign="top">Required if AuthScheme=OAuth.</td></tr><tr><td valign="top">OAuth Refresh Token</td><td valign="top">OAuthRefreshToken</td><td valign="top">No</td><td valign="top">Required if AuthScheme=OAuth.</td></tr></tbody></table>

### Minimum Connection String (Basic Auth)

Instance=mycompany;User=admin;UserPassword=secret

<br>

&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/customerservice/servicenow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
