Phone number searches with the data action integration
This content discusses how Microsoft Dynamics 365 formats and stores phone numbers, how phone numbers are formatted in Architect, and how the integration searches Microsoft Dynamics 365 for phone numbers.
Microsoft Dynamics 365 can store numbers in any format, with or without non-numerical digits (for example, as +13175550125, +1 (317) 555-0125, or 13175550125).
Architect formats the phone number (ANI) that is passed into the PHONE_NUMBER box as tel:+{digit-only string}, for example, as tel: +13175550125.
The integration removes non-numerical characters from the tel: formatted phone number in Architect to create a digit-only format. The integration then searches Business Phone, Home Phone, and Home Phone in Microsoft Dynamics 365 for the following formats:
- The tel: format (tel: +13175550125).
- The digit-only format (13175550125).
If the phone number does not exist in Microsoft Dynamics 365 in either format, then the integration does not find a match and is unable to return data based on the ANI.
Phone number formats for matches (default behavior)
This table shows that the integration only finds phone numbers in Microsoft Dynamics 365 that are in digit-only format. (See row highlighted in yellow.) The integration does not locate records by ANI based on other phone number formats in Microsoft Dynamics 365.
Format of phone number in Microsoft Dynamics 365 | Formats used by integration to search Microsoft Dynamics 365 | Format that the integration finds in Microsoft Dynamics 365 | |
---|---|---|---|
Raw string format |
Digit-only format |
||
13175550125 | tel:+13175550125 | 13175550125 | Digit-only |
+13175550125 | tel:+13175550125 | 13175550125 | — |
(317) 555-0125 | tel:+13175550125 | 13175550125 | — |
1 (317) 555-0125 | tel:+13175550125 | 13175550125 | — |
+1 (317) 555-0125 | tel:+13175550125 | 13175550125 | — |
tel:+13175550125 | tel:+13175550125 | 13175550125 | Raw string |
Phone number formats for matches (value conversion in Architect)
Instead of standardizing your phone numbers in Microsoft Dynamics 365, you can manipulate the value of the string returned for Call.Ani in the Architect call flow. This table shows which value conversions (raw string format) in Architect lead to the integration finding a match in Microsoft Dynamics 365. (Values that lead to successful matches are in bold.)
Format of phone number in Microsoft Dynamics 365 | Formats used by integration to search Microsoft Dynamics 365 | Format that the integration finds in Microsoft Dynamics 365 | |
---|---|---|---|
Raw string format (passed to integration from Architect) |
Digit-only format |
||
1 317 555 0125 | 1 317 555 0125 | 13175550125 | Raw string |
13175550125 | 1 317 555 0125 | 13175550125 | Digit-only |
+1 317 555 0125 | 1 317 555 0125 | 13175550125 | — |
+1 317 555 0125 | +1 317 555 0125 | 13175550125 | Raw string |
(317) 555-0125 | (317) 555-0125 | 3175550125 | Raw string |
+1 (317) 555-0125 | +1 (317) 555-0125 | 3175550125 | Raw string |
Any format | *3*1*7*5*5*5*0*1*2*5* | 3175550125 | Raw string |
Example value conversion
In this example call flow, the Call Data Action converts the default phone number format returned by Architect (tel:+13175550125) into the phone number format used in a particular Microsoft Dynamics 365 organization (+1 (317) 555-0125). The value used in the PHONE_NUMBER box is the following expression:
"+1 ("+ Substring(Call.Ani, 6,3) + ") " + Substring(Call.Ani, 9,3) + "-" + Substring(Call.Ani, 12,4)
For more information, see Use data actions.
For more information about the integration, see About the Microsoft Dynamics 365 data actions integration.
This content discusses how Salesforce formats and stores phone numbers and how the integration searches Salesforce for phone numbers.
Data actions associated with the Salesforce data actions integration can retrieve information using phone numbers.
The use of call.Ani is a common way to retrieve phone numbers automatically for use in data actions. call.Ani is a system-level variable used throughout Genesys Cloud that presents phone numbers in an E.164 format, such as +13175550123.
If call.Ani does not return the information that you want, then use a variable that looks up information in Salesforce based on how your data is formatted in Salesforce. You can test that your search format matches the format of your Salesforce data by searching in Salesforce and verifying that the returned results are what you expect.
Review how Salesforce formats and stores phone numbers and how the data actions integration searches for phone numbers in Salesforce.
Phone number format and storage in Salesforce
Depending on the format of an 11-digit phone number input in Salesforce, Salesforce formats and stores the phone number differently.
- If the 11-digit number starts with a leading 1, Salesforce removes the leading 1 and stores the phone number as a 10-digit number.
Number input Number stored in Salesforce 12135551234 2135551234 In this case, if you search Salesforce directly for 12135551234, Salesforce returns no results.
- However, if the 11-digit number with a leading 1 is preceded by +, Salesforce retains all the 11 digits along with the +.
Number input Number stored in Salesforce +12135551234 +12135551234 In this case, if you search Salesforce directly for 12135551234, Salesforce returns results.
Phone number search by the integration
The Salesforce data actions integration searches Salesforce for the exact number in the PHONE_NUMBER box in Architect. The format of the number is irrelevant. The integration can find the number in any format in Salesforce.
However, if numbers in Salesforce include a country code, issues can arise. The number in Salesforce and in the PHONE_NUMBER box in Architect must be identical both in number and format. Otherwise, the integration cannot find the number in Salesforce.
For more information, see Use data actions.
For more information about the integration, see About the Salesforce data actions integration.
This content discusses how Zendesk formats and stores phone numbers for the Zendesk data actions integration.
Zendesk allows any characters to be input as phone numbers, with or without formatting.
The Zendesk search API requires that all digits in the phone field match the search value. For example, if you store a phone number in Zendesk as 13175550100, but search for 3175550100, Zendesk does not return a match. To ensure that Zendesk returns a match, search for all possible formats for a phone number. For example, search for 13175550100, 3175550100, and 5550100.
For more information, see Use data actions.
For more information about the integration, see About the Zendesk data actions integration.