Skip to main content
About the Resource Center

Phone number searches with the data action integration

Note: This article applies to the Microsoft Dynamics 365, Salesforce, and Zendesk data actions integrations.

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 365Formats used by integration to search Microsoft Dynamics 365Format that the integration finds in Microsoft Dynamics 365

Raw string format 
(default returned in Architect)

Digit-only format
(converted by the integration)

13175550125tel:+1317555012513175550125Digit-only
+13175550125tel:+1317555012513175550125
(317) 555-0125tel:+1317555012513175550125
1 (317) 555-0125tel:+1317555012513175550125
+1 (317) 555-0125tel:+1317555012513175550125
tel:+13175550125tel:+1317555012513175550125Raw string
Tip: To ensure that the integration finds phone numbers in Microsoft Dynamics 365, confirm that all of your phone numbers in Microsoft Dynamics 365 are in digit-only format (for example, 13175550125).

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 365Formats used by integration to search Microsoft Dynamics 365Format that the integration finds in Microsoft Dynamics 365

Raw string format (passed to integration from Architect)

Digit-only format
(converted by the integration)

1 317 555 01251 317 555 012513175550125Raw string
131755501251 317 555 012513175550125Digit-only
+1 317 555 01251 317 555 012513175550125
+1 317 555 0125+1 317 555 012513175550125Raw string 
(317) 555-0125(317) 555-01253175550125Raw string
+1 (317) 555-0125+1 (317) 555-01253175550125Raw string
Any format*3*1*7*5*5*5*0*1*2*5*3175550125Raw string
Note: Use of the wildcard raw string format (row highlighted in yellow) could result in false positives. For example, phone numbers with the area code 440 could return both US phone numbers with the area code 440 and UK phone numbers.

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) 

Click image to enlarge.

For more information, see Use data actions.

For more information about the integration, see About the Microsoft Dynamics 365 data actions integration.