WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The "Get All Sessions" operation of the WTS Chat node retrieves a list of chat sessions from the WTS API. This operation is useful for monitoring, managing, or analyzing ongoing and past chat sessions within a customer support or communication platform.

Typical use cases include:

  • Fetching all active or completed chat sessions to display in dashboards.
  • Filtering sessions by various criteria such as tags, users, departments, channels, status, or date ranges.
  • Integrating session data into CRM systems or analytics tools.
  • Automating workflows based on session activity or status changes.

For example, a support team might use this node to pull all sessions that are currently "In Progress" and assigned to a specific department, enabling them to prioritize workload or trigger follow-up actions.

Properties

Name Meaning
Tag Names or IDs Filter sessions by one or more tag names or IDs. You can select from a list or specify IDs via expressions.
User Name or ID Filter sessions by a specific user name or ID. Choose from a list or specify an ID using an expression.
Department Name or ID Filter sessions by a specific department name or ID. Choose from a list or specify an ID using an expression.
Contact ID Filter sessions by a specific contact ID. Enter the contact ID directly.
Channel Names or IDs Filter sessions by one or more channel names or IDs. Choose from a list or specify IDs using expressions.
ActiveAt.After Filter sessions with an active timestamp after the specified date/time (format: YYYY-MM-DD hh:mm).
ActiveAt.Before Filter sessions with an active timestamp before the specified date/time.
EndAt.After Filter sessions with an end timestamp after the specified date/time.
EndAt.Before Filter sessions with an end timestamp before the specified date/time.
LastInteractionAt.After Filter sessions with last interaction timestamp after the specified date/time.
LastInteractionAt.Before Filter sessions with last interaction timestamp before the specified date/time.
Status Session Filter sessions by their status. Options include: Completed, Hidden, In Progress, Pending, Started.
Include Details Specify additional details to include in the response. Options include: AgentDetails, ChannelDetails, ChannelTypeDetails, ClassificationDetails, ContactDetails, DepartmentsDetails, Undefined.
CreatedAt.After Filter sessions created after the specified date/time.
CreatedAt.Before Filter sessions created before the specified date/time.
UpdatedAt.After Filter sessions updated after the specified date/time.
UpdatedAt.Before Filter sessions updated before the specified date/time.
Auto Pagination Enable automatic pagination to retrieve multiple pages of results automatically.
Max Pages When auto pagination is enabled, set the maximum number of pages to retrieve (1-100).
Page Number When auto pagination is disabled, specify which page number to retrieve.
Page Size When auto pagination is disabled, specify the number of items per page (1-100).
Order By Field name to sort the results by.
Order Direction Direction of sorting: Ascending or Descending.

Output

The output is an array of JSON objects, each representing a chat session matching the specified filters. The structure includes session metadata such as session ID, status, timestamps (active, end, last interaction), associated tags, user and department info, contact details, channels involved, and optionally detailed nested information depending on the "Include Details" property.

If binary data is returned (not typical for this operation), it would represent files or attachments related to sessions, but this operation primarily returns structured JSON data about sessions.

Dependencies

  • Requires an API key credential for authenticating with the WTS API.
  • The node uses the base URL https://api.wts.chat for API requests.
  • Proper permissions on the API key are necessary to access session data.
  • The node depends on internal services (WtsChatService) to interact with the API.

Troubleshooting

  • Empty or missing SessionID: If required fields like SessionID are empty when needed, the node throws errors prompting to fill these fields.
  • Invalid filter values: Providing invalid IDs or unsupported filter values may cause API errors.
  • API authentication errors: Ensure the API key credential is valid and has sufficient permissions.
  • Pagination issues: When auto pagination is enabled, setting an excessively high max page count may lead to long execution times or rate limiting.
  • Network or API downtime: Temporary network issues or API unavailability will result in errors; retry later or check API status.
  • Date format errors: Date/time inputs must be in the correct format (YYYY-MM-DD hh:mm) and respect time zones.

Links and References

Discussion