# Setting up and managing Spark

This page describes how to configure Nexthink Spark, including the required technical prerequisites and step-by-step setup instructions.

## Before you begin

Nexthink Administrators must complete the following technical prerequisites before setting up Nexthink Spark.

* To ensure Spark can identify the user:
  * Ensure all employee devices have Collector configured to gather the User Principal Name (UPN) in clear text.  Refer to [configuring-collector-level-anonymization](https://docs.nexthink.com/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/deploying-nexthink-in-non-vdi-environment/installing-collector/configuring-collector-level-anonymization "mention") for more information.
  * Configure the Microsoft Entra ID inbound connector for your Microsoft tenant. Refer to [connector-for-microsoft-entra-id-azure-ad](https://docs.nexthink.com/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/inbound-connectors/connector-for-microsoft-entra-id-azure-ad "mention") for more information.
* To use Microsoft Teams as a communication channel:
  * Log in to Nexthink Community and download the [Nexthink Teams application package for Spark](https://edocs.nexthink.com/nexthink-infinity/infinity-release-notes#nexthink-microsoft-teams-app). Do not extract the `.zip` file; keep it compressed.
* To use a third-party enterprise chatbot as a communication channel:
  * Configure an integration between the enterprise chatbot and Nexthink Spark using the [Handoff API](https://docs.nexthink.com/api/spark).

{% hint style="info" %}
Enabling Spark to escalate conversations to a human agent requires additional prerequisites, including administrator rights and ITSM connector credentials. Refer to [Configuring ticket escalation with Spark > Prerequisites](https://docs.nexthink.com/platform/user-guide/spark/setting-up-and-managing-spark/ticket-escalation-with-spark) for more information.
{% endhint %}

***

## Setting up Nexthink Spark

Ensure that you meet the [prerequisites](#before-you-begin) before setting up Nexthink Spark. Follow these steps to ensure Spark is set up correctly:

{% stepper %}
{% step %}

### Set up a communication channel for Spark interactions

Set up a [Communication channel](https://docs.nexthink.com/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/communication-channels) in Nexthink to enable Spark interaction with MS Teams.

* Use the welcome message to inform employees about the Spark scope and remind them to exercise judgment when reading AI-generated replies.
* After setting up the communication channel, install the Spark version-specific application package (.zip).

{% hint style="warning" %}
If you have previously deployed the Nexthink Teams app (either the original version or the new Spark version) using the Microsoft Teams Admin console, you will **not** be able to upload the Spark Teams application into your Teams client directly.

Microsoft Teams blocks the use of the application for users who are not authorized in the Teams Admin console. If you have never deployed the Nexthink Teams app through your Teams Admin console, you can upload the Spark Teams application into your Teams client directly.
{% endhint %}
{% endstep %}

{% step %}

### Grant permissions

To configure and monitor Spark, update your roles to include the required permissions:

* Set the **Agent conversations** NQL table visibility to **Visible** for the relevant roles.&#x20;
* Enable **Spark permissions** for the relevant roles.

{% hint style="info" %}
For detailed information about available permissions, View domain options, Data model visibility and Data privacy granularity settings, see:

* [Roles > Spark](https://docs.nexthink.com/platform/administration/account-management/roles#spark)
* [Roles > Data model visibility](https://docs.nexthink.com/platform/administration/account-management/roles#data-model-visibility)&#x20;
* [View domain > Spark](https://docs.nexthink.com/platform/administration/account-management/roles/view-domain#spark)
  {% endhint %}
  {% endstep %}

{% step %}

### Import knowledge base articles

Ensure Spark can effectively support employees by providing access to your IT knowledge base, just as you would for human support agents. Manually upload knowledge base articles from the ITSM tool as CSV files into Nexthink. This includes both employee-facing and IT support-related knowledge.&#x20;

Refer to the [managing-knowledge-sources](https://docs.nexthink.com/platform/user-guide/spark/setting-up-and-managing-spark/managing-knowledge-sources "mention") documentation.
{% endstep %}

{% step %}

### Enable diagnosis and remediation actions for Spark

Validate and enable actions for Spark in Nexthink.

<details>

<summary>Enable built-in Agent actions</summary>

From the main navigation menu:

1. Go to **Spark** > **Manage actions** and review the **Agent actions** designed to work with Spark.
2. Enable the desired **Agent actions** for Spark use.

Refer to the [Managing Spark actions](https://docs.nexthink.com/platform/user-guide/spark/setting-up-and-managing-spark/managing-agent-actions) documentation for more information.

</details>

<details>

<summary>Activate custom remote actions of workflows</summary>

Configure custom or Nexthink Library remote actions or workflows and enable them in Spark by selecting Spark trigger method and activating them in Spark cockpit.

Refer to the [#remote-actions-and-workflows-for-spark](https://docs.nexthink.com/platform/user-guide/spark/managing-agent-actions#remote-actions-and-workflows-for-spark "mention") documentation for more information

</details>

{% hint style="warning" %}
Nexthink advises against setting up remote actions for Spark that involve Nexthink campaigns.
{% endhint %}
{% endstep %}

{% step %}

### Enable Spark to continuously learn from resolved tickets

To enable Spark to continuously learn from resolved tickets in ServiceNow, **Configure ServiceNow Incident Connector** to ingest past incident data.&#x20;

Refer to the [connector-for-servicenow-incidents](https://docs.nexthink.com/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/inbound-connectors/connector-for-servicenow-incidents "mention") documentation for more information.
{% endstep %}

{% step %}

### Configure ticket escalation with Spark

Configure Spark to automatically create ITSM tickets when an issue cannot be resolved. Integrate Nexthink with your ITSM platform and define how Spark generates escalation tickets. This integration ensures that unresolved issues are escalated with the relevant context.

Refer to the [ticket-escalation-with-spark](https://docs.nexthink.com/platform/user-guide/spark/setting-up-and-managing-spark/ticket-escalation-with-spark "mention") documentation for more information.
{% endstep %}

{% step %}

### Communicate Spark deployment

Select the employee group for Spark deployment and prepare communications.

* Use the controls in the MS Teams admin console to select the employees with Spark access.
* Inform employees about the scope of the Spark agent and remind them to exercise judgment when reading AI-generated replies.
  {% endstep %}
  {% endstepper %}


---

# Agent Instructions: 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:

```
GET https://docs.nexthink.com/platform/user-guide/spark/setting-up-and-managing-spark.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
