CRM Integration: Number formats?

Status
Not open for further replies.

rmnnet

Customer
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?
 
  • Like
Reactions: ENG
So, you have a few options depending on what the CRM can do:
1. For CRM supporting SQL-like queries, you can often use some Regex (NetSuite) or generic mapping (Salesforce) to query a raw digits-only value.
2. For CRMs like Odoo, where we have a similar issue, we use a second field with automations, just like your described.

The best way is always to have a CRM that can force a format, but we haven't found one yet other than HubSpot with a recent update.
 
  • Like
Reactions: edossantos
So, you have a few options depending on what the CRM can do:
1. For CRM supporting SQL-like queries, you can often use some Regex (NetSuite) or generic mapping (Salesforce) to query a raw digits-only value.
2. For CRMs like Odoo, where we have a similar issue, we use a second field with automations, just like your described.

The best way is always to have a CRM that can force a format, but we haven't found one yet other than HubSpot with a recent update.
Thanks for the input.

ERPNext technically can have fields that force a specific input without too much trouble. The problem is that the phone_number field comes with ERPNext's CRM module out of the box, and none of the default fields can be modified without a lot of headaches.
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.

Forum statistics

Threads
112,322
Messages
591,882
Members
165,467
Latest member
EMMEPICASA