(Created Fix blank page For Version: HTCC:8.5.2) |
(Update with the copy of version: 8.5.2DRAFT) |
||
Line 1: | Line 1: | ||
− | <!-- | + | =SendToAgents= |
+ | __NOTOC__ | ||
+ | This operation is part of the [[FacebookPM|Facebook Private Messaging API]] section of the [[Welcome|Genesys Web Services REST API]]. | ||
+ | <h2> Overview </h2> | ||
+ | This request sends a text message only to agents who are in a conference or in a consulting Facebook chat. | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! scope="row"| Request URL | ||
+ | | /api/v2/me/facebooksession/''{id}'' | ||
+ | |- | ||
+ | ! scope="row"| HTTP Method | ||
+ | | POST | ||
+ | |- | ||
+ | ! scope="row" | Required Features | ||
+ | | api-multimedia | ||
+ | |} | ||
+ | <h2>Parameters</h2> | ||
+ | |||
+ | {| | ||
+ | |- | ||
+ | ! Parameter | ||
+ | ! Value | ||
+ | |- | ||
+ | |operationName | ||
+ | |SendToAgents | ||
+ | |- | ||
+ | |text | ||
+ | |The text to send to agents | ||
+ | |} | ||
+ | |||
+ | <h2>Sample</h2> | ||
+ | |||
+ | <h3>Request</h3> | ||
+ | |||
+ | <source lang="text"> | ||
+ | POST api/v2/me/facebooksession/0071023821aec011 | ||
+ | { | ||
+ | "operationName": "SendToAgents", | ||
+ | "text": "We need your help?" | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | <h3>Response</h3> | ||
+ | |||
+ | <source lang="text"> | ||
+ | { | ||
+ | "statusCode": 0 | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | <h3>Notification</h3> | ||
+ | Here is the list of notifications received after sending a new message only for agents: | ||
+ | |||
+ | <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.2]] |
Revision as of 19:44, October 23, 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!