Skip to main content

Zoho CRM Custom Function For Lead Phone Num Country Code Updation

Recently Zoho CRM Community had a blogpost on how to add country code to Leads along with a script to do the same. But the script seemed to leave a lot to be desired.
Here is a screenshot of their 10-line script:



These are the missing things we noticed with the above script:
1. First, there needs to be validation of whether the incoming phone number is empty or not. In the above script, even if the phone number is empty, '+91' will be added to the phone number. So, this means, in such records, phone number field will have only the value '+91'.
2. It would have been good to make it more generalized than hardcoding a specific country code into the script. Because this script is going to be applied to Leads, it is possible that the Leads may be coming in from various countries, given today's global nature of businesses. So having the script address just one country code is not going to satisfy today's growing business needs.
3. There is no checking in the script to see if the phone/mobile field already has country code in it. Suppose the phone number was already having country code, for example '+91 7788990000', then this script will give the result '+91+91 7788990000', because it doesn't do any checking if the existing phone number already has country code value prefixed with it.

Addressing the above issues, we have attempted our best to write a script which is more generalized, detailed and addresses several corner use cases. You can find it in Github here.



This Custom Function is for the Leads module in Zoho CRM. This code is in Deluge scripting language, which the language used across Zoho suite of products.  This is used to check an incoming lead to see if their phone num has the country dialing code. If not, then this code would fetch the appropriate code based on the'Country' field value from the Lead. 

Comments

Post a Comment

Popular posts from this blog

What is a CRM software - Part 3 - Lead Followup Workflow

Getting in Leads into the system is only half the story. Now, for the better half - following up with leads. The key to following up with Leads is to maximize conversion, as we know. It’s an ongoing challenge. Market situation may change. Competition landscape will undergo its own changes. So it’s not just enough to have a lead workflow, but it is crucial to measure its ongoing success rate as you keep using the workflow. Let’s talk about this in more detail. 
 Things to Remember Bucket-Based Followup So now we have categorized Leads into buckets, based on strategies we discussed in the previous post. It might be useful to come up with a different workflow for different buckets. Someone might have a 90% chance to convert to a customer, whereas someone else may have only a 20% chance. You may want to treat these leads differently when following them up, so that you allocate your salesperson to do more followups with those leads who have higher probability of conversion.  
 Modes of ...

What is a CRM software?

When you start a business and are few months into it, you find that many other business owners are using something they call a CRM software to manage their business. So you are compelled to think you also somehow should follow the herd effect and start using a CRM as the first step. Why do I call it a 'herd effect'? We will come to that in a separate post. Right now, let's say you decided you want to use a CRM. You sign up for one of the popular CRM software in the market like Zoho CRM, Salesforce, Microsoft Dynamics, and start entering data. I see that business owners put in a lot of effort to do a detailed comparison of the various CRM software in the market. But they don't put as much effort to find out how to use the software they finally choose. Actually the effort should be in reverse. To be frank, in today's competitive software landscape, almost every CRM in the market is equal, at least the top players. They necessarily have to keep upgrading their features...