Install and Configure b+s Partner Messaging for Webex Connect
Install the package
- Install the
b+s Partner Messaging for Webex Connectpackage from AppExchange or using the direct link, if provided.
Salesforce Org pre-setup
Create Presence Statuses
Create a Routing Configuration
- From Setup, in the Quick Find box, enter
Routing Configurations - Click on
Newbutton - Specify the
Routing Configuration NameandDeveloper Name - Set the
Routing Priority,Routing ModelandCapacity Typeaccording to needs - Set a value in either
Units of CapacityorPercentage of Capacity - Save
Create a Queue
- From Setup, in the Quick Find box, enter
Queue - Click on
Newbutton - Specify a
LabelandQueue Name - In
Routing Configurationfind and set the Routing Configuration record just created - Under
Supported ObjectsfindMessaging Sessionand move it to theSelected Objectsbox
Do not add other objects than Messaging Session in the Selected Objects box
- Under
Queue Membersadd the required Agents - Save
Use Enhanced Conversation chat component in MessagingSession page
- Open
Setup > Object Manager - Find and click on
Messaging Sessionobject - Click on
Lightning Record Pages - Edit the existing page or create a new one if none is available
- If a new page is being created, select
Record Pageas type, provide aLabeland selectMessaging Sessionas object, the click onClone Salesforce Default Pagetab. - In the Page Editor, remove the
Conversationcomponent from theConversationtab and replace it with theEnhanced Conversationcomponent available from the components list. - To prevent showing the customer’s previous messaging sessions to agents in the Conversation component, check the
Limit conversation historycheckbox in theEnhanced Conversationcomponent settings panel on the right side of the screen. - Save and Activate the Lightning page
Set Up and Configure the OAuth External Client Apps
To establish communication between Webex Connect and Salesforce, two External Client Apps are required:
- Webex Connect External Client App: Used to authenticate requests sent from a Webex Connect Flow to Salesforce. This app issues an access token with permission to use the b+s REST Service.
- Interaction API External Client App: Used by Salesforce to authenticate calls to the Interaction Service API.
When a request is sent from a Webex Connect Flow:
- Webex Connect uses the Webex Connect External Client App to request, authenticate and obtain an access token to the Salesforce Org.
- Webex Connect forwards the End User message to the b+s Connects for Partner Messaging's REST Service, using the previously obtained access token.
- b+s Partner Messaging for Webex Connect forwards the message to the Salesforce Interaction API using the Interaction API External Client App. This App is specifically required to authenticate and perform the requests to the Interaction API.
Create an External Client App to allow connections from Webex Connect
To enable mutual TLS (mTLS) for requests sent from Webex Connect to the b+s Salesforce REST Service, you first need to request Mutual Authentication activation for your Salesforce org and set Up a Mutual Authentication Certificate. After completing these steps, ensure that all requests sent from Webex Connect are signed using a certificate stored in the Mutual Authentication Certificate store within your Salesforce org.
- Create a External Client App, fill in the basic required information (ref)
- Leave
Distribution Statewith the default valueLocal - Under
API (Enable OAuth Settings)tab, enable theEnable OAuthcheckbox, and configure these settings:- Set the callback URL as
https://salesforce.com - Add the OAuth scope:
Manage user data via APIs (api) - Select
Enable Client Credentials Flowand confirm the prompt message by pressing theOKbutton. - Click on
Createbutton.
- Set the callback URL as
- Click on
Policiestab - Expand
OAuth Policiestab - Under
OAuth Flows and External Client App Enhancementssection, set aRun Asuser. This user must have the required permissions to execute the Apex classes provided by the b+s Partner Messaging for Webex Connect package. - Save your changes
Get Consumer Key and Consumer Secret
To be able to use the External Client App from your Webex Connect Flow, the Consumer Key and Consumer Secret must be configured in your Flow.
Make sure you regularly rotate your Client IDs and Client Secrets to keep your integrations secure. You can follow the process described in Rotate the Consumer Key and Consumer Secret.
After generating new credentials, remember to update the Client ID and Client Secret in all Contact Center flows and IVR scripts where they are used. This will prevent any disruptions in your existing integrations.
- Open the External Client App previously created in view mode
- Click on the
Settingstab, expand theOAuth Settingstab and click onConsumer Key and Secretbutton. Verify your identity with the Verification Code received by email. - Make a note of the
Consumer Keyand theConsumer Secretfor later use.
Create a External Client App to authenticate to the Salesforce Interaction Service API
The External Client App required to authenticate against the Salesforce Interaction Service API requires a Certificate. The Certificate has to be attached to the Salesforce Interaction Service API External Client App, the private key of the certificate can be stored in Salesforce Certificate and Key Management or in custom meta data. You can use an existing valid certificate or create a new one by following the instructions below.
Using the Certificate and Key Management section of your Salesforce's Org Setup
Supported certificates:
- Create a new Self-Signed Certificate
- Create a new CA-Signed Certificate
- Import an existing Certificate from Keystore
To create certificates in Salesforce, follow the official docs.
Download the certificate and make a note of its Unique Name, both will be used in a later stage of the package configuration.
Using OpenSSL
Skip this chapter if you use Salesforce Certificate and Key Management
Follow the instructions in Salesforce official documentation
This process produces two files:
server.key: The private key (will be required later in the configuration)server.crt: The digital certificate, it must be uploaded during the creation of the External Client App (next step)
Store these two files in a safe place. Make a note of the private key of the Certificate (content of server.key), it will be required to complete the configuration in a later step.
Salesforce Interaction Service API External Client App
- Create a External Client App, fill in the basic required information (ref)
- Leave
Distribution Statewith the default valueLocal - Under
API (Enable OAuth Settings)tab, enable theEnable OAuthcheckbox, and configure these settings:- Set the callback URL as
https://salesforce.com - Add the OAuth scopes:
Access Interaction API resources(interaction_api) andPerform Requests at any time(refresh_token, offline_access) - Enable
Enable JWT Bearer Flowcheckbox, then clickUpload Filesand select the certificate previously created or imported in the keystore. - Save your changes, then click Continue
- Set the callback URL as
- Click on
Policiestab- In the
OAuth Policiessection, setPermitted UserstoAdmin approved users are pre-authorized. If you see a warning message, click OK - The section above
App Policiesnow shows the profile selection boxes. - Under
Select Profiles, move the profile of theRun AsUser configured in the External CLient App for the connection from Webex to the box on the right - Under
Select Permission Sets - Move the
b+s Partner Messaging Automated Processpermission set to the box on the right
- In the
When at least one Messaging Channel already exists and is linked to a Conversation Channel Definition record, any newly created Messaging Channels will automatically use the same Conversation Channel Definition, and therefore the same External Client App. Salesforce documents this as a consideration/limitation
Run APEX script to assign the required permission set to the Automated Process User
- Open the Developer Console (ref)
- Click on
Debug>Open Execute Anonymous Window - In the
Enter Apex Codetextarea, paste the following apex code:
PermissionSet permSet = [SELECT id FROM PermissionSet WHERE name = 'b_s_Partner_Messaging_Automated_Process'];
User autoProcessUser = [SELECT Id FROM User WHERE alias = 'autoproc'];
PermissionSetAssignment permSetAssignment = new PermissionSetAssignment(
AssigneeId = autoProcessUser.Id,
PermissionSetId = permSet.Id
);
insert permSetAssignment;
- Click
Execute - If no error is returned, the permission set has been successfully assigned to the Automated Process User