Integrations
Salesforce Service Cloud BYOC messaging

Salesforce Service Cloud messaging

Copy as markdown

|

View as Markdown

EARLY ACCESS



WhatsApp
IMPORTANT

Salesforce Service Cloud messaging is available as an Early Access feature. To learn more, contact your dedicated account manager or Support (opens in a new tab).

Salesforce Service Cloud is a customer service platform that enables support teams to manage cases, messaging sessions, and agent workflows across channels.

Set up a Bring Your Own Channel (BYOC) Messaging integration in Salesforce Service Cloud.

This integration supports two use cases:

  • 2-way messaging: The end user initiates a messaging session. Messages sent by the user are delivered and displayed within the Service Cloud messaging session in real time.
  • Chatbot to agent: The user initially interacts with a chatbot. If the conversation is transferred to a Service Cloud messaging session, the system imports all prior messages exchanged between the end user and the chatbot sequentially into the newly created session.

What you will need

To use this integration, you need:

Verify that the authorized user has the following permission set licenses:

  • Messaging for In-App and Web User
  • Messaging User
  • Partner Messaging User
  • Service User
Permission set license assignments in Salesforce

Verify that the authorized user has the following permission set assignments:

  • Service Cloud User
  • Messaging for In-App and Web User
Permission set assignments in Salesforce

Verify that the authorized user has the Service Cloud User option selected in the user settings.

Service Cloud User option in Salesforce user settings

API key scopes

The required API key scopes depend on the use case.

2-way messaging:

  • numbers:manage
  • account-management:manage
  • inbound-message:read
  • message:send
  • messages-api:manage
  • messages-api:message:send

Chatbot to agent:

  • numbers:manage
  • account-management:manage
  • inbound-message:read
  • message:send
  • messages-api:manage
  • messages-api:message:send
  • answers:manage
  • conversations:manage

Add Connected App for OAuth

Create a connected app or external client app (ECA) to authenticate the integration between your platform and Salesforce.

NOTE

Salesforce documentation states that external client apps (ECAs) are preferred over connected apps. To create a connected app, contact Salesforce Support to request the permission.

Create the connected app

  1. Verify that you have a public certificate saved in your system. You upload this file when creating the connected app. If you do not have a self-signed certificate, see the Salesforce documentation (opens in a new tab).

  2. From Setup, in the Quick Find box, enter External Client Apps, and then select Settings.

  3. Enable the Allow creation of connected apps toggle.

    External Client App Settings with Allow creation of connected apps toggle
  4. Under Connected Apps, select New Connected App.

  5. In the Connected App Name field, enter a name in the format {prefix} {connectedAppName} (for example, Partner1 ConnectedApp1). The prefix is used as the developerName in the ConversationChannelDefinition record.

  6. In the Contact Email field, enter the email address of the person to notify about the connected app.

  7. Select the Enable OAuth Settings checkbox and configure the following:

    1. Add a callback URL (endpoint), the same as the OAuth redirect URI. Use https://login.salesforce.com to start.
    2. Select Use digital signatures, select Choose File, and upload the public key file.
    3. Add the following OAuth scopes:
      • Access Interaction API resources (interaction_api)
      • Perform Requests at any time (refresh_token, offline_access)
      • Manage user data through APIs (api)
  8. Save your changes and select Continue.

Set OAuth policies

  1. From Setup, search for Manage Connected Apps and select it.
  2. Select your connected app, then select Edit Policies.
  3. In OAuth Policies, set Permitted Users to Admin approved users are pre-authorized and select OK.
  4. Save your changes.
  5. Select Manage Profiles, assign System Administrator (or your user group), and save.

Copy Consumer Key and Secret

  1. Open App Manager, locate your app, select the app menu, and select View.

    Manage Connected Apps view showing API and OAuth settings
  2. Select Manage Consumer Details and copy the Consumer Key and Consumer Secret.

  3. Go to Company Settings > Company Information and copy the Salesforce Organization ID.


Create and configure the Custom Platform Event

Create a custom platform event to send and receive messages between Salesforce and the partner messaging system. Define fields to customize the platform event data, and assign permissions to the platform event.


Create the Custom Platform Event

  1. From Setup, search for Platform Events and select it.
  2. Select New Platform Event.
  3. In the Label field, enter a name (for example, Infobip Event) and the plural form (for example, Infobip Events).
  4. Verify that Event Type is set to High Volume, Publish Behavior is set to Publish After Commit, and Deployment Status is set to Deployed.
  5. Save your changes.

Add custom fields to the Platform Event

  1. From Setup, search for Platform Events and select it.
  2. Select your platform event.
  3. In Custom Field & Relationships, select New and create two fields:
    • Data Type: Text, Field Label: EventType (length between 36 and 255).
    • Data Type: Text Area (Long), Field Label: Payload.

Assign permissions to the Platform Event

  1. From Setup, search for Permission Sets and select it.

  2. Select SCRT2 Integration User > Object Settings > your platform event.

  3. Select Edit, enable Read and Create, and save.

    Platform Event object permissions with Read and Create enabled

Enable App Configuration

Add a Visualforce iFrame Component

  1. Go to Setup > Visualforce Components > New.

    Visualforce Component edit form in Salesforce Setup
  2. Paste the following component code and save your changes.

<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId">
  <aura:attribute name="recordId" type="String" />
  <aura:attribute name="height" type="String" default="100px"/>
  <aura:attribute name="width" type="String" default="100%"/>
  <aura:attribute name="src" type="String"/>
  <iframe src="{!v.src+'?id='+v.recordId}" width="{!v.width}" height="{!v.height}" scrolling="auto" allowfullscreen="true" style="border:none;"/>
</aura:component>

Add App Configuration Lightning page

  1. Open Setup > Lightning App Builder > New, then select App Page.

    Create a new Lightning page dialog with App Page option selected
  2. Add a page label (for example, Infobip BYOC Configuration) and select One Region.

  3. Add the iFrame component. Set the Src URL to https://sfsc-connector.ibintegrations.com/ and increase the height to at least 1000px. Save your changes.

    Lightning App Builder with iFrame component and Src URL configured
  4. Open App Manager, find the Service Console app, and select Edit.

  5. In Navigation Items, find your page and add it to Selected Items.

    Service Console Navigation Items with the configuration page added
  6. Save your changes and reopen the Service Console app. The configuration page appears in the navigation items.


Configure the Connector App

After adding the App Configuration page, follow the setup wizard and fill in the required fields.

  1. Set up BYOC connection: The system generates an access token and automatically creates the Conversation Vendor Info and Conversation Channel Definition. Fill in the required fields and select Next.

    BYOC Configuration wizard step 1 with Salesforce credentials and platform event fields
  2. Configure the application: Provide the Channel Address Identifier, SCRT URL, and Authorization Context. To find the Channel Address Identifier, go to Setup > Messaging Settings and open your Messaging Channel.

    App Configuration step with Channel Address Identifier and SCRT URL fields
  3. Add Infobip account: Provide an API key with the required scopes. Optionally, specify the Base URL.

  4. Select senders: Select an available and supported sender from the account you added and select Next.

After completing all steps, the summary screen confirms the configuration is complete.


Enable Messaging and create a channel

  1. From Setup, search for Messaging Settings and select it, then select New Channel.

    Messaging Settings page with New Channel button
  2. Select the Conversation Channel Definition tile that shows the definition you created and select Next.

  3. Give your channel a name. Select anywhere on the page to auto-fill the Developer Name field.

  4. Save your changes, select Activate, then copy the Messaging Platform Key. This is your Channel Address Identifier.

    Messaging channel detail page showing Messaging Platform Key and Channel Address Identifier

Route work items to an agent


Create a routing configuration

Prerequisites:

  • Omni-Channel and Enhanced Omni-Channel Routing are enabled
  • Login behavior is set to Automatically log agents in to Omni-Channel in the new window or tab

To create a routing configuration:

  1. Go to Omni-Channel > Routing Configurations > New.
  2. Set the Routing Model to Most Available and Units of Capacity to 1.00.
Routing Configuration form with routing settings

Create a queue

  1. Go to Users > Queues > New.
  2. Add the queue name and select Send Email to Members.
  3. Under Configuration with Omni-Channel Routing, select your routing configuration.
  4. Under Supported Objects, select Messaging Session.
  5. Under Queue Members, select the users or group to assign to this queue.
  6. Save your changes.

Create an Omni-Channel flow

Create the flow

  1. From Setup, search for Flows and select it under Process Automation.

  2. Select New Flow > All + Templates > Omni-Channel Flow in the navigation pane.

  3. Select a template or select Omni-Channel Flow to start from scratch, then select Next.

    New Flow dialog showing Omni-Channel Flow template options

Add variables

  1. In the sidebar, select New Resource > Variable. Set the Data Type to Text and select Available for input under Availability Outside the Flow.

    New Resource dialog for creating the recordId variable
  2. Save your changes and create a second variable named errorReason with the same settings.

Add actions

  1. Select + and add an Update Records action:

    • Set the object to Messaging Session.
    • Filter records where Messaging Session ID equals the recordId variable.
    • Set the Error Reason field value to the errorReason variable.
    Update Records action configured for Messaging Session with Error Reason field
  2. Save your changes.

  3. Add a Get Records action:

    • Set the object to Case.
    • Filter records where Case ID equals the recordId variable.
    • Set How Many Records to Store to Only the first record.
    • Set How to Store Record Data to Automatically store all fields.
    Get Records action configured for Case object
  4. Save your changes.

  5. Add a Route Work action:

    • Set the Record ID Variable to recordId.
    • Set the Service Channel to Messaging.
    • Set Route To to Queue and select the queue you created.
  6. Save your changes and select Activate.


Start a session with Agentforce Service Agent (optional)

Optionally, enable the AI agent to proactively initiate conversations and send the first message to an end user, for example, on third-party self-service portals.

Call the Establish Conversation API (POST /api/v1/conversation) when an event occurs (for example, when a chat widget opens). This API returns a conversationIdentifier and messaging session ID. Optionally, include routingAttributes in the payload.

If the routing owner is Salesforce (routingOwner is Salesforce in the Conversation Channel Definition record), Omni-Channel routes the conversation and an AI agent proactively starts a conversation using platform events.


Set up Omni-Channel routing

  1. Open your messaging channel in Messaging Settings.
  2. Under Omni-Channel Routing, select Edit, set Routing Type to Omni-Flow, and save your changes.

Create a Presence Status

  1. Go to Omni-Channel > Presence Statuses and select New.
  2. Set Status Options to Online, select Messaging under Selected Channels, and save.
Presence Status setup with Online status and Messaging channel selected

Set up Presence Configuration

  1. Open Omni-Channel > Presence Configuration > Default Presence Configuration.
  2. Select Edit, increase the capacity to 10, and add your queue in Available Transfer Queues and Available Transfer Flows.
  3. Save your changes.

Go to Setup > Profiles > [your profile] > Service Presence Statuses Access and assign the presence status you created.

Service Presence Statuses Access with Infobip Presence Status assigned

Configuration reference

By the end of the Salesforce instance setup, you must have the following values prepared:

FieldDescription
orgIdYour Salesforce organization ID
channelAddressIdentifierChannel Messaging Platform Key
authorizationContextThe Connected App name
Base URLYour Salesforce instance base URL
Consumer KeyConnected App consumer key
UsernameAccount username used for authentication with the Connected App
Custom Event Payload FieldAPI name of the custom event payload field
Custom Event Type FieldAPI name of the custom event type field
Custom Event Name FieldAPI name of the custom event name field
Developer NameValue used in the ConversationChannelDefinition

Set up Infobip account for 2-way messaging


Subscription setup for 2-way messaging

  1. Log in to the Infobip web interface (opens in a new tab) and go to Developer Tools > Subscription Management.

  2. Open Authentication Settings and create a new setting: select HMAC type, add XrPAnXqwPLvh9jLcqEowjT3ippwmFMp secret key, select HMAC_SHA_256 algorithm, and save.

    Create authentication settings with HMAC type and HMAC_SHA_256 algorithm
  3. Create a notification profile: set the Webhook URL to https://sfsc-connector.ibintegrations.com/api/infobip/inbound/messages, select your authentication setting under Security settings, and save.

    Create notification profile with Webhook URL configured
  4. Open the Subscriptions tab and create a new subscription. Select WhatsApp channel and Inbound message event.

    Select events screen with Inbound message checked for WhatsApp
  5. Select the notification profile you created and select Next, then select Save.

  6. Open Numbers and select the sender number you want to apply this subscription to.

  7. Select Edit. In Forwarding action, select Apply subscription and select Configure.

    Default inbound configuration with Apply subscription forwarding action
  8. Send a test message to verify the configuration.

When the configuration is complete, a new messaging session opens in the Service Console when the system receives your message.


Set up Infobip account for chatbot to agent handover messaging


Chatbot flow

This use case shows a basic chatbot setup using Answers/Chatbots. The bot asks the user a simple question and, if needed, transfers to a live agent, which opens a Salesforce Service Cloud Messaging session.

NOTE

Answers is an Infobip product available for existing accounts. New accounts use AgentOS and Chatbots. Existing accounts can upgrade to AgentOS at any time.

To trigger the handover, add a Call API step that sends a POST request with the required data. See Call API configuration for the required parameters.


Call API configuration

Use the following parameters for the Call API step in the chatbot flow.

ParameterValue
Request TypePOST
Endpoint URLhttps://sfsc-connector.ibintegrations.com/api/infobip/inbound/answers
HeadersContent-Type: application/json
Call API configuration dialog showing request parameters and body fields

The following image shows the configured Call API step in Infobip Answers/Chatbots.

Call API configuration in Infobip Answers/Chatbots

Request body

Include the following fields in the request body.

FieldValue (Infobip Placeholder)Description
conversationId<conversationId>Unique ID of the conversation from Infobip Answers/Chatbots
senderNumber<senderNumber>End user's phone number from Infobip Answers/Chatbots

Subscription setup for chatbot transfer

  1. Repeat steps 1 through 5 from the 2-way messaging subscription setup, but select the Tools tab instead of Channels.

  2. Select Customer engagement.

    Choose category screen with Tools tab and Customer engagement option selected
  3. Select Conversation Message Received event and select Next.

    Select events screen with Conversation message received checked under Customer engagement
  4. Skip the Set filters step.

  5. Select your notification profile. Verify the Webhook URL is https://sfsc-connector.ibintegrations.com/api/infobip/inbound/messages and the authentication setting is applied.

  6. Select Next to go to the summary and save the subscription.

Expected behavior:

  1. The end user sends a message that triggers the chatbot response.
  2. The end user selects Talk to agent, which triggers the Call API step.
  3. When a Service Cloud agent is available (presence is enabled), a messaging session opens and the user receives a custom message such as "Hang tight, an agent will join the chat in just a moment."
  4. When the agent closes the session, a configurable closing message is sent to the user. For example, "This conversation has ended. Message us again if you need help."
NOTE

The welcome and closing messages are configurable in the App Configuration step.


WhatsApp Templates Messaging

The WhatsApp Template Messaging panel is embedded in the Service Cloud Messaging Session page. Agents can select a WhatsApp sender, load approved templates, fill in values, and send templates without leaving the conversation.

Prerequisites:

  • At least one Infobip account must be connected for the app.
  • At least one WhatsApp sender must be selected in the app's sender configuration.
  • The selected sender must already have approved WhatsApp templates in Infobip.
  • The WhatsApp Templates iframe must be added to the Service Cloud Messaging Session page layout.

Add WhatsApp Templates iframe to Messaging Session page

  1. Open the Messaging Session page, go to Setup Menu > Edit Page.

  2. Add the iFrame component next to the conversation component with srcUrl: https://sfsc-connector.ibintegrations.com/templates.

    Messaging Session page with iFrame component showing WhatsApp templates
  3. Save the page changes and reopen the page to view the changes.

    Messaging Session page showing WhatsApp templates panel after saving and reopening

Configure WhatsApp senders

  1. Open the app setup and connect the required Infobip account or accounts.
  2. Go to Configure WhatsApp Senders and select one or more senders for the app.
  3. Save the configuration and confirm that the WhatsApp Templates panel is available on the right side of the Messaging Session page.

Send WhatsApp templates from a messaging session

  1. Open a Messaging Session in Service Cloud.
  2. In the right-side panel, open Send WhatsApp Template Message.
  3. In Select sender, choose the sender you want to use. The system loads approved templates for that sender.
  4. Select a template. You can search by template name or category.
  5. Confirm or update the recipient phone number and fill in any required template values.
  6. Review the preview and select Send.

Depending on the template, agents may need to provide the following values:

ValueDescription
Header textText for the template header
Header media URLURL for image, video, or document templates
FilenameName for document headers
Body placeholder valuesText for available body placeholders
Button parametersValues for dynamic URL buttons
Quick reply payload valuesPayload for quick reply buttons

NOTE
  • Where supported, agents can insert Salesforce values using the placeholder picker. The recipient phone number may also be pre-filled from the session.
  • Templates are loaded only after a sender is selected.
  • Only approved templates are shown. Availability depends on the selected sender.
  • If no sender is configured, the panel cannot be used.
  • If context is unavailable, agents can still enter values manually.
  • Static and fixed URL buttons are displayed as read-only references.
  • Quick reply payloads have a maximum length of 128 characters.

Troubleshooting









Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary
Service status

Copyright @ 2006-2026 Infobip ltd.

Service Terms & ConditionsPrivacy policyTerms of use