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

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 our documentation on bot.

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

Copy link

There are three types of bots in Sendbird Desk:

  • AI chatbot: A Sendbird AI chatbot that can be connected to Sendbird Desk under Settings > Desk > Bots on our dashboard.
  • Custom bots: A third-party bot or your own chatbot that is integrated into Sendbird Desk.
  • FAQ bots: An FAQ bot provided by Sendbird Desk, which delivers question and answer sets to a customer's inquiry.

Connect to a live agent

Copy link

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.

ticket.cancel(GROUP_KEY, (ticket, err) => {
    if (err) {
        // 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

Copy link

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.

ticket.selectQuestion(FAQ_FILE_ID, QUESTION, (res, err) => {
    if (err) {
        // Handle error.
    }
});
ArgumentTypeDescription

FAQ_FILE_ID

long

Specifies the unique ID of a specific FAQ file.

QUESTION

string

Specifies a question selected by a customer.