Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The "UpdateSession" operation in the WTS Chat node allows users to update various fields of an existing chat session within the WTS platform. This operation is useful for modifying session details such as status, assigned department or user, session end time, session number, metadata, and reactivation settings.
Typical use cases include:
- Changing the status of a session (e.g., marking it as completed or pending).
- Reassigning a session to a different department or user.
- Updating session metadata for custom tracking or integration purposes.
- Adjusting the session's scheduled end time or session number.
For example, a customer support team might use this node to mark a chat session as "Completed" after resolving a customer's issue or transfer the session to another department for specialized handling.
Properties
| Name | Meaning |
|---|---|
| Session ID | The unique identifier of the session to update. |
| Fields | Specifies which fields of the session will be updated. Options: 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 and time for the session, formatted as YYYY-MM-DD hh:mm in the user's timezone. |
| Number | The new session number (string). |
| Status Session | The new status of the session. Options: Completed, Hidden, In Progress, Pending, Started, Undefined. |
| Metadata | Key-value pairs to add or update custom metadata fields associated with the session. |
Output
The node outputs JSON data representing the updated session object returned by the WTS API. This JSON includes the updated session fields reflecting the changes made.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the WTS API.
- The node depends on the WTS Chat service endpoints to perform session updates.
- Proper configuration of the WTS API credentials in n8n is necessary.
Troubleshooting
- Empty Session ID: If the "Session ID" property is empty or contains only whitespace, the node throws an error indicating that the SessionID must be filled in.
- Invalid Field Selection: Ensure that at least one field is selected in the "Fields" property to update; otherwise, no update will occur.
- Invalid Status Value: When updating the status, selecting "Undefined" may not apply any change; choose a valid status option.
- API Errors: Any errors returned by the WTS API during the update process are caught and reported as node errors. Check the API key validity and network connectivity if errors persist.
- Metadata Format: Metadata must be provided as key-value pairs; incorrect formatting may cause update failures.
Links and References
- WTS Chat API Documentation (general reference for API capabilities)
- n8n Expressions Documentation (for using expressions in properties like Department or User IDs)