Integrate with Sendbird AI chatbot
This guide explains how to integrate Sendbird AI chatbot with Salesforce Service Cloud by linking the chatbot to Support Chat Connector.
Sendbird AI chatbots, powered by OpenAI's ChatGPT, perform human-like interactions with customers and accommodate their frequently-asked requests based on the data source provided to the bot. As the chatbot feature is supported by Sendbird Chat SDK, you must have a Sendbird application and have implemented Sendbird Chat SDK in your client app.
The common use case of the bot will be like the following: when a customer initiates a conversation on a client app, a group channel is created with both the customer and the AI chatbot as channel members. Then the bot provides customer service according to its preset system prompt and data source. The customer can also ask for a human agent at any time during the chat, and this event would trigger a request for a new Case in Salesforce Service Cloud. Then the group channel will be connected to the Case through its URL, the bot leaves the channel, and a human agent will be assigned and invited to the channel for a continuous customer support.
To enable seamless transition between AI chatbots and human agents, make sure to integrate Salesforce Service Cloud first.
Step 1: Create an AI chatbot
On the dashboard, select your Sendbird application to create an AI chatbot for.
Go to Chat > AI chatbots and click the Create bot + button in the top-right corner of the screen.
- Fill in each field according to the instructions below.
Bot name: enter a unique value.
Bot ID: enter a unique value and store it in a safe place as you will need it when creating a channel.
Profile image: enter the URL of the image.
Bot AI engine: select OpenAI ChatGPT.
- Parameter settings: configure the bot's response settings.
- System prompt: specify the persona and responsibilities of the chatbot. Refer to Step 5 in a tutorial on how to create an AI chatbot and write its prompt.
- Source: specify the content source value that AI chatbot can refer to when generating a response. Refer to the following table for available values.
List of values
The chatbot uses the basic OpenAI model.
The chatbot uses a PDF or txt file you uploaded on the dashboard. Supported formats are
A specified URL to be automatically analyzed and used as the bot's Knowledge Base Source. You can enter up to 10 URLs, each with up to 1,000 URL subpages.
- Once set, click the Create button in the top-right corner of the screen.
Step 2: Create a group channel
When a customer sends a message, it can create a group channel and initiate a chat with an AI chatbot. To create a group channel for both the current user and an AI chatbot, specify their unique IDs in
To differentiate group channels dedicated for Salesforce's Cases, such channels must have a specific value in its custom type. When creating a group channel for a customer and an AI chatbot, make sure to set its custom type to
The following code sample demonstrates how to set values for
Step 3: Allow end users to initiate conversations with an agent through API
To hand over the customer's inquiry from an AI chatbot to a human agent, you must send an API request that allows end users to initiate a chat with an agent, which is much like creating a Case through Apex REST API.
First, have the AI chatbot leave the group channel using a Platform API request. As explained in the beginning of the guide, when a customer asks for a human agent, the application server must send a request for a new Case to Salesforce Service Cloud, containing the channel URL to link. Once the Case is created, the group channel is connected for seamless handover and a human agent is assigned and invited to the channel. If you wish to learn more about the ways to create a Case, see our guide or refer to Salesforce's documentation