Ticket refers to a unit of a customer's inquiry, forming the basis of all features and functionalities of Sendbird Desk. On this page, you can find how to create, retrieve, close, and display tickets on a client app.
Note: Every ticket has a corresponding group channel in the Chat SDK because the messages within a ticket are managed by Sendbird Chat.
SBDSKTikcet.createTicket() method to create a new ticket on the Desk server either before or after a customer's initial message. Once created, you can retrieve the information on the ticket and its group channel in
ticket.channel through the callback from the server. When a customer sends the first message, the ticket is assigned to an available agent by the Desk server while messages are sent and received through the Chat SDK.
Note: Until a customer sends the first message, agents can't see the ticket on the Sendbird Dashboard.
You can also append additional information like a ticket's priority or related channel URLs by passing several arguments to the corresponding parameters.
Specifies the title of the ticket.
Specifies the name of a user who submits or receives the ticket.
Specifies the unique key of a team for the assignment of the ticket.
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.
Specifies the priority value of the ticket. Higher values stand for higher priority. Acceptable values are LOW, MEDIUM, HIGH and URGENT.
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.
SBDSKTicket.getClosedList() to retrieve a list of the current customer's open and closed tickets.
Note: Only ten tickets can be retrieved per request in descending order of the message creation time.
You can filter tickets by adding a ticket field as a search filter to the
getClosedList(). Tickets that have a value of the selected field will appear on the ticket list.
You can retrieve a specific ticket using its channel URL.
SBDSKTicket.getOpenCount() to display the number of open tickets on a client app.
To allow your customers to directly close a ticket from their app, use the
Note: Only active and idle tickets can be closed by a customer.
ticket.reopen() method to reopen a closed ticket from a client app.