WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The node provides functionality to update an existing session in the WTS Chat system. It allows modifying various session attributes such as status, department, assigned user, end time, number, metadata, and autocomplete settings. This is useful for managing ongoing chat sessions, updating their state, reassigning them to different departments or users, or adding additional information.

Common scenarios include:

  • Changing the status of a session (e.g., marking it as completed or in progress).
  • Reassigning a session to a different department or user.
  • Updating session metadata for custom tracking.
  • Setting an end time or changing the session's associated number.

Practical example: A customer support team might use this node to update a chat session’s status to "Completed" once the issue is resolved, assign the session to a specific agent, or add metadata tags for reporting purposes.

Properties

Name Meaning
Session ID The unique identifier of the session to update.
Company ID The company code associated with the session.
Fields The list of fields to update in the session. Options: Autocomplete, DepartmentId, EndAt, Metadata, Number, ReactivateDisabled, Status, UserId.
Departments Name or ID The department to assign the session to (used if updating DepartmentId or UserId).
User Name or ID The user to assign the session to (used if updating UserId).
EndAt The new end date and time for the session (format: YYYY-MM-DD hh:mm).
Number The new number associated with the session.
Status Session The new status of the session. Options: Completed, Hidden, In Progress, Pending, Started, Undefined.
Metada Key-value pairs representing metadata to add or update on the session.

Output

The node outputs a JSON object containing the updated session data returned from the WTS Chat API after the update operation. This typically includes all session details reflecting the changes made.

If the update is successful, the output will be an array with one item containing the JSON response from the API.

Dependencies

  • Requires an active connection to the WTS Chat API via an API key credential.
  • The node depends on the WTS Chat service endpoints to perform session updates.
  • No additional environment variables are explicitly required beyond the API key credential configuration.

Troubleshooting

  • SessionID is empty!
    Error thrown if the Session ID property is not provided or is empty. Ensure the Session ID is correctly set.

  • Add a valid status!
    When updating the status field, selecting "Undefined" or leaving it blank causes an error. Choose a valid status option.

  • The transfer destination user or department must be defined
    If updating department or user assignment, both must be properly selected; otherwise, the update fails.

  • API errors
    Any issues communicating with the WTS Chat API (network issues, invalid credentials, etc.) will throw errors wrapped as NodeApiError. Verify API key validity and network connectivity.

Links and References


This summary focuses exclusively on the updateSession operation within the session resource as requested.

Discussion