Jump to: navigation, search

Invite

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

Overview

This allows an agent to invite another agent to a conference.

The customer will be aware of the presence of all agents in the conference.

Agents have the ability to communicate with the customer, or they can communicate with other agents without the customer seeing the communications.

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

Parameters

Parameter Value
operationName Invite
targetUri agent uri to consult with

Sample

Request

POST api/v2/chats/0000Na9B26EF006E
{
  "operationName": "Invite",
  "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'All',
            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 February 15, 2024, at 19:11.
Comments or questions about this documentation? Contact us for support!