Integrating chatbots using Nexthink REST APIs
Without integration, chatbots cannot retrieve device or user information. This leads to incomplete responses, employee frustration, and unnecessary service desk escalations.
By integrating with Nexthink APIs, your chatbot can:
- Provide data-driven chatbot responses 
- Retrieve real-time device and employee context using NQL queries 
- Diagnose issues in real time within the conversation 
- Trigger associated actions to remediate problems instantly 
How does chatbot integration work using Nexthink API features?
Nexthink chatbot-API integrations adhere to the following structure:
- The chatbot system controls the interaction with employees, including conversation content and logic. 
- Nexthink provides APIs that the chatbot calls during conversations: - NQL API - Retrieve context-related data from Nexthink. 
- Remote Action API - If applicable, trigger a remediation remote action. 
 

Chatbot flow using Nexthink API technologies
Find below the chatbot flow with tasks to achieve issue resolution via Nexthink APIs.
- Authenticate communication 
API credentials - token collection via the API.
- Identify employee or device 
NQL API - Retrieve specific username and/or device identifier data.
(Optional) Data Export- Export essential data, such as user/device names and last seen dates, to regularly enrich the chatbot-integrated CMDB system.
- Diagnose the user device 
NQL API - Retrieve employee device information (e.g., device health, application metrics) to narrow down remediation actions to follow.
- Remediate device issues 
Remote Action API - Trigger remediation action on target device based on diagnosis, or upon user request.
- Follow up and confirm fix 
NQL API - Retrieve the results of the remote action execution.
- Proactive identification of issues 
Data exporters (optional) - Export all users and devices potentially impacted by the issue to solutions like a data lake. This enables proactive communication of issues to employees.
Webhooks (optional)—Send notifications when specific events or alerts are triggered, allowing chatbots to proactively identify impacted employees.
Configuring Nexthink API features to support chatbot integration
Before implementing API calls within the chatbot's service layer, as a Nexthink administrator, conduct the following preliminary configurations in Nexthink.
Plan the API integration for a specific chatbot
- Verify that your API usage complies with Nexthink's API usage limits. Refer to the Nexthink developer portal documentation for more information. 
- Map how to match users between your chatbot solution and Nexthink. - Nexthink Collector compiles username, SID, and UPN, if activated. 
- Connector for Microsoft Entra ID provides additional data for mapping, including user email, if activated in your Nexthink instance. 
 
Set up API credentials in Nexthink
- Configure API credentials to secure calls from the chatbot to your Nexthink tenant and outbound connections—data exporters and webhooks. Ensure that you have the following permissions activated in your API credentials: - NQL API 
- Remote Actions API 
 
- Optionally, configure connector credentials if you plan to use outbound integrations. 

Create Nexthink content for contextual data retrievals and remediation actions—for API calls
- Create NQL queries within the Nexthink user interface to define the NQL API calls from the chatbot. Typically, required queries include: - Query to retrieve devices and their basic information for a given user. 
- Query to retrieve ad-hoc diagnostic information for a given user or device. 
- Query to retrieve the status and outputs of a remote action. 
 
- Create remote actions configured for API triggers. Alternatively, install a large set of preconfigured remote actions from the Nexthink Library that you can use and adapt. 

Using pre-built content to implement REST API calls within chatbot's service layer
Once you configured all necessary API features listed above within Nexthink, move on to implementing the REST API calls within the chatbot's service layer—explained in detail in a end-to-end use case.
To help you get started, find below query samples and pre-built content that you can use and adapt when configuring your chatbot orchestration and logic.
Generic NQL query samples for chatbot tasks
As part of configuring chatbot orchestration and logic using REST APIs, you need to set up generic queries to perform two basic tasks below that are useful across all chatbot integrations with Nexthink:
Pre-built content for implementing chatbot REST API calls to address common issues
Use pre-built content—including NQL queries for diagnosis, remote actions and remediation logic—to configure your chatbot integration to diagnose, solve, and confirm the fix status of the following common issues:
All remote actions listed above should be installed from the Nexthink Library and require prior configuration:
- Data-collection remote actions must have an active Schedule-type trigger and a collection schedule set to hourly or daily, depending on the required frequency. 
- Remediation remote actions must have an active API-type trigger. 
RELATED TOPIC
Last updated
Was this helpful?