Configuration
To configure a channel in your extension, you need to add an entry in your extension's resource.json, as shown in the sample code. This entry specifies the settings of the channel and the endpoints for pulling or pushing data for syncing. When you install the extension, the custom channel will be created based on this entry.
The params to be specified in resources.json are listed below.
Field | Type | Description |
---|---|---|
resourceName | String required | Defines the name of the resource. |
channelLogoPath | string (URL) required | Relative Path of the channel's logo image in the app directory. Logo Specification: image-format : png, jpg max-size : 500kb |
acceptAttachments | Boolean | Specifies whether attachments can be added to the replies of this channel. Default: false |
updateRecords | Boolean | Specifies whether the replies of this channel can be updated. Default: false |
contentTypes | JSONArray | Specifies the allowed/supported content types (MIME types) for the replies of this channel.
|
includeQuotedMessage | Boolean | Specifies whether to add the previous replies as quoted to the replies while replying to this channel. Default: false |
includeQuotedMessage | Boolean | Specifies whether to add the previous replies as quoted to the replies while replying to this channel. Default: false |
sync | JSONObject SYNC_OBJECT required | Sync property of the channel defines the endpoints that are used for handling data sync. |
redirectUrl | string (URL) | URL that redirect the user to the external resource of an entity. Refer Source Redirection. |
Sync Object
Field | Type | Description |
---|---|---|
push | string(URL) required | An endpoint that accepts the replies from the desk by an agent to process and update them in the external service. Refer Push Request from Desk |
pull | string (URL) | An endpoint that provides updated data from external service / channel when the desk periodically requests it. The pullUrl will be triggered every 4 minutes. Refer Pull Request from Desk |
Source Redirection (redirectUrl)
The redirectUrl endpoint specified in the resource.json helps you to redirect to the external resource of an entity when requested from the desk.
Source Redirection Query Params
Field | Description |
---|---|
entity | Type of the entity to be redirected.Supported Values are
|
id | External Id of the entity in the external service. |
parentId | External Parent Id of the entity. In case of threads, parentId contains the extId of the ticket. |
For Example:
Let's consider an agent views a ticket, a hyperlink to the external resource will be shown to the agent. On clicking the hyperlink, the agent is redirected to the redirectUrl in the resource.json with the extId of the resource and the type of the entity as queryParams of the Url. The redirect URL should parse these queryParams and redirect the agent to the external service which contains the resource.
Sample format for redirectUrl: https://zohodeskapp.example.com/youtube/handleRedirect?entity=thread&id=1688530587950_6958455459588&parentId=6958455459588_1233343hdshbdd23
Copied"channel": {
"resourceName" :"youtube_app",
"channelLogoPath" : "/app/img/youtube_logo.png",
"acceptAttachments" : false,
"updateRecords" : true,
"contentTypes" : ["text/plain","text/html"],
"includeQuotedMessage": false,
"sync": {
"push": "https://zohodeskapp.example.com/youtube/handlePull",
"pull": "https://zohodeskapp.example.com/youtube/handlePush"
},
"redirectUrl" : "https://zohodeskapp.example.com/youtube/handleRedirect"
}