Jump to: navigation, search

SwitchToCoach

This operation is part of the SMS Session API section of the Web Services API.

Overview

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

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

Parameters

Parameter Value
operationName SwitchToCoach

Sample

Request

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

Response

{
  "statusCode": 0
}

Notification

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

{
    "smssession": {
        "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/smssessions/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": "SMSsessionStateChangeMessage"
}
{
    "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",
    "smssessionUri": "http://10.10.15.212:9090/api/v2/smssessions/0001Da9PFC93000S"
}
This page was last edited on November 4, 2016, at 17:54.
Comments or questions about this documentation? Contact us for support!