Skip to contentSkip to navigationSkip to topbar
On this page

Integrate Flex with Salesforce


With out-of-the-box support for Salesforce Open CTI, you can now power your Salesforce environment with omnichannel communications offered by Flex. Both Salesforce Classic and Lightning Experience integrations are supported, allowing you to use Flex directly within your Salesforce instance.

In this guide, you will learn how to configure Flex within Salesforce, configure outbound calling, enable SSO (Single Sign-On), and launch your integration.

Let's get started!

(information)

Info


Solution features

solution-features page anchor

The Flex Salesforce integration embeds the Flex agent user interface directly into the Salesforce application and creates a single source of truth for agents.

flex-salesforce.

As part of the Salesforce integration, the following features are supported within Flex:

  • Native Digital Engagement: supported interaction with customers on various communications APIs, such as Voice, Web Chat, SMS, and WhatsApp
  • Personalization: route any Salesforce Object (case, lead, contact, or other custom object) and blend it with other channels
  • Programmability: tailored look and feel of the application, possibility to code in adjustments
  • Pre-built native features: click-to-dial, screen pop with search capabilities, context switching, activity logging, SSO integration
  • Multiple deployment scenarios: Flex can be embedded inside of Salesforce, or Salesforce can be embedded within Flex

  1. Open your Flex Console(link takes you to an external page).
  2. Go to Admin > Integrations(link takes you to an external page).
  3. On the Salesforce tile, click Configure.
  4. Under Status, toggle the integration plugin on.
  5. Under Configuration, click Edit Configuration, and set up your Salesforce Integration for your organization with the following parameters:
Parameter NameDescription
Workflow SID (Optional)If you want to use a different Workflow than your default Workflow, enter the Workflow SID. If not, leave it empty. If you are not sure what this is, then leave it empty.
Task Channel SID (Optional)If you want to use a different Task Channel than the default Voice Channel, enter the Task Channel SID here. If not, leave it empty. If you are not sure what this is, then leave it empty.
Salesforce Base URL (Required)Register your Salesforce domains on the Flex Settings(link takes you to an external page) page in the Twilio Console. For more details, see Securely iframe Flex in your application.
SSOSelect this option if you want to deploy the Flex-Salesforce Integration using Single Sign-On (SSO).

Always check this option if you are operating in a production environment.

Leave this unchecked if you are planning to test the integration using your Twilio Account or Project login credentials.
LogDecide when you'd like to log a task in Salesforce: when a task starts, is completed, or switched.
  1. Click Apply.

  1. Log in to your Salesforce instance.
  2. From Flex Console(link takes you to an external page), go to Admin > Integrations(link takes you to an external page).
  3. On the Salesforce tile, click Configure.
  4. Under Set up your Salesforce integration, click Download Twilio Flex CTI connector. The Twilio Flex CTI connector page opens in the Salesforce AppExchange.
  5. Click Get It Now to install the Flex CTI connector in your Salesforce instance.
  6. Select your installation preferences and click Install. Once installed, you'll see the managed package show in your Installed Packages page in Salesforce.

Add Flex as a trusted URL

add-flex-as-a-trusted-url page anchor
  1. In Salesforce, go to Setup > Trusted URLs and click New Trusted URL.
  2. Add https://flex.twilio.com as a URL. Check all CSP directives.
  3. From this page, click the Session Settings link and select the following:
    • Under Referrer URL Protection, select Include Referrer-Policy HTTP header.
    • Under Content Security Policy (CSP) Directive Rendering, select Adopt updated CSP directives.
    • Under Browser Feature Permissions, select Include Permissions-Policy HTTP header.

For more details on setup, see Salesforce's Manage Trusted URLs(link takes you to an external page).


Configure Twilio Flex CTI

configure-twilio-flex-cti page anchor
  1. In Salesforce, click the App Launcher and search for Flex CTI.
  2. In Twilio Flex CTI for Salesforce , select a configuration option. If you already have a Twilio and Flex account, enter your AccountSID , which you can find in Console(link takes you to an external page) . Note If you enter an incorrect AccountSID here, you will need to uninstall the package then re-install to configure with the correct AccountSID.
    Setup for Twilio Flex CTI for Salesforce
  3. Click Get Started.
  4. In the Setup Wizard, follow the steps to complete setup. You can choose steps for Lightning or Classic by selecting the tab at the top of the page.

Once setup is complete, Salesforce users in your Contact Center can see the Flex agent UI in your chosen App in Salesforce.

That's it! See our guide on Call Flows to take it for a spin.


  • Copy Download Link feature does not work in Flex Insights when Flex is embedded within Salesforce
  • When making an outbound call, ensure the relevant Salesforce record for the phone number is open before beginning the call. Otherwise, activity logs of the outbound call may not be reflected on the correct Salesforce record.

Third-Party Cookies

third-party-cookies page anchor

Agents must include third-party cookies in their browser in order for Flex to integrate smoothly with Salesforce.

If this is not an option and third-party cookies are disabled, you must configure the Flex to use a popup for login in order to successfully log in to the Flex-Salesforce Integration:

  • From the Flex > Single sign-on page(link takes you to an external page) in Twilio Console, enable the Login using popup option and then click Save.
    When agents access Salesforce, the Flex-Salesforce Integration opens a dedicated popup window to log in through your identity provider. Once agents log in through your identity provider, Flex logs them in.
    Note that this setting means that the Flex login always appears in a separate popup window, not just for the Flex-Salesforce Integration.

Agents must search for the Salesforce record of the relevant phone number before beginning an outbound call. This is to ensure the outbound call will be logged to the correct Salesforce record.


Uninstall Twilio Flex CTI

uninstall-twilio-flex-cti page anchor

To uninstall the package in Salesforce, follow Salesforce's Uninstall a Managed Package(link takes you to an external page).


Now that you've integrated Flex with your Salesforce instance, learn more about customizing your integration and managing interactions with your users:

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.