Jump to: navigation, search
Line 53: Line 53:
  
 
<h4>Notification with new message</h4>
 
<h4>Notification with new message</h4>
{{Editgrn_open}}Missing{{Editgrn_close}}
+
<source lang="text">
 +
{
 +
      "facebooksessionUri": "http: //192.168.83.25: 8090/api/v2/facebooksessions/0002EaAY01MT007J",
 +
      "messages": [
 +
          {
 +
              "index": 5,
 +
              "from": {
 +
                  "participantId": "007356276D330155",
 +
                  "type": "Agent",
 +
                  "uri": "http: //192.168.83.25: 8090/api/v2/users/5e101708f14442c7ab79814bb4f799b2",
 +
                  "visibility": "All",
 +
                  "path": "/users/5e101708f14442c7ab79814bb4f799b2",
 +
                  "nickname": "TestName",
 +
                  "id": "007356276D330155"
 +
              },
 +
              "text": "Helloagentslave",
 +
              "visibility": "Agents",
 +
              "timestamp": "2015-10-2113: 48: 16.000+0300",
 +
              "type": "Text",
 +
              "timestampSeconds": 1445424496000L
 +
          }
 +
      ],
 +
      "facebooksessionPath": "/facebooksessions/0002EaAY01MT007J",
 +
      "messageType": "MessageLogUpdated",
 +
      "notificationType": "NewMessages"
 +
  },
 +
  "channel": "/v2/me/facebooksession"
 +
}
 +
</source>
  
 
[[Category:V:HTCC:8.5.2DRAFT]]
 
[[Category:V:HTCC:8.5.2DRAFT]]

Revision as of 16:01, October 21, 2015

SendToAgents

This operation is part of the Facebook Private Messaging API section of the Genesys Web Services REST API.

Overview

This request sends a text message only to agents who are in a conference or in a consulting Facebook chat.

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

Parameters

Parameter Value
operationName SendToAgents
text The text to send to agents

Sample

Request

POST api/v2/me/facebooksession/0071023821aec011
{
  "operationName": "SendToAgents",
  "text": "We need your help?"
}

Response

{
  "statusCode": 0
}

Notification

Here is the list of notifications received after sending a new message only for agents:

Notification with new message

{
       "facebooksessionUri": "http: //192.168.83.25: 8090/api/v2/facebooksessions/0002EaAY01MT007J",
       "messages": [
           {
               "index": 5,
               "from": {
                   "participantId": "007356276D330155",
                   "type": "Agent",
                   "uri": "http: //192.168.83.25: 8090/api/v2/users/5e101708f14442c7ab79814bb4f799b2",
                   "visibility": "All",
                   "path": "/users/5e101708f14442c7ab79814bb4f799b2",
                   "nickname": "TestName",
                   "id": "007356276D330155"
               },
               "text": "Helloagentslave",
               "visibility": "Agents",
               "timestamp": "2015-10-2113: 48: 16.000+0300",
               "type": "Text",
               "timestampSeconds": 1445424496000L
           }
       ],
       "facebooksessionPath": "/facebooksessions/0002EaAY01MT007J",
       "messageType": "MessageLogUpdated",
       "notificationType": "NewMessages"
   },
   "channel": "/v2/me/facebooksession"
}
Comments or questions about this documentation? Contact us for support!