Integrate with Salesforce Service Cloud
This guide explains how to integrate Salesforce Service Cloud with Sendbird Chat through Salesforce Connector. First, download the Salesforce Connector installation package. Then set up the integration environment on both the Sendbird Dashboard and Salesforce. After set-up, create a group channel on Sendbird Chat SDK and create a Salesforce Case to connect the channel to.
Prerequisites
-
A
Service Cloud User
feature license is required for any user who will utilize Sendbird Support Chat. -
Omni-Channel should be enabled in order to support automatic routing of cases to agents.
Step 1. Install the Sendbird Support Chat Salesforce Connector package
-
Install the package from the Salesforce AppExchange.
-
Log in to your Salesforce org using an account with the System Administrator profile.
-
Select Install for Admins Only and Click Install.
Note: Installing for Admins only prevents unintended access to Sendbird Support Chat's visual configuration page. We'll assign permissions to necessary users later on.
- A popup will appear asking if you would like to grant third-party access to Sendbird. See if Sendbird’s websites are checked and check Yes, grant access to these third-party web sites. Then click Continue.
Note: Because the Salesforce Connector does not know what region your Sendbird application resides in, all Sendbird regions are included.
Note: If you see an error message stating
Invalid type: UserServicePresence, AgentWork
in Salesforce, go to Setup > Feature Settings > Service > Omni-Channel > Omni-Channel Settings. Then, check the box next to Enable Omni-Channel and click Save.
Step 2. Configure Sendbird using dashboard
To allow the Salesforce Connector to authenticate with Sendbird, you must enable the Salesforce integration in the Sendbird Dashboard.
Additionally, since the Salesforce Connector leverages several features of the Sendbird Chat product, review your chat-based settings to ensure they align with your service requirements.
Enable Salesforce integration
- On the Sendbird Dashboard, go to Settings > Chat > Integrations and click on the Salesforce tile.
-
Click the Add button in the top-right corner to start Salesforce integration.
-
Once enabled, the API Token field will appear. Save this token for later as it will be needed during the configuration of Salesforce.
Configure group channel settings
Once integrated, all conversations between your agents and customers will take place in Sendbird group channels.
To provide a cohesive customer service experience, enable the following group channel functionalities. These features help ensure timely and comprehensive support by allowing agents to view pervios converations for context and stay informed of any updates to the customer's Case.
-
Go to Settings > Chat > Channels > Group channels.
-
Turn on Chat history to allow agents to see messages between previous agents and customers within the group channel.
-
Select Joins automatically when invited for Default channel invitation preference.
-
(Optional) Select which Auto message to send to group channels for specific user and channel events. An Auto message is an admin message that is automatically sent to group channels when certain events occur. The screenshot below shows the recommended settings for Auto message.
Step 3. Configure Salesforce
After configuring group channels in the Sendbird Dashboard, navigate to Salesforce Setup and configure the service environment for integration.
Note: This guide assumes that you are a Salesforce user with the System Administrator profile.
Update the sendbird__Setting__c
object in Salesforce
When you install the Sendbird Support Chat package, an instance of the sendbird__Setting__c
SObject is automatically created in Salesforce.
To connect Sendbird Support Chat with your Sendbird application, you must update the sendbird__Setting__c
SObject with your Sendbird Application ID and API Token.
-
In Salesforce, click the App Launcher, then search for and select Sendbird Support Chat Configuration.
-
Enter your Sendbird Application ID and API Token obtained in the previous section.
-
(Optional) Toggle any features you wish to enable or disable.
-
Click save.
Register a Remote Site
To send an HTTP request from Salesforce to an external service, you need to explicitly allow it. As such, your Sendbird API base URL must be registered as a Remote Site in Salesforce.
-
In Salesforce Setup, search for Remote Site Settings using the Quick Find search bar, or navigate to Setup > Security > Remote Site Settings from the left-hand menu.
-
Click New Remote Site at the top of the Remote Site table.
- Fill in the fields as follows:
-
Remote Site Name: Enter a unique name using only alphanumeric characters and underscores. Spaces are not allowed.
-
Remote Site URL: Enter
https://api-[YOUR_SENDBIRD_APPLICATION_ID].sendbird.com
, replacing[YOUR_SENDBIRD_APPLICATION_ID]
with your actual Sendbird Application ID. -
Check the box next to Active, then click Save.
Set up Omni-Channel
Once integrated, Support Chat connects Salesforce Cases with Sendbird group channels. To effectively manage and route these Cases to your agents, leverage Salesforce’s Omni-Channel feature.
Omni-Channel automatically routes work items—such as Cases—to agents based on criteria like agent availability, capacity, and status. To get started, you’ll need to configure the following components: Service Channel, Presence Status, User Access, Routing Rule
This guide outlines the basic Omni-Channel setup required for Sendbird integration. For more advanced customization options, refer to Salesforce's guide on Omni-Channel.
Service Channels
-
In Salesforce Setup, search for Omni-Channel Settings using the Quick Find bar, or navigate to Setup > Omni-Channel > Omni-Channel Settings in the left-hand menu.
-
If not already enabled, check the box to activate Omni-Channel. You may also configure additional options based on your service needs—such as Skills-Based Routing or Secondary Routing Priority.
-
Navigate to Setup > Feature Settings > Service > Omni-Channel > Service Channels, then click the New button at the top of the table.
Note: If a Service Channel associated with the Case SObject already exists, you may skip this step.
- Create a new Service Channel for Cases. Fill in the fields as follows, then click Save:
-
Service Channel Name: Enter a name of your choice.
-
Developer Name: Enter a value of your choice. This is typically auto-filled based on the Service Channel Name.
-
Salesforce Object: Select Case from the dropdown.
-
(Optional) Check Minimize the Omni-Channel widget when work is accepted if you want the widget to collapse after agents accept a work item.
-
(Optional) Check Automatically accept work requests if you want Cases to be auto-assigned to agents. If left unchecked, agents will need to manually accept Cases through the Omni-Channel Utility.
Presence Status
- Navigate to Setup > Feature Settings > Service > Omni-Channel > Presence Statuses in the left-hand menu, then click the New button at the top of the table.
Note: If your org already has Presence Statuses in use, you can add the Service Channel from the previous section to the existing statuses instead of creating a new Presence Status.
- Create a new Presence Status. Fill in each field as described below, then click Save to complete the setup. For more details, see Salesforce's guide on Presence Status Settings:
-
Status Name: Enter a name of your choice (e.g.,
Available
,Online
). -
Developer Name: Enter a value of your choice. This is usually auto-generated based on the Status Name.
-
Status Options: Select Online from the dropdown.
-
Selected Channels: Add the Service Channel you created in the previous section to the Selected Channels list.
User Access
-
Navigate to Setup > Users > Profiles in the left-hand menu, and select the profile that will use the Presence Statuses created in the previous section.
-
Scroll down (or click) to the Service Presence Status Access section, then click Edit.
-
Add the Presence Status you created earlier to Enabled Service Presence Status Access, then click Save.
Routing Rule
-
Navigate to Setup > Feature Settings > Service > Omni-Channel > Routing Configurations in the left-hand menu, then click the New button to create a new routing rule.
This rule will be applied to your Queues in the following section. -
Fill in the fields as follows, then click Save:
-
Routing Configuration Name: Enter a value of your choice.
-
Developer Name: Enter a value of your choice.
-
Routing Priority: Enter a priority value.
For details, see Salesforce’s guide on Routing Priority. -
Routing Model: Choose a routing model.
For guidance, see Salesforce’s guide on Routing Model. -
Units of Capacity or Percentage of Capacity (optional):
Enter a value in either of these fields. At least one must be specified.
Learn more in Salesforce’s guide.
Set up Queues and Assignment Rules
In Salesforce Service Cloud, each issue raised by customers or agents is referred to as a Case.
Cases are placed into Queues and assigned to agents based on Assignment Rules.
This guide outlines the basic requirements for integration with Sendbird Support Chat.
To learn more about customizing Queues and Assignment Rules, refer to Salesforce’s guide.
Create a Queue and add Members
To assign agents to Cases with an associated Sendbird channel, you must create a dedicated Queue and define Assignment Rules.
-
Navigate to Setup > Users > Queues in the left-hand menu, or search for Queues using the Quick Find bar.
-
Click the New button at the top of the Queues table.
-
Fill in the fields as follows, then click Save:
-
Label: Enter a name of your choice.
-
Queue Name: This will auto-generate after you enter the Label.
-
Configure with Omni-Channel Routing: Search for and select the Routing Configuration you created in the previous step.
-
Supported Objects: In the Available Objects list, select Case and move it to Selected Objects.
-
Queue Members: Add members to Selected Members. These users will be eligible to receive Cases routed to this queue.
Create Assignment Rules
If your organization already has a Case Assignment Rule in use, you can continue using it or simply add a new Rule Entry to it. To add a new rule from scratch, follow the steps below starting at step 1. If you're adding an entry to an existing rule, jump to step #4.
-
Navigate to Setup Home > Feature Settings > Service > Case Assignment Rules in the left-hand menu, or search for Case Assignment Rules using the Quick Find bar.
-
Click the New button at the top of the Assignment Rules table.
-
Enter a name for the new assignment rule.
Check the Active box, then click Save.
You’ll be returned to the Case Assignment Rules page—click the rule you just created. -
In the Rule Entries section, click the New button.
-
Fill in the new rule entry as follows, then click Save:
-
Step 1 – Sort Order: Set to
1
. -
Step 2 – Criteria:
- Field:
Case: Sendbird Channel URL
- Operator:
not equal to
- Value:
Null
This condition identifies Cases linked to a Sendbird chat channel using the custom fieldSendbird Channel URL
.
- Field:
-
Step 3 – Assign To:
- Select
Queue
from the dropdown. - Search for and select the queue created in the previous section.
- Select
-
Assign Permission Set to agents
-
Navigate to Setup Home > Users > Permission Sets in the left-hand menu, or search for Permission Sets using the Quick Find bar.
-
In the table, click the
Sendbird Lightning User
permission set, then click the Manage Assignments button. -
Click the Add Assignments button.
-
In the table, select the users you want to grant access to Sendbird Chat, click Next, and then click Assign.
Add UI components
With the UI components provided by the Salesforce Connector, agents can engage in real-time conversations with customers while still accessing all relevant data in Salesforce Service Cloud.
The Salesforce Connector offers two types of user interfaces:
- Utility Widget Chat UI: A floating chat window accessible through the utility bar.
- Case-Embedded Chat UI: A chat interface embedded directly within the Case record page.
Utility widget UI
Add Sendbird Chat Panel as a Utility Item in Service Cloud.
-
Navigate to Setup > Apps > App Manager, locate Service Console in the table,
then click the down arrow at the end of the row and select Edit. -
In the left-hand menu, select Utility Items (Desktop Only).
-
Click Add Utility Item, then choose Sendbird Support Chat from the list.
-
Configure the following Utility Item Properties:
- Icon: Remove the default fallback icon and set it to
anywhere_chat
. - Panel Width: Enter a value of your choice. We recommend
860
. - Panel Height: Enter a value of your choice. We recommend
480
. - Start Automatically: Check this box.
- Icon: Remove the default fallback icon and set it to
-
Click Save to apply the changes.
You'll also need to add the Omni-Channel panel UI as a Utility Item.
-
Click Add Utility Item, then select Omni-Channel from the Standard category.
-
The property values for Omni-Channel are preconfigured for optimal performance and cannot be edited.
Case-embedded UI
The Sendbird Chat Panel can also be embedded directly within the Case page as a UI component.
- Click the App Launcher icon next to Setup in the top-left corner of your screen.
Search for and open the Service Console app.
-
Select any Case of your choice from the Service Console.
-
Click the Setup gear icon in the top-right corner, then select Edit Page.
- In the Lightning App Builder, use the search box at the top of the left menu to search for Sendbird Chat Panel.
Under Custom – Managed, drag Sendbird Chat Panel into the desired location within the Case layout.
Resize or reposition the component as needed.
-
To prevent the chat panel from showing an error when a Case is not linked to a Sendbird group channel, set a Component Visibility filter:
- Select the Sendbird Chat Panel component in the layout.
- In the right-hand sidebar, under Set Component Visibility, click Add Filter.
- Use the following values:
- Field:
Sendbird Channel URL
- Operator:
Not Equal
- Value:
''
(empty string)
- Field:
-
If the page you added the component to hasn’t been activated, click Activation in the top-right corner of the screen.
-
In the Activation popup:
- Go to the APP DEFAULT tab.
- Click Assign as App Default.
- In the Select Apps popup, choose Service Console, then click Next.
- For Select Form Factor, choose Desktop and click Next again.
- Review the assignment details and click Save to apply the changes.
- If changes are saved, you can go back to the Case view and see if the chat UI component is working properly.
Step 4 Try the live demo
The integration configuration is now complete. Before building your application with the Sendbird Chat SDK, you can explore the user experience offered by the Salesforce Connector through our live demo.
Note: We strongly recommend testing the demo application using a Salesforce development or sandbox account to avoid confusion.
While Sendbird does not retrieve or store any sensitive Salesforce data, creating Cases in a production environment via the demo could lead to user confusion or data clutter.
The demo simulates the end-user experience: initiating a message creates a Salesforce Case and opens a chat session with an agent via Sendbird group channels.
Demo Steps
-
Click Login with Salesforce and enter your Salesforce account credentials.
-
When prompted, click Allow to grant the Salesforce Connector access to user data and identity services.
-
In the sample app, click the Start chat button in the top-right corner to begin a conversation.
-
Check your Salesforce Service Console to confirm that the Case was successfully created:
- The Case will be assigned to an available agent.
-
Confirm that the Sendbird Chat Panel UI component embedded earlier displays the chat correctly in the agent view.
Step 5. Client-side implementation
Once you’ve set up both Sendbird Dashboard and Salesforce Service Cloud for integration, implement the client application.
Salesforce Connector links a Salesforce’s Case to a group channel in Sendbird with its channel URL. So, link the group channel's URL to the Sendbird__ChannelUrl__c
property of Case. Set the optimal configurations of group channels including setting the value of custom_type
to SALESFORCE_SUPPORT_CHAT_CHANNEL
.
Once the group channel are set, add the SampleCaseController
class to Salesforce Service Cloud to handle the API requests for Cases and create a Case using a RESTful API. Salesforce Service Cloud doesn’t provide both a client-side SDK and a dedicated server to process the API requests related to Cases. Thus, use AWS’ Lambda, your own server, or create an API endpoint in Apex to handle API calls. This guide demonstrates how to create a public endpoint in Apex for a quick and easy implementation.
For the implementation of general chat features such as loading a list of group channels, entering a channel, and sending messages, see our Sendbird Chat Docs.
Note: This sample is intended to serve as a quickstart for your convenience and doesn’t support crucial security features such as a validator, authenticator, error handling, security checks, etc. We strongly recommend that developers thoroughly review and test any codes before deployment and modify them to meet the security and functionality requirements of your organization. We aren't responsible for any damages or issues that may arise from the use of this sample code. To learn more about authorization on Salesforce, visit Salesforce’s guide.
Set the custom type of group channels
First of all, a group channel must be created so that its channel URL can be passed to a Case in Salesforce and the connection is made. In order for Salesforce Connector to recognize such group channels, the channel's custom_type
must be set to SALESFORCE_SUPPORT_CHAT_CHANNEL
. The following is an example of group channel data in JSON format.
Group channel properties
Besides the group channel’s custom_type
, the following properties need to be checked for Salesforce Connector integration.
For example, once Salesforce Connector is integrated, a group channel must be created in your client app or through Sendbird Platform API for each Case so that the channel can be linked to the Case with its channel URL. To do so, the group channel’s channel_url
should be passed to the Case’s Sendbird__ChannelUrl__c
property.
Add the following custom fields to the Case so that each Case object can be linked to a group channel in your Sendbird application.
Property name | Type | Description |
---|---|---|
Sendbird__UserId__c | string | Specifies the unique ID of the user who created the Case. This user ID is from your Sendbird application. |
Sendbird__ChannelUrl__c | string | Specifies the URL of the group channel to be linked to the Case on Salesforce Service Cloud. |
The group channel, linked to a Case, synchronizes the Case's status information to its metadata.caseStatus
property. You can also be notified of such change by adding a channel event handler such as onMetaDataUpdated
. To learn more about event handlers, see this page.
By tracking the change of Case status, Salesforce Connector also supports a functionality that enables an agent to leave a group channel when the Case is closed. To enable this feature, the Case status label of Closed
should not be edited or changed. Make sure that the status label for closed Cases is set to Closed
in Setup > Object Manager > Case > Fields & Relationships > Status.
Create a Case through a REST API
There are multiple ways to create a Case, such as making a REST API request, but this guide uses a public domain and Apex REST API. By default, the Salesforce REST API requires authentication. However, in this guide, you will create a public endpoint using Salesforce’s Site, which allows you to make calls without authentication.
Note: Depending on your organization environment on Salesforce Service Cloud, you may need OAuth authentication and Salesforce RESTful API to create a Case on your website or application. See Salesforce's guide on OAuth 2.0 Client Credentials Flow for Server-to-Server Integration.
Add the SampleCaseController class
Before creating a Site, add the SampleCaseController
class to Salesforce Service Cloud.
-
Select the Setup button in the top-right corner of your screen to open Developer Console.
-
When the console appears, go to File > New > Apex Class. Enter a new class name
SampleCaseController
and select OK. -
Copy and paste the following code into the console and Save.
Create a public endpoint
-
On Salesforce's Setup page, go to Setup > User Interface > Sites and Domains > Sites in the left menu bar. If you already have a site domain you can use, click Site Label of your choice and skip to #5. If you don’t have a site yet, check Sites Terms of Use first and select Register My Salesforce Site Domain.
-
Click the New button at the top of the Sites table.
- Fill in and check each item according to the following instructions.
-
Site Label: Enter a name of your choice.
-
Site Name: This is automatically generated once you’ve entered Site Label.
-
Active Site Home Page: Choose any site from the search list. This won’t affect the behavior of the Site.
-
Check the box next to Active.
-
Check the box next to Lightning Features for Guest Users.
-
Check the box next to Enable Content Sniffing Protection.
-
Check the box next to Referrer URL Protection.
-
Check the box next to Redirect to Custom Domain.
-
Check the box next to Cache public Visualforce pages.
Note: Make sure to leave the Default Web Address empty.
- Save the Site and you will see Site Details of the new site you’ve created. Select Public Access Settings at the top of the Site Detail table.
- Select Enable Apex Class Access at the top of the table. This will land you to the Enabled Apex Class Access section. Then choose Edit next to the section title.
-
Select SampleCaseController from Available Apex Classes and add it to Enabled Apex Classes. Then Save.
-
You will see the controller added as an accessible class.
-
Click edit button in the page and find Standard Object Permissions tab. Grant Read and Create basic access for Case.
-
On Salesforce's Setup page, go to Setup > Sharing Settings in the left menu bar. At the bottom, click "New" under "Setting Sharing Rules". Select your account created in step 4.
-
Select "Guest user access, based on criteria" and set the criteria to "API Token not equal to Null." Then, for the user, choose the user created in step 5 above.
-
Now you can send a message to the Apex REST API server you’ve created and create a Case using the following sample. Copy the Site URL from the Sites list and use it in the request URL. Then copy and paste the following request body to your client app.