If you see a lot of new leads/contacts with names like this, it means that you received an inbound SMS from a contact the extension couldn't find in your CRM.
Quite often, there is actually a lead/contact in your CRM but their number contains special characters, e.g. brackets or hyphens. For example, a number formatted like this (123)-456-7901 will not be matched because Twilio will format the number as 1234567901. Note that to tell whether the number contains special characters, you need to be in edit view.
Record view (note appears to have special characters but it actually doesn't if you go into edit view):
Edit view (note no special characters - this phone number is correctly formatted):
By default the extension will automatically reformat numbers for you as soon as you send an SMS. Sometimes this isn't enough and you might want to bulk update all the leads and contacts in your CRM so that they have phone numbers in the correct format.
Steps:
1. Create a custom view with criteria that finds leads with incorrectly formatted phone numbers
3. Create a new standalone custom function using this code. Make sure you replace the custom view ID.
loops = {1,2,3,4,5,6,7,8,9,10,11,12};
// create a custom view with criteria Phone contains ( OR Phone contains -
// copy the custom view ID from the URL
CUSTOM_VIEW_ID = 123214141;
for each loop in loops {
leads_with_phone = zoho.crm.getRecords("Leads", 1, 200, { "cvid": CUSTOM_VIEW_ID });
for each lead in leads_with_phone {
phone = lead.get("Phone");
mobile = lead.get("Mobile");
update_payload = {
"Phone": phone.replaceAll("[^\d+]*", ""),
"Mobile": mobile.replaceAll("[^\d+]*", "")
};
update_resp = zoho.crm.updateRecord("Leads", lead.get("id"), update_payload);
info update_resp;
}
}
4. Run that code: it will update all the phone numbers.