Skip to main content

Salesforce

Overview

This pages describes how to embed CX into Salesforce, as a OpenCTI softphone.

‘Open CTI’ is the Salesforce method/library available to embed a 3rd party telephony provider (such as CX) into Salesforce, and to allow CX and Salesforce to interact. The specific features of the CX integration are:

  • Inbound screenpop (currently voice only):

    • If contact attributes sf_id and sf_object exist on the inbound interaction, then that specific record will be loaded of that specific type
    • If these contact attributes do not exist, then a screenpop/search on CLI will be executed (E164 format)
  • Outbound click to dial:

    • Loads Click to call against Salesforce - all numbers should now be clickable within Salesforce, and must be in E164 format

Pre-Requisites

  1. Admin access to Salesforce Instance
  2. CX Admin Access
  3. AWS Console access, with Connect admin access

Add Approved Domain

Add the Salesforce domain to the Connect instance’s approved domains, per https://docs.aws.amazon.com/connect/latest/adminguide/app-integration.html.

This URL must be HTTPS and will be in the format of your Salesforce domain - e.g. https://instancename.my.salesforce.com or https://instancename-ed.develop.lightning.force.com

Step 1 - Generate Call Centre definition file

To create a ‘Call Center’, you need a definition xml file. This must define mandatory fields, and you can define any number of custom fields. The sample one below has some spurious fields (prefixes etc), which can be ignored at this time. The file also defines the URL of the CX instance - which can be updated after the file is imported.

NOTE - due to URL re-writing of CX softphone the /landing page must be used. otherwise hidden querystrings that Salesforce adds to CX will be lost - and openCTI cannot initialise.

<callCenter>
<section sortOrder="0" name="reqGeneralInfo" label="General Information">
<item sortOrder="0" name="reqInternalName" label="InternalName">NeonSoftphone</item>
<item sortOrder="1" name="reqDisplayName" label="Display Name">Neon Softphone</item>
<item sortOrder="2" name="reqAdapterUrl" label="CTI Adapter URL"><https://yourinstance/landing></item>>
<item sortOrder="3" name="reqUseApi" label="Use CTI API">true</item>
<item sortOrder="4" name="reqSoftphoneHeight" label="Softphone Height">600</item>
<item sortOrder="5" name="reqSoftphoneWidth" label="Softphone Width">350</item>
<item sortOrder="6" name="reqSalesforceCompatibilityMode" label="Salesforce Compatibility Mode">Lightning</item>
</section>
<section sortOrder="1" name="reqDialingOptions" label="Dialing Options">
<item sortOrder="0" name="reqOutsidePrefix" label="Outside Prefix">9</item>
<item sortOrder="1" name="reqLongDistPrefix" label="Long Distance Prefix">1</item>
<item sortOrder="2" name="reqInternationalPrefix" label="International Prefix">01</item>
</section>
</callCenter>

Copy the above into a local xml file.

Step 2 - Under Salesforce Add ‘Call Center’ - goto ‘settings’ and then ‘Call Centers’

Then select to add a call center.

Step 4 - Edit config - once imported, hit ‘Edit’ and update the URL to the desired CX instance workspace URL

note

Note: URL must have a trailing /landing added

Step 5 - associate the Call Centre with your user

Goto ‘users’ under settings, and there is a field ‘call center’ - update this to the Call Center created above - e.g. ‘NeonSoftphone’

Step 6 - Associate an Open CTI Adapter to a lightning app

This step will actually add the ‘Phone’ to the bottom status bar of a lightning app - a ‘Lightning app’ is an app within Salesforce such as ‘Service Console’, or ‘Sales Console’ - which one we uses depends on which lightning apps the customer users. But ‘Service console' is the most common for a contact centre.

Under settings, goto ‘App Manager’, then edit on the drop-down of the app - such as ‘Service Console’

Now navigate to the ‘Utility Items', and select ‘add Utility Item’, select ‘Open CTI Softphone’:

Configure as such - ideally 600 high by 400 wide.

warning

Important - ensure ‘start automatically’ is not ticked. Otherwise multiple tabs of Salesforce will result in CX auto logging in, which will log out agent if on a call.

Step 7 - Validation of Basic Softphone iframe and Browser Access

The chosen Salesforce app can now be navigated to, and the CX softphone should be visible at the bottom of the screen.

Select the Softphone name to display the softphone. Follow login procedure.

You will need to enable microphone access, in Chrome, navigate to chrome://settings/content?search=site+settings and find the Salesforce page - select it & ensure that pop-ups and microphone are enabled.

Enable CX Adapter

To enable screenpop and click to dial, turn the Salesforce integration on in the CX admin portal as follows.

First, find the version of the API within your Salesforce instance. This can be found by (in Lightning Experience:

  1. Navigate to Setup
  2. In the 'Quick Find' search box type, API
  3. Click API under Integrations in the setup options
  4. Click Generate Enterprise WSDL
  5. Click the Generate button.

On the page that opens up, note the version at the top.

Now it's time to enable the adapter:

  1. Login to CX admin portal
  2. Select the Contact Centre you want to manage, then select 'Customise'
  3. Navigate to Integrations then CRMs, and toggle on the Salesforce integration
  4. In the adapter URL, enter the following - https://{salesforcedomain}/support/api/{apiversion}/lightning/opencti_min.js, where {salesforcedomain} is the name of your Salesforce domain, and {apiversion} is the version of the API you noted earlier.

Screenpopping on Inbound Interactions

For inbound interactions, the screenpop will be triggered if the contact attributes sf_id and sf_object exist on the inbound interaction, then that specific record will be loaded of that specific type. If these contact attributes do not exist, then a screenpop/search on CLI will be executed.

Click to Dial

Select any phone number within Salesforce to trigger dialling of those numbers within CX. The number must be in E164 format.

CX Embedded Softphone

The CX softphone can be embedded into Salesforce.