After making a phone call with a VOIP Phone (RingCentral), I like to find the record with that specific phone number in my ATS (Zoho Recruit) or CRM (HubSpot), and add that record (First Name, Last Name, Phone Number(s), Email Address(es)) into a Contact directory in MS Exchange, so it is available for emails and incoming phone calls and will identify the caller when they call back.
The difficulty I have to solve is such:
The phone number returned from VOIP has this format “+1xxxyyyzzzz” for US numbers, all in one string of numbers, with no spaces or separators. Returned by a Zapier trigger from RingCentral.
The phone numbers in the ATS and CRM are human entered and may have formats like “xxx-yyy-zzzz” or “(xxx) yyy-zzzz” or xxxyyyzzzz or any other possible form.
The search function offered in the Zapier connectors from ATS and CRM seems to execute a simple string match search. So unless the phone number is stored exactly as the search string, it won't find the right record. Those functions also don’t return partial matches.
The search functions in the APIs of ATS and CRM may allow for partial matches, but they also return multiple records that match a partial match.
So with and API call I could search for all the records with phone-number containing “zzzz” and then within the list of returned records (which should only be a few), normalize the returned phone numbers, and compare it with the entire search string. That would allow eliminating all the records that are not a match. Also, I will have to look in all the phone number fields, for mobile, business, and home fields. We can stop with the search when we have a first match where we can find the desired parameter values, i.e. First Name, Last Name, and at least one email address.
So the algorithm for this is quite elaborate, requires multiple API calls with returns of data sets of records, and additional work on each record return returned.
- If anyone has done something like this that would be great to see.
Best answer by Troy TessaloneView original