Desk SDKs Android v1
Desk SDKs Android
Desk SDKs
Android
Version 1

Message

Copy link

A customer and an agent can have a conversation by sending and receiving messages through the Chat SDK. Sendbird Desk classifies messages into several types according to their component, implementation process, or purpose of usage.


Message types

Copy link

There are three types of messages in Sendbird Desk: user messages, file messages, and admin messages. Depending on the value of message.data, message.custom_type, and message.data.type, they can be further divided as follows.

Typemessage.datamessage.custom_typemessage.data.type

User message

MESG

- Text message: the value you specified.
- Rich message: SENDBIRD_DESK_RICH_MESSAGE
- Bot agent message: SENDBIRD_DESK_BOT_MESSAGE

- Text message: N/A
- Rich message: SENDBIRD_DESK_CUSTOMER_SATISFACTION and SENDBIRD_DESK_INQUIRE_TICKET_CLOSURE
- Bot agent message: SENDBIRD_DESK_BOT_MESSAGE_FAQ_ANSWERS

File message

FILE

- Text message: the value you specified.
- Rich message: SENDBIRD_DESK_RICH_MESSAGE
- Bot agent message: SENDBIRD_DESK_BOT_MESSAGE

- Text message: N/A
- Rich message: SENDBIRD_DESK_CUSTOMER_SATISFACTION and SENDBIRD_DESK_INQUIRE_TICKET_CLOSURE
- Bot agent message: SENDBIRD_DESK_BOT_MESSAGE_FAQ_ANSWERS

Admin message

ADMM

- Notification message: N/A
- System message: SENDBIRD_DESK_ADMIN_MESSAGE_CUSTOM_TYPE

- Notification message: NOTIFICATION_...
- System message: SYSTEM_MESSAGE_...

The following codes show a sample json object of a bot agent message.

{
    "message_survival_seconds": -1,
    "type": "MESG",
    "custom_type": "SENDBIRD_DESK_BOT_MESSAGE",
    "data": {
        "faq_file_id": 5,
        "type": "SENDBIRD_DESK_BOT_MESSAGE_FAQ_ANSWERS"
        },
    "message": "Please select your inquiry type.",
    "message_retention_hour": -1,
    "silent": false,
    "created_at": 1601010950134,
    "req_id": "1601008408940",
    "mention_type": "users",
    "channel_url": "sendbird_group_channel_2843508_e663ee84ddd0ae80442a9b3758f230d5d4863c52",
    "message_id": 41714454,
    ...
}

User messages

Copy link

User messages are a text message sent by a customer or an agent. Messages sent by a bot or Rich messages such as confirmation and customer satisfaction messages can also be an example. The values of custom_type and data.type of a message object determine the type of the user message. For example, the custom_type property can have a value of either SENDBIRD_DESK_RICH_MESSAGE or SENDBIRD_DESK_BOT_MESSAGE. The following table explains the valid values of the data.type property for each message type.

Typedata.typeDescription

Rich message

SENDBIRD_DESK_INQUIRE_TICKET_CLOSURE

A message that is sent to have customers confirm if their issue has been resolved and ticket can be closed.
This can be set under Settings > Desk > Triggers > Confirmation request message on Sendbird Dashboard.

Rich message

SENDBIRD_DESK_CUSTOMER_SATISFACTION

A message that is sent to ask customers about satisfaction rates. This is sent when message.data.body.state is set to WAITING.
This can be set under Settings > Desk > Automation > Customer satisfaction rating on Sendbird Dashboard.

Rich message

SENDBIRD_DESK_CUSTOMER_SATISFACTION

A message that is sent after customers gave a satisfaction rate. This is sent when message.data.body.state is set to CONFIRMED.
This can be set under Settings > Desk > Automation > Customer satisfaction rating on Sendbird Dashboard.

Rich message

SENDBIRD_DESK_URL_PREVIEW

A preview text or a thumbnail image of the link in a message. To learn more about how this message works, see Link preview.

Bot agent message

SENDBIRD_DESK_BOT_MESSAGE_FAQ_ANSWERS

A message that is sent by a FAQ bot. To learn more about bots, see Bot.

Rich messages

Copy link

Among user messages, messages that need additional implementation processes are grouped into Rich messages, which includes link preview, confirmation request, and CSAT message.

When a client app receives a message through the onMessageReceived() method of the channel event handler, the three types of rich messages are distinguished by a value of message.data.type listed above.


File messages

Copy link

A message with an attached file sent by a customer or an agent. The subtype of file messages is the same as User messages.


Admin messages

Copy link

A message sent from the Desk server without a specific sender and can be classified into System messages or Notification messages, depending on whether they are visible to a customer.

System messages

Copy link

System messages are displayed only to agents when an update has been made to a ticket, such as change in ticket status or its assignee. The following table lists the valid values of the message.data.type property of system messages and their default content. The default messages can be edited in Settings > System messages on your dashboard.

message.data.typeDefault message

SYSTEM_MESSAGE_TICKET_ACTIVE_TO_IDLE_BY_AGENT

The ticket status is changed from Active to Idle by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_ACTIVE_TO_IDLE_BY_SYSTEM

The ticket status is automatically changed from Active to Idle.

SYSTEM_MESSAGE_TICKET_ASSIGNED_BY_AGENT

The ticket is assigned to {to_agent_name} by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_ASSIGNED_BY_SYSTEM

The ticket is assigned to {agent.display_name} by the system.

SYSTEM_MESSAGE_TICKET_CLOSED_BY_AGENT

The ticket is closed by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_CLOSED_BY_CUSTOMER

The ticket is closed by the customer.

SYSTEM_MESSAGE_TICKET_CLOSED_BY_PLATFORM_API

The ticket is closed by the Platform API.

SYSTEM_MESSAGE_TICKET_CLOSED_BY_SYSTEM

The ticket is automatically closed.

SYSTEM_MESSAGE_TICKET_GROUP_ASSIGNED_BY_AGENT

The ticket is assigned to the {to_team_name} team by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_GROUP_TRANSFERRED_BY_AGENT

The ticket is transferred from {from_team_name} to the {to_team_name} team by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_GROUP_TRANSFERRED_BY_PLATFORM_API

The ticket is transferred from {from_team_name} to the {to_team_name} team through a Platform API request.

SYSTEM_MESSAGE_TICKET_GROUP_TRANSFERRED_BY_CUSTOMER

The ticket is transferred from {from_team_name} to the {to_team_name} team by a customer.

SYSTEM_MESSAGE_TICKET_GROUP_TRANSFERRED_BY_SYSTEM

The ticket is automatically transferred from {from_team_name} to the {to_team_name} team.

SYSTEM_MESSAGE_TICKET_GROUP_UNASSIGNED_BY_AGENT

The ticket is set to be independent from the {from_team_name} team by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_IDLE_TO_ACTIVE_BY_AGENT

The ticket status is changed from Idle to Active by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_IDLE_TO_ACTIVE_BY_CUSTOMER

The ticket status is changed from Idle to Active by the customer.

SYSTEM_MESSAGE_TICKET_IDLE_TO_ACTIVE_BY_SYSTEM

The ticket status is automatically changed from Idle to Active.

SYSTEM_MESSAGE_TICKET_PRIORITY_VALUE_UPDATED_BY_AGENT

The priority of the ticket is changed to {priority} by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_PRIORITY_VALUE_UPDATED_BY_CUSTOMER

The priority of the ticket is changed to {priority} by the customer.

SYSTEM_MESSAGE_TICKET_PRIORITY_VALUE_UPDATED_BY_PLATFORM_API

The priority of the ticket is changed to {priority} by the Platform API.

SYSTEM_MESSAGE_TICKET_REOPENED_BY_AGENT

The ticket is reopened by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_REOPENED_BY_CUSTOMER

The ticket is reopened by the customer.

SYSTEM_MESSAGE_TICKET_TRANSFERRED_BY_AGENT

The ticket is transferred from {from_agent_name} to {to_agent_name} by {by_agent_name}. Reasons for transfer: "{memo}."

SYSTEM_MESSAGE_TICKET_WIP_BY_AGENT

The ticket status is changed to In progress by {by_agent_name}.

SYSTEM_MESSAGE_TICKET_WIP_TO_UNASSIGNED_BY_SYSTEM

The ticket status is automatically changed from In progress to Pending.

Notification messages

Copy link

Notification messages are displayed to both customers and agents. Examples are welcome messages and delay messages. The following table lists the valid values of the message.data.type property. Unlike system messages, you can manually set and edit the messages under Settings > Desk on your dashboard.

message.dataDescription

NOTIFICATION_WELCOME

The first message sent to a customer, often in the form of a welcome message. This can be set under Settings > Desk > Triggers > Welcome message on Sendbird Dashboard. Push notifications and badges aren't available for this message.

NOTIFICATION_AWAY_AGENT

A message that is sent when the assigned agent is away. This can be set under Settings > Desk > Triggers > Away message on Sendbird Dashboard. Push notifications and badges aren't available for this message.

NOTIFICATION_ASSIGNMENT_DELAY

A message that is sent when the ticket hasn't been assigned yet. This can be set under Settings > Desk > Triggers > Assignment delay message on Sendbird Dashboard. Push notifications and badges are available for this message.

NOTIFICATION_NOT_OPERATING_HOUR

A message that is sent when it's out of working hours. This can be set under Settings > Desk > General > Auto-reply on Sendbird Dashboard. Push notifications and badges aren't available for this message.

NOTIFICATION_MANUAL_CLOSED

A message that is sent when a customer or an agent closes a ticket. This can be set under Settings > Desk > Triggers > Default close message on Sendbird Dashboard. Push notifications are available for this message while badges aren't.

NOTIFICATION_AUTO_CLOSED

A message that is sent when the ticket has been automatically closed according to the automation. This can be set under Settings > Desk > Automation > Change ticket from IDLE to CLOSED after on Sendbird Dashboard. Push notifications are available for this message while badges aren't.

NOTIFICATION_PROACTIVE_CHAT

A message sent by an agent under Proactive Chat. Agents can initiate a conversation via this message. Push notifications and badges are available for this message.

NOTIFICATION_IDLE_TO_CLOSE_REMINDER

A reminder that is sent before an idle ticket is automatically closed according to the automation. This be set under Settings > Desk > Automation > Send reminder before closing ticket in on Sendbird Dashboard. Push notifications are available for this message while badges aren't.