Proactive Chat
With Proactive chats, agents can send a message to your customer first. You can utilize proactive chats to send marketing or announcement messages to a specific customer. When a customer replies to an agent’s message, the proactive chat automatically changes to a general ticket and is assigned to an available agent within a ticket’s team based on auto ticket routing.
Resource Representation
Here's what a Proactive Chat resource looks like:
Property name | Type | Description |
---|---|---|
id | int | The unique ID of the proactive chat. |
project | int | The unique ID of a Desk project where the chat belongs. |
message | string | The content of the message. |
messageCount | int | The count of messages within the chat. |
createdBy | object | Information about the agent who created the chat. |
assignedGroup | object | Information about the group where the chat is assigned. |
sentCount | int | The number of chats sent out. |
respondedCount | int | The number of chats that received responses. |
closedCount | int | The number of chats that have been closed/resolved. |
customersList | string | A string representation of customer IDs included in the chat. |
createdAt | string | The date time when the proactive chat was created, in ISO 8601 format. |
updatedAt | string | The last time the proactive chat was updated, in ISO 8601 format. |
priority | string | The priority of the proactive chat. Valid values are LOW, MEDIUM, HIGH, URGENT. |
Actions
-
Endpoints are relative to the base URL allocated to your application. In this document, the
/proactive_chats
endpoint is prefixed byhttps://desk-api-{application_id}.sendbird.com/platform/v1
. -
It is recommended to urlencode parameter values in API URLs, such as
{proactive_id}
.
List of Actions
Action | HTTP request |
---|---|
| |
| |
| |
|
Create Proactive Chat
Initiates a new Proactive Chat with customers.
HTTP Request
Request Body
Include the following properties in your request body:
Properties
Required | Type | Description |
---|---|---|
message | string | The content of the message you want to send in the Proactive Chat. |
groupKey | string | The key of the group where the chat should be assigned. |
customerIds | list[int] | A list of customer IDs to start the chat with. |
agentId | int | The ID of the agent who will be handling the chat. |
Optional | Type | Description |
---|---|---|
priority | string | The priority level of the chat: |
Successful Response
If successful, this action returns a JSON representation of the created Proactive Chat in the response body.
Get Proactive Chat
Retrieves information about a specific Proactive Chat.
HTTP Request
Parameters
Include the {proactive_id}
parameter in the URL path.
Required
Parameter name | Type | Description |
---|---|---|
proactive_id | int | The ID of the specific Proactive Chat. |
Request Body
No request body needed.
Successful Response
If successful, the server returns the Proactive Chat resource as a JSON object in the response body.
List tickets of Proactive Chat
Retrieves a list of tickets of the Proactive Chat.
HTTP Request
Parameters
Include the following parameters in the request:
Parameters
Required | Type | Description |
---|---|---|
proactive_id | int | The ID of the specific Proactive Chat. |
Optional | Type | Description |
---|---|---|
limit | int | Number of results to return per page. |
offset | int | The initial index from which to return the results. |
Successful Response
If successful, this action returns a list of ticket resources that were initiated by a Proactive Chat as a JSON object in the response body.
Send a follow-up message
Send a follow-up message to a specific Proactive Chat ticket.
HTTP Request
Parameters
Include the following parameters in the request:
Required
Parameter name | Type | Description |
---|---|---|
proactive_id | int | The ID of the specific Proactive Chat. |
ticket_id | int | The ID of the specific ticket of the Proactive Chat. |
Request Body
Include the following properties in your request body:
Required
Property name | Type | Description |
---|---|---|
message | string | The content of the follow-up message. |
Successful Response
If successful, this action returns a JSON representation of the follow-up message in the response body.