> 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.

This data is used in the [Spark Overview dashboard ](https://docs.nexthink.com/user-guide/spark/working-with-spark/monitoring-spark/using-spark-overview.md)to help you monitor whether Spark is reducing the volume of tickets that require human service desk support.

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](https://docs.nexthink.com/understanding-key-data-platform-concepts/nql-data-model.md) for more information.

{% hint style="info" %}
When configuring the connector filters, include only user-reported incidents and requests that represent service desk work Spark is intended to handle or reduce. Exclude tickets that do not represent demand Spark could take over, such as internally generated tickets, monitoring alerts, or tickets handled outside the service desk scope. Refer to [#parameters-tab](#parameters-tab "mention") for more information.
{% endhint %}

Accurate filtering is important; the dashboard compares Spark activity with the ticket volume that would otherwise require human support work.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2FmSOlJpFqoqgAjwQixuEp%2FScreenshot%202026-10-22%20at%2012.09.37.png?alt=media&amp;token=87d6436a-b234-4f0c-9af4-2c9b9840edd8" alt=""><figcaption></figcaption></figure>

## 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 identifies and counts tickets.

* **Ticket channel**: Defines how the connector identifies a ticket’s channel, for example Spark, email, phone, or ITSM portal. Refer to [#choose-how-to-identify-ticket-channels](#choose-how-to-identify-ticket-channels "mention") to determine when you need one connector or separate connectors.
  * Select **From a ticket field** to read the channel from a ServiceNow field. The connector produces one row per field value per day.
  * Select **Fixed value** to assign one channel name to every ticket matched by the connector filters.
* **Field name**: Required when **Ticket channel** is set to **From a ticket field**. Enter the ServiceNow field name that stores the channel value, for example `contact_type`.
* **Channel name**: Required when **Ticket channel** is set to **Fixed value**. The connector records this name as the channel for every matched ticket.
* **Record types**: Select the record types to include: **Incidents**, **Requests**, or both. Include only user-reported incidents and requests that represent Service Desk work Spark is intended to handle or reduce. Exclude tickets that do not represent demand Spark could take over, such as monitoring alerts, automatically generated tickets, or tickets outside the Service Desk scope.
  * **Incidents-only filter (optional)**: An encoded query applied only to incident records. Use this filter to include only incidents relevant to the Service Desk ticket volume you want to monitor. Qualify reference fields with `.name`, for example `assignment_group.name=Service Desk`. The `^NQ` (new query) operator is not supported.
  * **Requests-only filter (optional)**: An encoded query applied only to request records. Use this filter to include only requests relevant to the Service Desk ticket volume you want to monitor. The `^NQ` (new query) operator is not supported.
* **Start date**: The UTC date from which ticket counts begin. The first import counts tickets created on each day from this date onwards. Later imports add counts only for full days completed since the previous run.

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>To enable the Spark Overview dashboard to measure Spark’s impact on support ticket volume, set the start date to <strong>January 1st of the year before you begin using Spark</strong>. This provides a baseline for comparison.</p><p>For example, if you start using Spark in 2026, set the start date to <strong>01.01.2025</strong>.</p></div>

#### Choose how to identify ticket channels

The **Ticket channel** setting determines whether you need one connector or separate connectors for each channel you want to report in the Spark Overview dashboard.

* Use one connector when a single ServiceNow field reliably identifies the ticket channel, such as `contact_type` with values such as *Email*, *Portal*, and *Phone*. Select **From a ticket field** and enter that field name. The connector creates a separate daily count for each value in the field.
* Use separate connectors when identifying a channel requires more complex logic, such as a combination of multiple fields or conditions. Configure each connector with the appropriate filters and select **Fixed value** for **Ticket channel**. Enter the channel name that should appear in the dashboard, for example *Phone*.

For example, you might create a connector that filters tickets using both the contact type and the user who created the ticket, then assign the fixed channel name *Phone*. Create one connector for each channel you want to report, including an *Other* channel if needed.

{% hint style="info" %}
Make sure that the filters across connectors do not overlap. Otherwise, the same ticket may be counted more than once.
{% endhint %}

<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.
