With System messages, you can notify your agents of the updates that occur for a ticket when there are changes to a ticket's status, assignee, or priority.
Note: You can customize your system messages in Settings > System messages on the Sendbird Dashboard.
Distinguish system messages from notifications
When a client app receives a system message through the onMessageReceived() method of the channel event handler, system messages are distinguished from notifications by a value from the message.customType, and their subtype is specified in the message.data as below:
{
"message_id" : 40620745,
"type": "ADMM",
"custom_type": "SENDBIRD_DESK_ADMIN_MESSAGE_CUSTOM_TYPE",
"data": "{\"type\": \"SYSTEM_MESSAGE_TICKET_ASSIGNED_BY_SYSTEM\", \"ticket\": <Ticket Object>}",
"message": "The ticket is automatically assigned to Cindy.",
...
}
Note: The transfer property appears only when the message.data property has the value of SYSTEM_MESSAGE_TICKET_TRANSFERRED_BY_AGENT.
Hide system messages
As system messages deliver updates of a ticket, they are intended to be displayed for agents only. To hide system messages from your app, refer to the following code snippet:
System messages are designed to indicate the reason of the update. The following table covers the valid values specified in the message.data.type property and their default messages.
Note: Default messages can be edited in Settings > System messages on your dashboard.
List of message.data.type and default messages
message.data.type
Default 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}.