Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
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 filtered by various criteria such as tags, users, departments, channels, status, or date ranges.
- Integrating session data into dashboards or reports to track agent performance or customer interactions.
- Automating workflows based on session states or metadata, e.g., triggering follow-ups for pending sessions.
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 distribution.
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 via expression. |
| Department Name or ID | Filter sessions by a specific department name or ID. Choose from a list or specify an ID via 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 via 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 representing chat sessions matching the specified filters. Each item contains session data fields returned by the WTS API, potentially including:
- Session identifiers and metadata
- Status and timestamps (active, end, last interaction)
- Associated tags, users, departments, contacts, and channels
- Additional details if requested (agent info, channel type, classification, etc.)
The node does not output binary data for this operation.
Dependencies
- Requires an API key credential for authenticating with the WTS API.
- The base URL for API requests is
https://api.wts.chat. - The node depends on internal services (
WtsChatService) to perform API calls. - Proper configuration of credentials in n8n is necessary for successful execution.
Troubleshooting
- Empty or missing SessionID: Some operations require a valid session ID; ensure it is provided and non-empty.
- Invalid filter values: Using unsupported or incorrectly formatted filter values may cause errors or empty results.
- API authentication errors: Verify that the API key credential is correctly configured and has sufficient permissions.
- Pagination issues: If using auto pagination, be mindful of the max pages limit to avoid excessive API calls.
- Network or API downtime: Temporary connectivity issues or API outages will result in errors; retry later or check service status.
Common error messages thrown by the node include:
"SessionID is empty!"— Provide a valid session ID when required."Fill in the field session"— Required session-related parameter is missing."Add a valid status!"— Ensure the status filter or update value is valid."Choose from the list"or"Choose a valid template"— Select valid options from dropdowns or provide correct IDs.
Resolving these typically involves verifying input parameters and credentials.
Links and References
- WTS Chat API Documentation (Assumed official docs URL)
- n8n Expressions Documentation
- Date and Time Formatting in n8n