Looking Up Salesforce Contacts
Looking up contact information is central to improving your customer’s experience. In this section, we will discuss how to look up a customer’s contact information as part of an Atmosphere® SmartFlow using the callers’ Phone number.
This tutorial requires a working knowledge of Atmosphere® SmartFlows. For more information on SmartFlows creation and terminology, check out the Atmosphere® SmartFlows Quick Start Guide.
A basic flow which allows you to query user data from Salesforce looks like the following:
Let’s look at how we created this flow.
Add Trigger Type
Select and add the trigger type required by your business flow (in the example above, an Inbound SMS):
Format Your Numbers
Understanding how your data is stored is critical when searching in Salesforce. Phone numbers can be formatted in several ways. Some enterprises choose to have their numbers formatted with country codes (+1 555 555-1212), some include traditional special characters (555) 555-1212 ) and others just store a string of digits (+15555551212).
Phone numbers in SmartFlows are in the following format: +1NNNNNNNNNN. For best results, we need to remove the country code from our incoming phone number. To accomplish this, we will use a combination of the REGEX and Set (Variable) actions to provide us a variable with the desired result.
We configure the REGEX Action with the following settings:
This will provide us three named REGEX groups ($REGEX_2., $REGEX_2.1, $REGEX_2.2).
$REGEX_2. – contains the complete search string
$REGEX_2.1 – contains the country code
$REGEX_2.2 – contains the portion of the phone number required for the search
Next, we store that value in a variable of our choosing to help with readability and identification further in our flow: