Jump to: navigation, search

SwitchToCoach

This operation is part of the Chat API section of the Web Services API.

Overview

This allows a supervisor to switch from Monitor or BargeIn mode to coaching the current chat.

Request URL /api/v2/me/chats/{id}
HTTP Method POST
Required Features api-multimedia

Parameters

Parameter Value
operationName SwitchToCoach

Sample

Request

POST api/v2/me/chats/007102385535e00e
{
  "operationName": "SwitchToCoach"
}

Response

{
  "statusCode": 0
}

Notification

After switching to coaching supervisor receives ParticipantsUpdated and MessageLogUpdated notifications with supervisor's actual visibility mode.

{
    "chat": {
        "receivedDate": "2014-05-0511:08:45.000-0700",
        "chatType": "Inbound",
        "capabilities": [
            "Leave",
            "SetInFocus",
            "SetDisposition",
            "AttachUserData",
            "DeleteUserData",
            "UpdateUserData",
            "Transfer",
            "Invite",
            "Consult",
            "SendToAgents",
            "SendStartTypingToAgentsNotification",
            "SendStopTypingToAgentsNotification",
            "SendMessage",
            "SendStartTypingNotification",
            "SendStopTypingNotification",
            "SwitchToMonitor",
            "SwitchBargeIn"
        ],
        "uri": "http://10.10.15.212:9090/api/v2/chats/0001Da9PFC93000S",
        "state": "Chatting",
        "participants": [
            {
                "nickname": "test_agent",
                "type": "Agent",
                "uri": "http://10.10.15.212:9090/api/v2/users/90cc5439ff6848748e5e67811273f266",
                "visibility": "All",
                "participantId": "00AF5367D3D0000A"
            },
            {
                "nickname": "test_supervisor",
                "type": "Agent",
                "uri": "http://10.10.15.212:9090/api/v2/users/991a4bece8dd4184a93e98ad429694f6",
                "visibility": "Agents",
                "participantId": "00AF5367D3D0000B"
            },
            {
                "nickname": "test_clientL",
                "type": "Customer",
                "participantId": "00AF5367D3AD0008",
                "visibility": "All"
            }
        ],
        "id": "0001Da9PFC93000S"
    },
    "notificationType": "ParticipantsUpdated",
    "messageType": "ChatStateChangeMessage"
}
{
    "messages": [
        {
            "index": 4,
            "from": {
                "nickname": "test_supervisor",
                "type": "Agent",
                "uri": "http://10.10.15.212:9090/api/v2/users/991a4bece8dd4184a93e98ad429694f6",
                "visibility": "Agents",
                "participantId": "00AF5367D3D0000B"
            },
            "timestamp": "2014-05-0511:09:31.000-0700",
            "visibility": "All",
            "type": "ParticipantRejoined",
            "timestampSeconds": 1399313371000L
        }
    ],
    "notificationType": "NewMessages",
    "messageType": "MessageLogUpdated",
    "chatUri": "http://10.10.15.212:9090/api/v2/chats/0001Da9PFC93000S"
}
This page was last edited on October 31, 2023, at 13:28.
Comments or questions about this documentation? Contact us for support!