> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexthink.com/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/inbound-connectors/servicenow-tickets-connector-1.md).

# ServiceNow Ticket Statistics connector

The ServiceNow Ticket Statistics connector imports daily ticket counts from ServiceNow, broken down by channel and record type. The data is used only by the Spark adoption dashboard.

The connector stores daily ticket counts only. It does not store ticket content, and the data contains no personal information. Counts are stored in the `ticket.statistics` table. Refer to [NQL data model](/understanding-key-data-platform-concepts/nql-data-model.md) for more information.

## Configuring the connector credentials

To allow Nexthink to retrieve ticket statistics from your ServiceNow instance, set up a dedicated integration account with the required access. The connector calls the ServiceNow Aggregate API (also known as Stats API) on the `api/now/stats/incident` and `api/now/stats/sc_req_item` tables. It receives daily counts only, never ticket records.

Follow the steps below to configure the ServiceNow credentials used to fetch ticket statistics:

1. Create a dedicated active ServiceNow user account for the Nexthink integration in the ServiceNow Admin Console. Enable the account for API authentication.
2. Assign a read-only role to the Nexthink integration user in ServiceNow Roles administration. Use an existing role or create a dedicated one, such as `x_nexthink_ticket_reader`.
3. Configure table-level read ACLs for the `incident` and `sc_req_item` tables.
4. Configure field-level read ACLs for the fields the connector uses: `sys_created_on`, `sys_class_name`, the channel field (for example `contact_type`), and any field used in a filter. You don't need to configure ticket content fields, such as number, description, and caller.
5. Do not assign administrative or write-access roles to the Nexthink integration user.

{% hint style="warning" %}
ServiceNow Aggregate API requires read access to all records in the queried table, and an ACL that blocks any record makes the call fail with 403. To limit the number of counted tickets, you must use the **Incidents only filter (optional)** and **Request only filter (optional)** parameters. Refer to the [connector credentials](https://docs.nexthink.com/platform/integrations/outbound-connectors/connector-credentials) documentation for more information.
{% endhint %}

## Configuring the ServiceNow Ticket Statistics connector

From the Nexthink web interface:

1. Go to **Administration** > **Inbound connectors**.
2. Click **New connector** in the top-right corner of the page.
3. Select **ServiceNow Ticket Statistics**.
4. Configure the connector by filling in the **General** and **Parameters** tabs.

### General tab

Configure the basic connector settings:

* **Name**: A meaningful name for the connector. This name appears on the administration page.
* **NQL ID**: A unique identifier for the connector, used when referencing it in NQL queries. You can initially modify the suggested NQL ID, but once you save the connector, you can no longer change it.
* **Description**: A short description of the purpose and behavior of the connector.
* **Schedule**: Set the time zone and start time. The connector runs daily and collects ticket statistics for each 24-hour period beginning at that time.
* **Connection**:
  * **Credentials**: Select preconfigured credentials from the connector credentials page. The connector supports OAuth 2.0 and Basic Auth authentication methods. The credentials must belong to a dedicated integration user whose assignments and ServiceNow permissions define what Nexthink can retrieve. Refer to the [connector credentials](https://docs.nexthink.com/platform/integrations/outbound-connectors/connector-credentials) documentation for more information.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fk985HYAlyctkzprBF3nY%2FScreenshot%202026-10-14%20at%2010.47.20.png?alt=media&amp;token=f8667f21-6208-4ce2-8750-5d5a82911645" alt=""><figcaption></figcaption></figure>

### Parameters tab

Configure how the connector counts tickets:

* **Ticket channel**: Defines how the connector identifies each ticket's channel, for example Spark, email, phone, or the ITSM portal.
  * Select **From a ticket field** to read the channel from a ServiceNow field. The connector then produces one row per field value per day.
  * Select **Fixed value** to assign one channel name to every ticket matched by the filters.
* **Field name**: Required when the ticket channel is read from a field. Enter the ServiceNow field name that holds the channel value, for example `contact_type`.
* **Channel name**: Required when the ticket channel is a fixed value. The connector records this name as the channel for every ticket matched by the filters.
* **Record types**: Select the record types to include in the count: **Incidents**, **Requests**, or both.
  * **Incidents only filter (optional)**: An encoded query applied to incident records only. Qualify reference fields with `.name`, for example `assignment_group.name=Service Desk`. The `^NQ` (new query) operator is not supported.
  * **Request only filter (optional)**: An encoded query applied to request records only. The `^NQ` (new query) operator is not supported.
* **Start date**: The date (UTC) from which ticket counts begin. The first import counts tickets created on each day from this date onward. Later imports add only the days completed since the previous run.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2F9amh2iHXEuBBONUG1DSL%2FScreenshot%202026-10-14%20at%2010.50.03.png?alt=media&amp;token=bab4afda-8865-4893-b43f-1ca78bf75149" alt=""><figcaption></figcaption></figure>

## Test results panel

{% hint style="info" %}
The **Test results** panel is available only for supported connectors. Connector availability also depends on your license.
{% endhint %}

Use the **Test results** panel on the right side to run the connector with real data on demand, and inspect responses and errors. The test panel helps with faster debugging and validation during setup, and also with more reliable mappings with less trial and error.

Select the **Run test** button to call the API, validate the credentials, and check connectivity to the targeted endpoint.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2FwWYRLEVhIqq295qkvrTH%2FScreenshot%202026-10-14%20at%2015.33.21.png?alt=media&amp;token=30738ab4-ce18-440f-b79e-5cd46435beaf" alt=""><figcaption></figcaption></figure>

Besides basic information, such as the response status code and time, the panel also shows a sample record of the response at the bottom.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2FI4IxueEsH60Pl3NQpjF0%2FHwklwWjD3Ud5ZXPC.png?alt=media&#x26;token=85b6123d-b40e-4085-871e-bc17232c8a15" alt="" width="316"><figcaption></figcaption></figure>

In the event of an error, the system displays the API response to aid in diagnosing the issue.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2FKwqz92TxPeBl3QWqbKNt%2F9kAwIQi3M5gG7Y0H.png?alt=media&#x26;token=eeb306f0-d2b8-441b-a105-1bcd708a2d7c" alt="" width="309"><figcaption></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nexthink.com/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/inbound-connectors/servicenow-tickets-connector-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
