Home
/
Desk
/
iOS

Bots

Bots enables you to integrate a third-party bot into Sendbird Desk or to create an FAQ bot provided by Sendbird Desk. Bots are virtual agents, which is distinguished from live agents. To learn more about Bots, see Introducing Bots on our Knowledge Base.

Note: Our sample widget will be updated soon to cover FAQ bots. Messages sent by an FAQ bot will appear as FAQ bot message until the sample widget is updated.


Bot types

There are two types of bots in Sendbird Desk:

  • Custom bots: Indicates a third-party bot or your own chatbot that is integrated into Sendbird Desk.
  • FAQ bots: Indicates an FAQ bot provided by Sendbird Desk, which delivers question and answer sets to a customer's inquiry.

Connect to a live agent

Use the ticket.cancel() method to carry on a conversation with a live agent after ending a chat with a bot. With the ticket.cancel() method, the specified ticket is unassigned from a bot, and its status changes to Pending. Then, it is automatically assigned to an available live agent in the current or a specified team in accordance with the auto ticket routing function.

Light Color Skin
Copy
ticket.cancel(groupKeyForTransfer: GROUP_KEY) { (ticket, error) in
    guard let ticket = ticket, error == nil else {
        return  // Handle error.
    }
    // You can provide a button for your customers to switch to a live agent from a bot.
}
ArgumentTypeDescription

GROUP_KEY

string

Specifies the unique key of a specific team to transfer the ticket.


Send a customer's selection to the Desk server

When you use FAQ bots on the Sendbird Dashboard, your agents need to be aware of the question selected by your customer among the question and answer sets provided by the FAQ bot. Use the ticket.selectQuestion() method to deliver the information on the selected question to the Desk server. As a result, your agents will see which question is selected through the Question selected message as one of the system messages on the dashboard.

Note: Question selected message can be customized in Settings > Bots on the dashboard.

Light Color Skin
Copy
ticket.selectQuestion(faqFileId: FAQ_FILE_ID, question: QUESTION) { error in
    guard error == nil else {
        return  // Handle error.
    }
    // The selected question is delivered to the Desk server.
}
ArgumentTypeDescription

FAQ_FILE_ID

long

Specifies the unique ID of a specific FAQ file.

QUESTION

string

Specifies a question selected by a customer.