WTS Chat icon

WTS Chat

Get data from Wts API

Overview

This node interacts with the WTS Chat API to manage chat sessions and related data. Specifically, the "Get Session By ID" operation retrieves detailed information about a particular chat session using its unique session ID. Users can optionally include additional details such as agent info, channel info, classification, contact, departments, and more.

This node is beneficial in scenarios where you need to fetch comprehensive session data for customer support, analytics, or integration purposes. For example, a support dashboard might use this node to display all relevant session details when an agent selects a session, or an automation workflow could retrieve session metadata to trigger follow-up actions.

Properties

Name Meaning
Session ID The unique identifier of the chat session to retrieve.
Include Details Optional list of additional details to include in the response. Possible values:
- AgentDetails: Information about the agent handling the session.
- ChannelDetails: Details about the communication channel used.
- ChannelTypeDetails: Type-specific channel information.
- ClassificationDetails: Classification metadata of the session.
- ContactDetails: Information about the contact involved in the session.
- DepartmentsDetails: Department-related details associated with the session.
- Undefined: Placeholder or unspecified detail inclusion option.

Output

The output is a JSON object representing the session data retrieved from the WTS Chat API. It includes the core session information identified by the provided Session ID, along with any optional details requested via the "Include Details" property.

The structure typically contains fields such as session identifiers, status, timestamps, participants (agent, contact), channel information, classification tags, department assignments, and metadata.

If binary data were involved (not applicable here), it would be summarized accordingly, but this operation returns purely JSON data.

Example output snippet (conceptual):

{
  "sessionId": "abc123",
  "status": "active",
  "startTime": "2024-01-01T12:00:00Z",
  "agent": {
    "id": "agent001",
    "name": "John Doe"
  },
  "channel": {
    "id": "channel01",
    "type": "WhatsApp"
  },
  "contact": {
    "id": "contact123",
    "name": "Jane Smith"
  },
  "classification": { ... },
  "departments": [ ... ],
  "metadata": { ... }
}

Dependencies

  • Requires an API key credential for authenticating with the WTS Chat API.
  • The base URL for API requests is https://api.wts.chat.
  • No other external dependencies are required.
  • The node expects proper configuration of the API key credential within n8n.

Troubleshooting

  • SessionID is empty!
    Error thrown if the "Session ID" property is not provided or is an empty string. Ensure that a valid session ID is entered.

  • API errors
    If the API key is invalid or lacks permissions, the node will throw an error indicating authentication failure. Verify the API key and permissions.

  • Network issues
    Connectivity problems to the WTS Chat API endpoint may cause timeouts or connection errors. Check network access and proxy settings if applicable.

  • Invalid Include Details options
    Providing unsupported or misspelled options in "Include Details" may result in incomplete or failed responses. Use only the documented options.

Links and References


This summary is based solely on static analysis of the provided source code and input properties definition.

Discussion