OverviewLooking 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. The Overall Flow This tutorial requires a working knowledge of Atmosphere SmartFlows. For more information on SmartFlows creation and terminology, please visit our quick start guide: https://www.intelepeer.com/products/documentation/smartflows-quick-start/ 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 your Trigger typeSelect and add the trigger type required by your business flow:
Format Your NumbersUnderstanding 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 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.\0, $REGEX_2.\1, $REGEX_2.\2). $REGEX_2.\0 – 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: