Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Customize your Flex-Salesforce Integration

The setup and configuration described in Create your Flex-Salesforce Integration and Call Flows describe how to get up and running with the default behavior in mind. However, you might want to customize this integration experience and call flows.

Do you still need to set up your Flex-Salesforce Integration? Check out our guide for configuring your Salesforce instance for Flex!

In this guide, we will walk through how to customize the default call flow in your Flex-Salesforce integration by

  1. Creating an IVR (Interactive Voice Response) to collect a case number from our caller
  2. Look up an existing case, or
  3. Create a new case from the caller's input if no existing case is found

To accomplish this, we'll need to do the following:

  1. Create a Studio flow to introduce IVR and collect a Case Number from the caller
  2. Pass The Case Object to Flex-Salesforce integration using a custom task attribute called sfdcSearchString
  3. Re-configure the Salesforce Softphone layout to point to a Case Object

Remember: Flex is a Programmable Application Platform, so you can customize Flex to any extent using the Flex Plugin Model and those changes will be reflected in your Salesforce integration as well. The customizations in this guide refer to the enhancements in both the integration and the call flow itself.

Create a Studio IVR flow

From your Twilio Console, create a Studio flow, or edit an existing studio flow with the following:

  • Add a Studio widget to Gather input on a call to collect user input for a given Case Id (if one exists). Let’s call this widget getInput.
  • On Keypresses, connect this widget to the Send to Flex widget.
  • Pass the {{widgets.getInput.Digits}} to the sfdcSearchString task attribute, making sure that the default type and name attributes exist.
  • The final Studio Flow will look like this:
    Create a studio flow for your Flex IVR.

Configure a Softphone layout for Case objects

The way to tell Salesforce which object should be used for Search and Screen Pop is through the Softphone layout.

We will configure the softphone layout to refer to the Case object instead of the default Contacts object.

For inbound calls:

  • Change the order of objects to move Case to the top:
    Flex-Salesforce: Move Case object to top.
  • Change the Screen Pop settings to point to Case object:
    Change the Screen Pop settings to point to the Case object.

Resulting call flow

Now when the caller keys in a Case ID on being prompted by the IVR, that case ID is used to search for the case and render the relevant ScreenPop.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.