Leave
This operation is part of the Chat API section of the Web Services API.
Overview
This operation will cause an agent to leave a chat session. If the agent was participating in a conference, the agent will leave the conference.
Important
If the agent was in a conference, the chat session will still be open for the customer. If the agent is not in a conference, this operation will end the chat session for the customer, but will still allow the agent to update user data and set disposition as indicated in capabilities outlined in the CometD notifications message.Request URL | /api/v2/me/chats/{id} |
---|---|
HTTP Method | POST |
Required Features | api-multimedia |
Parameters
Parameter | Value |
---|---|
operationName | Leave |
text | (Optional) The text to send to the customer. |
messageType | (Optional) Defines the message type. The default value is Text. Note that this parameter must be provided together with the text parameter. |
treatAs | (Optional) Specifies how the message should be treated: Normal or System. The default value is Normal. Note that this parameter must be provided together with the text parameter. |
Sample
Request
POST api/v2/me/chats/0071023821aec011 { "operationName": "Leave" }
Response
{ "statusCode": 0 }
Notification
Agent is NOT in conference
{ "messageType": "ChatStateChangeMessage", "referenceId": 17, "notificationType": "StatusChange", "chat": { "state": "LeftChat", "capabilities": [ "Transfer", "Complete", "Leave", "InFocus" ], "id": "0000Na9B26EF002X", "uri": "http://localhost:8080/api/v2/chats/0000Na9B26EF002X", } }
Agent is in a conference/consultation
{ "messageType": "ChatStateChangeMessage", "notificationType": "StatusChange", "chat": { "state": "Completed", "id": "0000Na9B26EF002X", "uri": "http://localhost:8080/api/v2/chats/0000Na9B26EF002X", } } }
This page was last edited on October 31, 2023, at 13:28.
Comments or questions about this documentation? Contact us for support!