WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The WTS Chat node's "Session" resource with the "ChangeStatus" (technically named updateStatusSession) operation allows you to update the status of a chat session in the WTS platform. This is useful for managing the lifecycle of customer support or sales conversations, such as marking sessions as completed, in progress, pending, etc.

Common scenarios:

  • Automatically closing sessions when a conversation ends.
  • Marking sessions as "In Progress" when an agent starts handling them.
  • Hiding sessions that should no longer be visible.
  • Integrating session status changes into automated workflows for reporting or escalation.

Practical example:
When a customer support ticket is resolved, use this node to set the session status to "Completed" so it no longer appears in active queues.


Properties

Display Name Type Description
Session ID String The unique identifier of the session whose status you want to change.
Status Options The new status to assign to the session. Possible values: Completed, Hidden, In Progress, Pending, Started, Undefined.

Output

  • The output will be a single item with a json field containing the response from the WTS API after updating the session status.
  • The structure of the json object depends on the WTS API but typically includes details about the updated session, such as its ID and new status.

Example output:

[
  {
    "json": {
      // ...fields returned by the WTS API, e.g.:
      "id": "session_12345",
      "status": "COMPLETED",
      // other session details...
    }
  }
]

Dependencies

  • External Service: Requires access to the WTS API.
  • API Key: You must configure valid WTS API credentials (wtsApi) in n8n for this node to function.

Troubleshooting

Common issues:

  • Missing required fields: If either "Session ID" or "Status" is not provided, the node will throw an error:
    • "Fill in all fields"
    • "Both sessionId and status are required to update the session status."
  • Invalid status: If the status is left as "Undefined", the node will throw:
    • "Add a valid status!"
  • Session not found: If the provided Session ID does not exist, the WTS API may return an error, which will be surfaced by the node.

How to resolve:

  • Ensure both "Session ID" and a valid "Status" are filled in.
  • Do not leave the status as "Undefined".
  • Double-check the Session ID exists in your WTS system.

Links and References

Discussion