WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The WTS Chat node's "Session → Transfer Session" operation allows you to transfer an active chat session to another department or a specific user within a department. This is useful in customer support workflows where conversations need to be escalated, reassigned, or routed to specialized teams or agents.

Common scenarios:

  • Escalating a customer inquiry from general support to a technical department.
  • Assigning a session to a specific agent based on availability or expertise.
  • Automating handoff between departments as part of a service workflow.

Example:
A customer starts a chat with sales, but their question requires technical assistance. The automation uses this node to transfer the session to the technical support department or directly to a designated technician.


Properties

Display Name Type Description
Session ID String The unique identifier of the session to be transferred. Required.
Department Name or ID Options Select the target department for the transfer. You can choose from a list or specify an ID using an expression. If not set (value "NOT_SEND"), the transfer will not target a department.
User Name or ID Options Select the specific user within the chosen department to receive the session. The list updates based on the selected department. You can also specify a user ID via an expression. If not set ("NOT_SEND"), only department is used.

Output

The output is a single item per input, with the following structure in the json field:

{
  // The response from the WTS Chat API after transferring the session.
  // Typical fields may include:
  "success": true,
  "message": "Session transferred successfully",
  "sessionId": "abc123",
  "newDepartmentId": "dep456",      // if department transfer
  "newUserId": "user789",           // if user transfer
  // ...other metadata returned by the API
}
  • The exact fields depend on the WTS Chat API response, but you can expect confirmation of the transfer and identifiers for the new assignee.

Dependencies

  • External Service: Requires access to the WTS Chat API.
  • API Key: You must configure valid WTS Chat API credentials (wtsApi) in n8n.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common Issues:

  • Missing Session ID:

    • Error: "Fill in the field session"
      Solution: Ensure the "Session ID" property is provided and not empty.
  • Invalid Department/User Selection:

    • If both Department and User are set to "NOT_SEND", the transfer may not occur as expected. At least one should be specified.
  • API Authentication Errors:

    • Error: Unauthorized or invalid API key.
      Solution: Check your WTS Chat API credentials in n8n.
  • User Not in Department:

    • If you select a user who does not belong to the chosen department, the transfer may fail. Always update the user list after selecting a department.

Links and References


Discussion