Jump to: navigation, search

Consult

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

Overview

This allows an agent to consult with another agent. A consult occurs in the same SMS Session 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 SMS session, 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 SMS session.

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

Parameters

Parameter Value
operationName Consult
targetUri The user uri to consult with or queue uri to consult through.

Mandatory, if targetPath is not specified.

targetPath The user path to consult with or queue path to consult through.

Mandatory, if targetUri is not specified.

Sample

Request

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

Response

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

Notification

Successful

First Notification

{
    u'notificationType': u'ParticipantsUpdated',
    u'messageType': u'SMSsessionStateChangeMessage',
    u'smssession': {
        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/smssessions/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'smssessionUri': u'http: //localhost: 8080/api/v2/smssessions/0000Na9B26EF006E'
}

Failed

{
    u'notificationType': u'Error',
    u'messageType': u'SMSsessionStateChangeMessage',
    u'errorMessage': u'Operationfailed',
    u'referenceId': 36,
    u'smssession': {
        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/smssessions/0000Na9B26EF006M'
    }
}

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on November 4, 2016, at 09:53.