Support Chat Guide v1
Support Chat
Version 1

Integrate with Sendbird AI chatbot

Copy link

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.


Prerequisites

Copy link

Step 1: Create an AI chatbot

Copy link

First, create an AI chatbot for your Sendbird application either through Sendbird Chat's Platform API request or on Sendbird Dashboard. The easiest way is to go on the dashboard as shown below.

  1. On the dashboard, select your Sendbird application to create an AI chatbot for.

  2. Go to Chat > AI chatbots and click the Create bot + button in the top-right corner of the screen.

  1. 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

Copy link
ValueDescription

None

The chatbot uses the basic OpenAI model.

File

The chatbot uses a PDF or txt file you uploaded on the dashboard. Supported formats are json, txt, md, and pdf. The maximum file size is 5MB.

URL

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.


  1. Once set, click the Create button in the top-right corner of the screen.

Step 2: Create a group channel

Copy link

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 members. For further information on channel creation, refer to our documentation for Chat SDK for JavaScript or Platform API. If the customer later requests a human agent for additional support, a new Case should be created in Salesforce Service Cloud and connected to the channel. Connecting the channel can be done using the channel URL and custom type value.

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 SALESFORCE_SUPPORT_CHAT_CHANNEL.

The following code sample demonstrates how to set values for custom_type and members in json.

{
  "name": "User Inquiry: Payment not working",
  "channel_url": "support_chat_channel_23489",
  "cover_url": "https://sendbird.com/main/img/cover/cover_08.jpg",
  "custom_type": "SALESFORCE_SUPPORT_CHAT_CHANNEL",
  "data": "",
  "members": ["bot_id", "current_user_id"],
  // Other group channel properties below.
}

Step 3: Allow end users to initiate conversations with an agent through API

Copy link

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