Dynamics 365 Phone Number Formatting

Status
Not open for further replies.

aschildmeyerSTR

Premier Customer
Joined
Jan 28, 2021
Messages
93
Reaction score
45
Hello 3CX community,

I'm currently in a PoC of 3CX and am working on the Microsoft Dynamics 365 integration. I seem to have hit the same issue as this post Formatting [Number] variable | 3CX Forums which I can see in the logs. My issue is Dynamics CRM when a new contact is created by an individual within the dynamics 365 interface, it wants to default phone number fields to E164 compliant numbers with dashes as well for the US. I've tried to make the format of the field be something like +1(000)00000000 but it doesn't seem to honor my field rules in Dynamics CRM to force that on my end users. So currently all new contacts are being created as +1(000) 000-0000

Anyways, I was wondering if 3cx when it passes the [number] field if that forum post still holds true where you cannot send in dashes. If I can't does anyone know a good way to modify existing data for 10,000 contacts to update the phone numbers to have the dashes removed? I found I can create a new form and update phone numbers as a user with my custom form type that then reflect back to the main form used by contacts. But that won't be sustainable for mass modification.

Thanks for the help.
 
The number sent is digits only, possibly with the + if you enabled "Match Exactly" and the provider sends as E164.
 
The number sent is digits only, possibly with the + if you enabled "Match Exactly" and the provider sends as E164.
Thanks Fredrick. That seemed like it would work to me but sadly it doesn't. When "Match Exactly" is selected it just passes the number in like +1000000000 so it fails to make the match. It's not a fan of parentheses or dashes so I left it to be a lookup of 6.

Based on the the link I posted a 3cx staff member said its not possible and the poster needed to change the data in Dynamics. Since that link was April of 2020 and since dynamics defaults its end user entry for phone fields in the US for its contact form with parenthesis and dashes and spaces it seems advantageous of 3cx to potentially update the config if possible. I just don't know if the limitation is the Microsoft API or how 3CX delivers the data.
 
The problem here seems to be that you're storing numbers in Dynamics with dashes, spaces, and other characters, and 3CX will compare only the numbers. So in order to get a match, you need to store the numbers without special characters in Dynamics. You can create a program to modify all your records programmatically, connecting to their REST API, getting your contacts one by one, and storing them back with the number updated, removing any character that is not a number.

This is the API we use from the template, maybe you can create a program to use it and make these changes:
https://docs.microsoft.com/en-us/rest/dynamics365/
 
  • Like
Reactions: aschildmeyerSTR
The problem here seems to be that you're storing numbers in Dynamics with dashes, spaces, and other characters, and 3CX will compare only the numbers. So in order to get a match, you need to store the numbers without special characters in Dynamics. You can create a program to modify all your records programmatically, connecting to their REST API, getting your contacts one by one, and storing them back with the number updated, removing any character that is not a number.

This is the API we use from the template, maybe you can create a program to use it and make these changes:
https://docs.microsoft.com/en-us/rest/dynamics365/
Awesome. Thanks Edossantos. I'll continue down looking at that path to see if there is a good way to create a service to modify what I have and continue to modify any input that has dashes.
 
  • Like
Reactions: edossantos
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,324
Messages
591,897
Members
165,475
Latest member
lastshadow