Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The node provides integration with the WTS Chat API, enabling automation workflows to manage chat sessions and related entities. Specifically, the UpdateSession operation under the Session resource allows users to update various attributes of an existing chat session such as its status, assigned department or user, end time, number, metadata, and reactivation settings.
This operation is useful in scenarios where you want to programmatically modify session details based on external triggers or workflow logic. For example:
- Marking a session as completed after a support interaction.
- Reassigning a session to a different department or user.
- Adding or updating metadata for tracking purposes.
- Changing the session's end time or number identifier.
Properties
| Name | Meaning |
|---|---|
| Session ID | The unique identifier of the session to update. |
| Fields | The list of fields to update in the session. Options include: Autocomplete, DepartmentId, EndAt, Metadata, Number, ReactivateDisabled, Status, UserId. |
| Department Name or ID | The new department to assign the session to (if updating DepartmentId). Can be selected from a list or specified via expression. |
| User Name or ID | The new user to assign the session to (if updating UserId). List updates dynamically based on department selection. |
| EndAt | The new end date/time of the session in YYYY-MM-DD hh:mm format according to your timezone. |
| Number | The new number identifier for the session. |
| Status Session | The new status of the session. Options: Completed, Hidden, In Progress, Pending, Started, Undefined. |
| Metadata | Key-value pairs to add or update as metadata on the session. Multiple entries can be added. |
Output
The output of this operation is a JSON object representing the updated session data returned by the WTS Chat API. It contains the session's current state after applying the updates, including any changed fields and metadata.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the WTS Chat API using an API key credential.
- The node expects the API key to be configured in n8n credentials for authentication.
- The operation depends on the WTS Chat service endpoints for session management.
Troubleshooting
- "SessionID is empty!": This error occurs if the Session ID property is not provided or is blank. Ensure you specify a valid session ID to update.
- Invalid field values: If you select fields to update but do not provide corresponding values, the API may reject the request. Make sure all required fields for the chosen updates are filled.
- API errors: Network issues or invalid API keys will cause errors. Verify your API key credential and network connectivity.
- Metadata formatting: Metadata must be provided as key-value pairs. Incorrect formatting may cause failures.
Links and References
- WTS Chat API Documentation (generic link, replace with actual if available)
- n8n Expressions Documentation - for dynamic property values
- Date and Time Formatting Guide - for correct EndAt input format