Actions38
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The "Assign User" operation within the "Session" resource of this node allows you to assign a specific user to an existing session in the WTS Chat system. This is useful for routing or delegating chat sessions to particular team members or agents, ensuring that conversations are managed by the appropriate personnel.
Typical use cases include:
- Automatically assigning incoming chat sessions to available support agents.
- Reassigning sessions to different users based on workload or expertise.
- Integrating with workflows that manage session ownership dynamically.
For example, after retrieving a session ID from a previous step, you can use this operation to assign that session to a user by specifying their user ID or username.
Properties
| Name | Meaning |
|---|---|
| Session ID | The unique identifier of the session to which a user will be assigned. |
| User Name or ID | The user to assign to the session. You can select from a list of users or specify a user ID via expression. The option "Undefined" means no user is selected (not valid for this operation). |
Output
The output JSON contains the response from the API call that assigns the user to the session. It typically includes details about the updated session, confirming the assignment. The exact structure depends on the external API but generally includes session metadata and the assigned user's information.
No binary data output is involved in this operation.
Example output snippet (conceptual):
{
"json": {
"sessionId": "abc123",
"assignedUser": {
"id": "user456",
"name": "John Doe"
},
"status": "assigned"
}
}
Dependencies
- Requires an active connection to the WTS Chat API.
- Needs an API key credential configured in n8n for authentication.
- The node uses internal services to fetch user IDs dynamically for the user selection property.
Troubleshooting
Error: "SessionID is empty!"
Occurs if the Session ID property is not filled. Ensure you provide a valid session ID.Error: "UserID is empty!"
Happens when no user is selected or specified. Make sure to choose a user from the list or provide a valid user ID.API Errors
If the API returns errors (e.g., invalid session ID, unauthorized access), check your API key credentials and verify that the session and user IDs exist and are correct.User List Loading Issues
If the user dropdown does not populate, ensure the node has proper permissions and connectivity to fetch user data from the API.
Links and References
- WTS Chat API Documentation (general reference, replace with actual docs if available)
- n8n Expressions Documentation - for using expressions in properties like User ID
This summary is based solely on static analysis of the provided source code and input property definitions.