WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The node interacts with the WTS Chat API to manage chat sessions and related entities. Specifically, for the Session resource and the ChangeStatus operation, it updates the status of a given chat session. This is useful in scenarios where you want to programmatically track or modify the lifecycle state of a chat session, such as marking it as completed, pending, or in progress.

Practical examples include:

  • Automatically marking a support chat session as "Completed" after a resolution.
  • Changing a session's status to "In Progress" when an agent starts handling it.
  • Setting a session to "Hidden" to archive or hide it from active views.

Properties

Name Meaning
Session ID The unique identifier of the chat session whose status you want to change.
Status The new status to assign to the session. Options: Completed, Hidden, In Progress, Pending, Started, Undefined

Output

The node outputs a JSON object representing the updated session status response from the WTS Chat API. This typically includes confirmation of the status change and any relevant session metadata returned by the API.

No binary data output is involved in this operation.

Example output structure (simplified):

{
  "newStatus": "COMPLETED",
  "sessionId": "string",
  "updatedAt": "timestamp",
  ...
}

Dependencies

  • Requires an API key credential for authenticating with the WTS Chat API.
  • The node uses the WTS Chat service endpoint https://api.wts.chat.
  • Proper configuration of the API key credential in n8n is necessary.

Troubleshooting

  • Missing or empty Session ID: The node throws an error if the Session ID is not provided or is empty. Ensure the Session ID field is filled correctly.
  • Invalid or undefined status: If the status is missing or set to "Undefined", the node will throw an error prompting to provide a valid status.
  • API errors: Any issues communicating with the WTS Chat API (e.g., invalid API key, network issues) will result in errors wrapped as NodeApiError. Check your API key validity and network connectivity.
  • Permission issues: Make sure the API key has sufficient permissions to update session statuses.

Links and References

Discussion