- Joined
- Feb 12, 2021
- Messages
- 13
- Reaction score
- 4
I have the CRM integration working with ERPNext using a custom template.
The problem I'm running into is how to manage different number formats. The CRM will allow input of a phone number in basically any format, to include with hyphens and dashes, and it will accept 7, 10 or 11-digit numbers.
So, in cases where the number 3CX searches for isn't formatted in the same way as how it's stored in the CRM, it won't find the CRM record. For instance, if the number is stored in the CRM as +13335551234, and the user dials 3335551234, it won't find the record.
What's the best way to handle this? The best I can come up with is to create a few hidden fields in the CRM for the different number formats, and then have a script take the number that the user entered and convert it to the various formats.
For instance, if a user inputs a phone number as (333)-555-1234, the CRM will insert 3335551234 into the "10_digit_phone" field, and +13335551234 into the "11_digit_phone_field"? Then 3CX will only query against the "10_digit_phone" field.
Has anybody else had to sort out something like this?
The problem I'm running into is how to manage different number formats. The CRM will allow input of a phone number in basically any format, to include with hyphens and dashes, and it will accept 7, 10 or 11-digit numbers.
So, in cases where the number 3CX searches for isn't formatted in the same way as how it's stored in the CRM, it won't find the CRM record. For instance, if the number is stored in the CRM as +13335551234, and the user dials 3335551234, it won't find the record.
What's the best way to handle this? The best I can come up with is to create a few hidden fields in the CRM for the different number formats, and then have a script take the number that the user entered and convert it to the various formats.
For instance, if a user inputs a phone number as (333)-555-1234, the CRM will insert 3335551234 into the "10_digit_phone" field, and +13335551234 into the "11_digit_phone_field"? Then 3CX will only query against the "10_digit_phone" field.
Has anybody else had to sort out something like this?