Skip to main content
Version: 6.0

Install and Configure b+s Partner Messaging for Webex Connect

Install the package

  • Install the b+s Partner Messaging for Webex Connect package 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 New button
  • Specify the Routing Configuration Name and Developer Name
  • Set the Routing Priority, Routing Model and Capacity Type according to needs
  • Set a value in either Units of Capacity or Percentage of Capacity
  • Save

Create a Queue

  • From Setup, in the Quick Find box, enter Queue
  • Click on New button
  • Specify a Label and Queue Name
  • In Routing Configuration find and set the Routing Configuration record just created
  • Under Supported Objects find Messaging Session and move it to the Selected Objects box
caution

Do not add other objects than Messaging Session in the Selected Objects box

  • Under Queue Members add the required Agents
  • Save

Use Enhanced Conversation chat component in MessagingSession page

  • Open Setup > Object Manager
  • Find and click on Messaging Session object
  • 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 Page as type, provide a Label and select Messaging Session as object, the click on Clone Salesforce Default Page tab.
  • In the Page Editor, remove the Conversation component from the Conversation tab and replace it with the Enhanced Conversation component available from the components list.
  • To prevent showing the customer’s previous messaging sessions to agents in the Conversation component, check the Limit conversation history checkbox in the Enhanced Conversation component 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

info

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 State with the default value Local
  • Under API (Enable OAuth Settings) tab, enable the Enable OAuth checkbox, 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 Flow and confirm the prompt message by pressing the OK button.
    • Click on Createbutton.
  • Click on Policies tab
  • Expand OAuth Policies tab
  • Under OAuth Flows and External Client App Enhancements section, set a Run As user. 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.

Important: Maintain Security by Periodically Rotating Secrets

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 Settings tab, expand the OAuth Settings tab and click on Consumer Key and Secret button. Verify your identity with the Verification Code received by email.
  • Make a note of the Consumer Key and the Consumer Secret for 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:

  1. Create a new Self-Signed Certificate
  2. Create a new CA-Signed Certificate
  3. 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

tip

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 State with the default value Local
  • Under API (Enable OAuth Settings) tab, enable the Enable OAuth checkbox, and configure these settings:
    • Set the callback URL as https://salesforce.com
    • Add the OAuth scopes: Access Interaction API resources (interaction_api) and Perform Requests at any time (refresh_token, offline_access)
    • Enable Enable JWT Bearer Flow checkbox, then click Upload Files and select the certificate previously created or imported in the keystore.
    • Save your changes, then click Continue
  • Click on Policies tab
    • In the OAuth Policies section, set Permitted Users to Admin approved users are pre-authorized. If you see a warning message, click OK
    • The section above App Policies now shows the profile selection boxes.
    • Under Select Profiles, move the profile of the Run As User 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 Process permission set to the box on the right
Important!

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 Code textarea, 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