Upgrade Guide for Flex-Salesforce
If you have been using our Flex-Salesforce Integration, you might remember deploying Functions to your Account. The Functions-based click-to-dial implementation can now be moved to a Native Outbound Dialing implementation. This provides the following benefits:
- Take advantage of the increased stability and scale of the Flex platform
- Gain access to additional features as they are rolled out for Outbound Dialing
Info
If you are configuring the SFDC plugin for the first time, then you will get the native implementation by default. You will not see the option to perform a migration, and you just need to ensure that the following prerequisites are satisfied.
- Flex UI needs to run on version >= 1.18.0
- Enable Native Outbound Dialing on your Account
Enable and configure the Flex Dialpad via the Twilio console.

Navigate to the Salesforce Integration in the Flex Admin:
- A 'Migrate' button will be visible within the Salesforce configuration page.
- Click 'Migrate'. This will update the integration to rely on the Flex Dialpad.
- After completing the migration, you will be unable to revert to the Functions-based approach.

After completing the migration, we recommend taking the following steps to clean up your environment:
- The Twilio Functions related to the Salesforce integration are no longer needed and can be removed
- The TaskRouter Workflow filter for function-based click-to-dial is no longer needed. We recommend removing that filter.
- The outbound caller ID and voice recording option will no longer be configured within Flex Admin. You'll use the Twilio Console instead.
Info
You are using the beta integration if you downloaded and deployed
plugin-flex-salesforce-integration
to your Flex Application yourself.
Upgrading from the beta release requires the following steps:
- Make a note of entries in your
sfdcConfig.js
file - you will need these values when configuring the GA version of your Flex-Salesforce Integration - Navigate to Runtime>Assets in your Twilio Console to delete the plugin (i.e. Beta version).
- Delete the Functions created in the above steps by navigating to Runtime>Functions.
- Follow the steps described in the Setup.
Navigate to the Flex-Salesforce integration template in the Twilio console and click Create.
Close the window once the functions are created and visible in Runtime>Functions.
To ensure that we only route calls to workers that click on phone numbers in Click-to-Dial scenarios, we need to create a routing rule.
Navigate to your TaskRouter Workspace and select the Workflow you will use for outbound calls. Then, add a filter as shown in the following screenshot:

If you deployed an older version of the Flex-Salesforce integration, you will need the following assets to repeat the setup process:
Asset Type | Asset Source(s) |
---|---|
Flex-Salesforce Integration | plugin-flex-salesforce-integration-0.3.0.js plugin-flex-salesforce-integration-0.3.0.js.map |
Call Center Definition File (Twilio-Hosted Flex) | callCentreDefinition_HostedFlex.xml |
Call Center Definition File (Self-Hosted Flex) | callCentreDefinition_selfHost.xml |
Outbound Caller ID | Phone Number |
Flex-Salesforce Integration Configuration | sfdcConfig.js |
Note: Instead of downloading the preceding assets, you can also directly point your implementation to the Asset Source paths mentioned.
By default, pointing your implementation to the source paths will sign you up for automatic updates - if you do not wish to subscribe to automatic updates, it's best to download the assets instead.
If any of the following applies to you, you will need to modify the Flex-Salesforce Integration Configuration file (sfdcConfig.js
):
- You want to set up outbound dialing
- You want to use a global caller ID for agents who do not have a specified caller ID
- You have your own custom workflow that you'd like to use
- You have an existing customer channel that handles outbound voice calls
Your sfdcConfig.js
file should look something like this:
1/*in Beta/GA, this will move to CRM configuration screens */2var sfdcConfig = {};34sfdcConfig.globalParams = {5outboundWorkflowSid: "", //leave it empty,if using default Workflow6outboundTaskChannel: "", //leave it empty,if using default Voice Channel7SFDCBaseUrl: "https://someDomain-dev-ed--c.eu16.visual.force.com", // Your SFDC Org8};910sfdcConfig.agentParams = [];1112// default Global Caller Id for outbound calls, when not specific caller Id has been13//defined for an agent in the worker attribute viz. callerId or below agentParams14window.sfdcConfig.defaultAgentParam = {15outboundCallerId: "+447777777777",16};1718// these are caller ids for various agents19//- you can use this setting here if not defining in worker attribute20sfdcConfig.agentParams["user1"] = {21outboundCallerId: "+44777777777",22};2324sfdcConfig.agentParams["user2"] = {25outboundCallerId: "+44777777771",26};
Populate the relevant information in this file depending on your needs.