Desk SDKs JavaScript v1
Desk SDKs JavaScript
Desk SDKs
JavaScript
Version 1

Related channels indicate group channels in Sendbird Chat that are relevant to a ticket. By providing one or more related channels, your agents can see the contextual background of a customer's inquiry during the conversation. Up to three group channels can be added per ticket, and they are displayed on the right side of the ticket details view on the Sendbird Dashboard.

Note: On the Sendbird Dashboard, the term Related chats is used instead of related channels.


You can add up to three related channels when creating a ticket. Pass one or more group channel URLs as an argument to the relatedChannels parameter in the Ticket.create() method.

Ticket.create(TICKET_TITLE, USER_NAME, GROUP_KEY, CUSTOM_FIELDS, PRIORITY, RELATED_CHANNEL_URLS,BOT_KEY, (ticket, error) => {
    if (error) {
        // Handle error.
    }

    // The ticket.channel property indicates the group channel object within the ticket.
});
Arguments
RequiredTypeDescription

TICKET_TITLE

string

Specifies the title of the ticket.

USER_NAME

string

Specifies the name of a user who submits or receives the ticket.

OptionalTypeDescription

GROUP_KEY

string

Specifies the unique key of a team for the assignment of the ticket.

CUSTOM_FIELDS

[String: String]

Specifies additional information of the ticket that consists of field and its values. Only the field already registered in Settings > Ticket fields on your dashboard can be used.

PRIORITY

string

Specifies the priority value of the ticket. Higher values stand for higher priority. Acceptable values are LOW, MEDIUM, HIGH and URGENT.

RELATED_CHANNEL_URLS

array

Specifies one or more group channel URL and its channel name in Sendbird Chat that are relevant to this ticket. Up to three related channels can be added per ticket.

BOT_KEY

string

Specifies the unique key of a specific bot. The bot with the specified key will be the assignee of the created ticket.


To update related channels, use the ticket.setRelatedChannels() method.

ticket.setRelatedChannelUrls(RELATED_CHANNEL_URLS, (ticket, error) => {
    if (error) {
        // Handle error.
    }

    // The ticket's relatedChannels property has been updated.
});

Note: The ticket.relatedChannels property in the callback indicates the group channel object of the related channels, which contains their channel names and group channel URLs.