Jump to: navigation, search
(Created page with "=SendToAgents= __NOTOC__ This operation is part of the Facebook Private Messaging API section of the Genesys Web Services REST API. <h2> Overview </...")
 
(Replaced string /facebooksession/ with /facebooksessions/)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
=SendToAgents=
 
=SendToAgents=
 
__NOTOC__
 
__NOTOC__
This operation is part of the [[FacebookPM|Facebook Private Messaging API]] section of the [[Welcome|Genesys Web Services REST API]].
+
This operation is part of the [[FacebookPM|Facebook Private Messaging API]] section of the [[Welcome|Web Services API]].
 
<h2> Overview </h2>
 
<h2> Overview </h2>
This request will send a text message only to agents who are in a conference or in a consult facebook chat.
+
This request sends a text message only to agents who are in a conference or in a consulting Facebook chat.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! scope="row"| Request URL
 
! scope="row"| Request URL
| /api/v2/me/facebooksession/''{id}''
+
| /api/v2/me/facebooksessions/''{id}''
 
|-
 
|-
 
! scope="row"| HTTP Method
 
! scope="row"| HTTP Method
Line 26: Line 26:
 
|-
 
|-
 
|text
 
|text
|text to send to agents
+
|The text to send to agents
 
|}
 
|}
  
Line 34: Line 34:
  
 
<source lang="text">
 
<source lang="text">
POST api/v2/me/facebooksession/0071023821aec011
+
POST api/v2/me/facebooksessions/0071023821aec011
 
{
 
{
 
   "operationName": "SendToAgents",
 
   "operationName": "SendToAgents",
Line 50: Line 50:
  
 
<h3>Notification</h3>
 
<h3>Notification</h3>
Here are the list of notifications received after send new message for only agents
+
Here is the list of notifications received after sending a new message only for agents:
  
 
<h4>Notification with new message</h4>
 
<h4>Notification with new message</h4>
 +
<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]]

Latest revision as of 06:00, January 17, 2019

SendToAgents

This operation is part of the Facebook Private Messaging API section of the Web Services 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/facebooksessions/{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/facebooksessions/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"
}
This page was last edited on January 17, 2019, at 06:00.
Comments or questions about this documentation? Contact us for support!