When an agent replies from the desk for a ticket or thread created by channel integration, the reply is pushed to the Resources.channel.sync.push endpoint of the app which needs to be delivered to the external service so that the reply will be processed further. The push endpoint given in the manifest is responsible for handling the desk reply, delivering it to the external service and submit the status & response of the processed reply to the desk back.
The Progress of an agent reply from the desk for a ticket or thread created via channel integration are,
- Agent reply is added in the desk with status PENDING.
- Reply is pushed to the push_endpoint of the app.
PUSH REQUEST FORMAT:
URL : channel.sync.push
RequestMethod : POST
QueryParams : securityContext, orgId
Content-Type : application/json
RequestBody : JSONObject containing reply & configParams in #PUSH_REPLY_PAYLOAD_FORMAT format.
PUSH REQUEST RESPONSE FORMAT:
ResponseCode : 200
Content-Type : application/json
Response : Data to be updated in desk in #PUSH_REPLY_RESPONSE_OBJECT format.
#PUSH_REPLY_PAYLOAD_FORMAT
Sample of #PUSH_REPLY_PAYLOAD_FORMAT:
- {
- "configParams" :{
- "channelState" : "{\"my_last_fetch_time\":\"Jan 11\"}",
- "myConfigParam1" : "My value for configParam",
- "myConfigParam2" : "My value for configParam2",
- "myConfigParam3" : "My value for configParam3"
- },
- "resource":{
- "extParentId" : "1276576533",
- "replyToExtId" : "3298dniuniu3",
- "id" : 287189379819,
- "content" : "Hi customer, thanks for writing to us",
- "summary" : "Hi customer, thanks for writing to us",
- "contentType" : "text/plain",
- "hasAttach" : false,
- "attachments" : [],
- "author" : {
- "name" : "John Snow",
- "email" : "john.snow@example.com",
- "type" : "AGENT",
- "photoURL" : "https://desk.zoho.com/api/v1/agents/387829/photo?orgId=28732"
- }
- }
- }
#DESK_REPLY_THREAD_OBJECT
#PUSH_REPLY_RESPONSE_OBJECT