Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The "Complete Session" operation in the WTS Chat node allows users to conclude (complete) a chat session by its ID. This operation is useful for marking a conversation as finished, which can help in managing active sessions and workflow automation. Additionally, it supports an option to automatically reactivate the session if a new message arrives from the contact after conclusion.
Common scenarios include:
- Customer support workflows where agents want to close a session once the issue is resolved.
- Automating session lifecycle management by concluding sessions programmatically.
- Reactivating sessions automatically when customers send follow-up messages, ensuring no conversations are missed.
Example use case:
- An agent finishes a chat with a customer and uses this node to mark the session as concluded. If the customer sends another message later, the session can be reactivated automatically based on the provided option.
Properties
| Name | Meaning |
|---|---|
| Session ID | The unique identifier of the session to be concluded. |
| Reactivate On New Message | Boolean flag indicating whether the session should be reactivated automatically upon receiving a new message from the contact. Default is false. |
Output
The output JSON contains the response from the API call that concludes the session. It typically includes details about the session status after completion.
The structure is:
{
"json": {
// API response object representing the updated session state after conclusion
}
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the WTS Chat API.
- The node depends on the external WTS Chat service API endpoint
https://api.wts.chat. - Proper configuration of the API key credential in n8n is necessary.
Troubleshooting
- SessionID is empty: If the "Session ID" property is not provided or is empty, the node will throw an error prompting to fill in the SessionID field.
- API errors: Any issues returned by the WTS Chat API during the conclude session request will be surfaced as node errors. Check the API key validity and network connectivity.
- Reactivation behavior: If "Reactivate On New Message" is set but the session does not reactivate, verify that the WTS Chat backend supports this feature and that the session is eligible for reactivation.
Links and References
- WTS Chat API Documentation (general reference for API endpoints)
- n8n documentation on creating custom nodes