Home
/
Desk
/
iOS
/
Messages

System messages

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 channel(_ sender:SBDBaseChannel, didReceive message: SBDBaseMessage) method of the SBDChannelDelegate, system messages are distinguished from notifications by a value from the message.customType, and their subtype is specified in the message.data as below:

Light Color Skin
Copy
{
    "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 to agents only. To hide system messages from your app, refer to the following code snippet:

Light Color Skin
Copy
public static func isVisible(message: SBDBaseMessage) -> Bool {
    if let message = message as? SBDAdminMessage, let data = Data(base64Encoded: message.data), data.isEmpty == false {
        let isSystemMessage = (message.customType == "ADMIN_MESSAGE_CUSTOM_TYPE")

        let dataObject = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any]
        let type = dataObject?["type"] as? String
        return !isSystemMessage &&
            type != EVENT_TYPE_ASSIGN &&
            type != EVENT_TYPE_TRANSFER &&
            type != EVENT_TYPE_CLOSE
    }

    return true
}

List of message.data

System messages are designed to indicate the reason for the update. The following table covers the value of the subtype specified in the message.data property and their default messages.

List of message.data and default messages

message.dataDefault 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_teamName} 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 by the Platform API.

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.

Note: Default messages can be edited in Settings > System messages on your dashboard.