Jump to: navigation, search

Consult

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

Overview

This allows an agent to consult with another agent or with a queue. A consult occurs in the same chat context, but the customer will not be aware of the presence of a consulting agent.

Messages and notification from a consulting agent will only be visible to other agents in the chat, not to the customer.

After a consultation has started, the originating agent can either Transfer to the consulting agent or Conference with the consulting agent.

The consulting agent can Leave the chat.

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

Parameters

Parameter Value
operationName Consult
targetUri contact URI, where contact is either an agent or multimedia queue

Sample

Request

POST api/v2/chats/0000Na9B26EF006E
{
  "operationName": "Consult",
  "targetUri": "http://localhost:8080/api/v2/users/429a55994ef64991a77acb77c1cf9041"
}

Response

{
  "statusCode": 0,
  "referenceId": 35
}

Notification

Successful

First Notification

{
    u'notificationType': u'ParticipantsUpdated',
    u'messageType': u'ChatStateChangeMessage',
    u'chat': {
        u'participants': [
            {
                u'nickname': u'TestName',
                u'type': u'Agent',
                u'participantId': u'009052CB05C900EA'
            },
            {
                u'nickname': u'BFriend',
                u'type': u'Agent',
                u'participantId': u'009052CB05CA00EB'
            },
            {
                u'nickname': u'FirstL',
                u'type': u'Customer',
                u'participantId': u'009052CB056C00E5'
            },
            {
                u'nickname': u'TestName',
                u'type': u'Agent',
                u'participantId': u'009052CB057100E7'
            }
        ],
        u'state': u'Chatting',
        u'id': u'0000Na9B26EF006E',
        u'capabilities': [
            u'Transfer',
            u'Leave',
            u'Invite',
            u'Consult',
            u'SetInFocus',
            u'SetDisposition',
            u'AttachUserData',
            u'DeleteUserData',
            u'UpdateUserData',
            u'SendToAgents',
            u'SendStartTypingToAgentsNotification',
            u'SendStopTypingToAgentsNotification',
            u'Complete',
            u'SendMessage',
            u'SendStartTypingNotification',
            u'SendStopTypingNotification'
        ],
        u'uri': u'http: //localhost: 8080/api/v2/chats/0000Na9B26EF006E'
    }
}

Second Notification

{
    u'messages': [
        {
            u'index': 3,
            u'from': {
                u'nickname': u'BFriend',
                u'type': u'Agent',
                u'participantId': u'009052CB05CA00EB'
            },
            u'timestamp': u'2014-01-0612: 14: 06.007-0800',
            u'visibility': u'Agents',
            u'type': u'ParticipantJoined',
            u'timestampSeconds': 1389039246007L
        }
    ],
    u'notificationType': u'NewMessages',
    u'messageType': u'MessageLogUpdated',
    u'chatUri': u'http: //localhost: 8080/api/v2/chats/0000Na9B26EF006E'
}

Failed

{
    u'notificationType': u'Error',
    u'messageType': u'ChatStateChangeMessage',
    u'errorMessage': u'Operationfailed',
    u'referenceId': 36,
    u'chat': {
        u'participants': [
            {
                u'nickname': u'TestName',
                u'type': u'Agent',
                u'participantId': u'009052CB110900F5'
            },
            {
                u'nickname': u'FirstL',
                u'type': u'Customer',
                u'participantId': u'009052CB10CC00F0'
            }
        ],
        u'state': u'Chatting',
        u'id': u'0000Na9B26EF006M',
        u'capabilities': [
            u'Transfer',
            u'Leave',
            u'Invite',
            u'Consult',
            u'SetInFocus',
            u'SetDisposition',
            u'AttachUserData',
            u'DeleteUserData',
            u'UpdateUserData',
            u'Complete',
            u'SendMessage',
            u'SendStartTypingNotification',
            u'SendStopTypingNotification'
        ],
        u'uri': u'http: //localhost: 8080/api/v2/chats/0000Na9B26EF006M'
    }
}
This page was last edited on March 25, 2016, at 18:22.
Comments or questions about this documentation? Contact us for support!