Fixing "Unknown Created from Inbound Twilio Message" issue

Fixing "Unknown Created from Inbound Twilio Message" issue

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


2. Copy the custom view ID from the URL, e.g. from this URL  https://crm.zoho.com/crm/org25224183/tab/Leads/custom-view/803228000000012663/list the custom view ID is 803228000000012663

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.
    • Related Articles

    • Twilio SMS/MMS/Whatsapp extension CHANGELOG

      v470 (unpublished) Bug fixes/Improvements - Stability fixes - Better error messages - Better deliverability stats for bulk campaigns Features: - Auto responders/Chat bots - MMS templates v435 (published 21st September) Bug fixes -  stability fixes ...
    • Create leads/contacts when an inbound message is received from an unknown number

      Learn more about lead or contact creation when receiving a message from an unknown number and know how to enable or disable this option using the Twilio SMS extension settings. 1. Go to Settings, 2. Under the Marketplace click All. 3. ...
    • Smooth Messenger Setting up for Custom Modules

      It's possible to set up the SMS for Zoho CRM by MessageMedia (Smooth Messenger) extension to work with custom modules. Follow the steps below to get it working: 1. Go to Setup > Developer Space > APIs > API Names and find the API name for your custom ...
    • How to use custom fields with the Twilio extension

      1. Go to Setup > Developer Space > APIs and click on API names 2. Click on the module you want to send messages to 3. Search for the field you want to use 4. Copy the API name 5. Go to Setup > Marketplace > Installed 6. Click on Settings under the ...
    • Create tasks for inbound messages

      Learn more about task creation when receiving inbound messages and know how to enable or disable task creation using the Smooth Messenger extension settings. 1. Go to Settings, 2. Under the Marketplace click All. 3. Click Installed. 4. Look for ...