As part of configuring client applications, a webhook callback URL must be registered with ECE application. Once registered, messages from ECE application for an ongoing conversation will be posted to the registered webhook callback URL. This section explains the payload that will be posted to the webhook callback URL. Refer Asynchronous messaging for more details.
One or more messages will be posted in a single request. A maximum of 1000 messages can be posted in a single request.
For the messages to be posted onto the callback webhook URL:
Note: Callback webhook URL supports SSL or TLS. Refer 'SSL Configuration' section in 'ECE Installation Guide' for more details.
N/A
Authentication is configured in admin console.
Name | Description | Allowed values | Default value |
---|---|---|---|
Authorization | Authentication mechanism used by callback API. Authentication mechanism needs to be configured in admin console. Value could be none, basic authentication or oAuth2 configuration | Authentication scheme | N/A |
Content-Type | Media type send by server, value is configured in admin console. | application/xml or application/json | N/A |
The request body is mandatory. Request body can be either XML or JSON format.
Name | Description |
---|---|
id | ID of the message. |
sender.type | Type of the sender of the message. Possible values are as below:
|
sender.user | Details of user who sent the message. This attribute will be sent only if sender.type is 'user'. |
conversation.id | ID of the conversation of the message. |
type.value | The type of the message being sent. Allowed values are below:
|
timeStamp | Time when message was sent by agent. |
Name | Description |
---|---|
content | Content to be sent. This is sent when type.value is one of the below:
|
attachments.attachment | Attachment details while uploading or accepting or rejecting the attachment. This is sent when type.value is one of the below:
Please refer Attachment specific information section for the representation of attachment. Please refer Message type specific attributes section for supported attachment attributes based on type of the message. |
Note: 'text' in Message Type column is applicable when attachment are sent along with KB article
Name | Description |
---|---|
id | ID of the attachment. |
fileName | Name of the attachment. |
contentType | Type of the attachment. |
size | Size of the attachment in bytes. |
messageText | Text sent with message. |
contentUrl | URL from where attachment can be downloaded. |
Attributes are not supported for the below message types:
For the other message types, the supported attributes are below:
Message Type | Attribute Name | Description | Always provided |
---|---|---|---|
text/plain or text/html | content | Content of the message | Yes |
attachments.attachment.fileName | Name of the attachment file. | Only when KB article with attachment is sent | |
attachments.attachment.size | Size of the attachment in bytes | Only when KB article with attachment is sent | |
attachments.attachment.contentType | Type of the attachment | Only when KB article with attachment is sent | |
attachments.attachment.contentUrl | URL to download attachment. | Only when KB article with attachment is sent | |
attachments.attachment.messageText | System message text showing agent has sent an attachment. | Only when KB article with attachment is sent | |
assigned | user.name | Name of the agent to whom the activity is assigned. | Yes |
user.screenName | Screen name of the agent to whom the activity is assigned. | Yes | |
content | System message text showing agent has picked the chat activity. | Yes | |
pagePush | url | URL to a page which agent wants to share with customer | Yes |
transfer | transfer.type | Type of transfer. Allowed values are as below:
| Yes |
transfer.user.name | Name of agent to whom activity is transferred | Only when transfer.type is 'agent' | |
transfer.queue.name | Name of queue to which activity is transferred | Only when transfer.type is 'queue' | |
transfer.queue.channels.chat.attachmentSettings.isEnabledForCustomer | Indicates whether attachment is allowed or not. This is applicable for upload and download. Allowed values are as below:
| Yes | |
content | System message text showing agent has transferred the chat activity | Yes | |
uploadAttachment | attachments.attachment.id | ID of the attachment that is initiated | Yes |
attachments.attachment.fileName | Name of the attachment file. | Yes | |
attachments.attachment.size | Size of the attachment in bytes | Yes | |
attachments.attachment.contentType | Type of the attachment | Yes | |
attachments.attachment.messageText | System message text showing agent has initiated chat attachment | Yes | |
acceptAttachment | attachments.attachment.id | ID of the attachment that is accepted | Yes |
attachments.attachment.contentUrl | URL to download attachment. | Yes | |
rejectAttachment | attachments.attachment.id | ID of the attachment that is rejected | Yes |
complete | content | System message text showing agent has completed the chat activity | Yes |
None
A message posted to webhook callback URL is considered "failed" if any of the below conditions are true:
If posting a message fails, the application reattempts to post the messages 3 times at intervals:
If posting the message fails in all 3 attempts, the application will:
Note: Once the webhook callback URL is deactivated, new conversations cannot be started by that client application. The administrator has to re-activate the webhook callback URL of the client application before new conversation can be started. Refer section 'Integration Using Chat Messaging APIs' in 'ECE Administrator’s Guide to Chat and Collaboration Resources' for more details.
Example 1 - Conversation is assigned to an advisor
Example 2 - Agent sends mesage of type 'startTyping'
Example 3 - Agent sends mesage of type 'endTyping'
Example 4 - Agent sends message of type 'text/html'
Example 5 - Agent sends mesage of type 'uploadAttachment'
Example 6 - Agent sends mesage of type 'acceptAttachment'
Example 7 - Agent sends mesage of type 'rejectAttachment'
Example 8 - Agent transfers conversation to queue
Example 9 - Agent transfers conversation to user
Example 10 - Agent sends message of type 'pagePush'
Example 11 - Agent sends message of type 'text/html' having KB article with attachment
Example 12 - Agent completes the conversation