Skip to main content
Version: 5.13

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 Newbutton
  • 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 Newbutton
  • 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 to agents the customer’s previous messaging sessions 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 Connected Apps

To establish communication between Webex Connect and Salesforce, two Connected Apps are required:

  • Webex Connect Connected 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.
  • Salesforce Interaction Service API Connected App: Used by Salesforce to authenticate calls to the Interaction Service API.

When a request is sent from a Webex Connect Flow:

  • It first uses the Webex Connect Connected App to obtain an access token.
  • The Run As User defined in this Connected App is then used by Salesforce APEX to log in to the Salesforce Interaction Service API Connected App.
  • Finally, the request is forwarded to the Salesforce Interaction Service API.

Create a Connected 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 Connected App, fill in the basic required information (ref)
  • Select the Enable OAuth Settings checkbox, and configure these settings:
    • Set the callback URL as https://salesforce.com
    • Add the OAuth scope: Manage user data via APISs (api)
    • Select Enable Client Credentials Flow and confirm the promt message by pressing the OK button.
    • Save your changes, then click Continue
  • Click on Manage button
  • Click Edit Policies
  • In the Client Credentials Flow 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 Connected App from your Webex Connect Flow, the Consumer Key and Consumer Secret must be configured in your Flow.

  • Open the Connected App previously created in view mode
  • Click Manage Consumer Details, Verify your identity with the Verification Code.
  • Make a note of the Consumer Key and the Consumer Secret for later use.

Create a Connected App to authenticate to the Salesforce Interaction Service API

The Connected 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 Connected 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 Connected 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 Connected App

  • Create a Connected App, fill in the basic required information (ref)
  • Select the Enable OAuth Settings checkbox, and configure these settings:
    • Set the callback URL as https://salesforce.com
    • Select Use digital signatures, then click Choose File and select the certificate previously created or imported in the keystore.
    • Add the OAuth scopes: Access Interaction API resources (interaction_api) and Perform Requests at any time (refresh_token, offline_access)
    • Save your changes, then click Continue

Manage Access to Your Connected App for OAuth

  • Open the Connected App created in the previous step in Manage Mode
  • Click Edit Policies
  • In the OAuth Policies section, set Permitted Users to Admin approved users are pre-authorized. If you see a warning message, click OK
  • Save your changes
  • Under Profiles section, click on Manage Profiles button
  • Select the profile of the Run As User configured in the Connected App for the connection from Webex
  • Save your changes

Grant access to Interaction Service API Connected App to the Automated Process User

  • Open Setup > Permission Sets > New
  • Fill in the mandatory fields, then click Save
  • Make a note of the API Name, it will be needed in the next step
  • Click on Assigned Connected Apps > Edit
  • Move the Interaction Service API Connected App just created from Installed Connected Apps to Enabled Connected Apps (box on the right)
  • Click Save

Run APEX script to assign the 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 = 'INSERT_HERE_PERMISSION_SET_API_NAME'];
User autoProcessUser = [SELECT Id FROM User WHERE alias = 'autoproc'];
PermissionSetAssignment permSetAssignment = new PermissionSetAssignment(
AssigneeId = autoProcessUser.Id,
PermissionSetId = permSet.Id
);
insert permSetAssignment;
  • Make sure to replace INSERT_HERE_PERMISSION_SET_API_NAME with the API Name of the permission set created in the previous step
  • Click Execute
  • If no error are returned, the permission set has been successfully assigned to the Automated Process User