So I got sick of phone numbers being formatted incorrectly and Zoho not doing anything to standardise phone numbers to meet E.164 formats. So I went and coded my own function to fix this.
And figured I'd share with the community
This is specifically for Australian numbers.
The CF will take all mobile, local landline, 1800 & 1300 numbers and format them into the format we are used to in Australia.
It will also add the country code +61 to the prefix so you can call directly from the CRM.
It works with all 10 digit numbers (0400 000 000 or 03 9000 0000)
And with all 9 digit numbers (400 000 000 or 3 9000 0000)
IE works with both the starting 0 or without the starting 0 (ie 03 9000 1111 or 3 9000 1111)
The numbers will be formatted as below
All mobile numbers 0400111222 --> +61 400 111 222
400111222 --> +61 400 111 222
All local numbers 0390001111 --> +61 3 9000 1111
390001111 --> +61 3 9000 1111
1800 numbers 1800111222 --> +61 1800 111 222
1300 numbers 1300111222 --> +61 1300 111 222
For the local numbers it will work with all states area codes (02, 03, 07, 08)
Anything that isn't the above will be ignored and stay the way it was. IE 131122 will stay like that
As will any numbers that aren't 9 or 10 digits long. (ie +61400111222 wont be formatted with spaces)
**NB I may do a V2 to format numbers that are +61 already but not planning that for a while.
This function is specifically for the Leads module.
It is Phone/Mobile Field agnostic. In that it will take whatever value is in the Phone Field, format it return it to the Phone Field. and what ever is in the Mobile Field, format and return it to Mobile Field.
I did this specifically as we use Phone to be the contacts Primary contact number and Mobile to be their Secondary contact Number.
It should be pretty easy to adapt to Contacts Module or any other module. You only need to change line 1 & 211.
Setting up with Workflow and Triggering the Function:
This applies for CRM
- Go to Setup --> Automation --> Workflow Rules --> Create Rule --> Under Module, select Leads --> Give a Rule name and Description (ie Format Phone Numbers Australia) --> Next
- When = Select "On a Record action" --> "Create or Edit" --> Next
- Condition = In Conditions, choose "All Leads" --> Next.
- Instant Actions --> Function --> New Function --> Write your own --> Add a Function name (ie Format_Phone_Numbers_Au), Display Name (ie Format Phone Numbers Australia), Description --> Create
- Copy paste the code from below and proceed to save the code.
- "Edit the Arguments" --> Key is id, in Param Value type # and choose your fields (ie Leads and Lead Id) the end result should read id = Leads - Lead Id --> Save
- Save the Function
- Save the Workflow.
NOTE: there is probably a better more efficient way of achieving this.
So if anyone know a better way to code the above I'd love to hear.
EDIT: I had to upload the code separately due to restrictions in the post lengths.
EDIT 2: now updated to work with brackets (03) 9000 1111 and hyphens 0400-000-000
EDIT 3: updated to work with the country code already added but no + ie 61400111222
The number formatting will work with the following
All mobile numbers --> +61 400 111 222
- 0400 111 222
- 400111222
- 0400-111-222
- 61400111222
All local numbers --> +61 3 9000 1111
(works with 02, 03, 07, 08)
- 0390001111
- 390001111
- (03) 9000 1111
- (03) 9000-1111
1800 numbers --> +61 1800 111 222
- 1800111222
- 1800 111 222
1300 numbers --> +61 1300 111 222
- 1300111222
- 1300 111 222
EDIT: May 2025
Theres been some requests about cleaning up existing phone numbers for leads/contacts.
To do this there are a few steps to do.
Step 1 - create a new Custom Function called "Format Phone Numbers Au - mass update"
(or what ever you want to name it)
Use the same code as the single run fuction and add a recurring "loop" section to the start of the code, and a small closing at the end.
The way I have it setup is to use the following opening code before Line 1.
Line 6 of the below code replaces Line 1 in the full code.
- string button.Format_Phone_Numbers_Au_mass_update(String leadIDs)
- {
- idList = leadIDs.toList("|||");
- for each rec in idList
- {
- a = zoho.crm.getRecordById("Leads",rec);
Then to close the function replace the final Map (line 208-213) with the following
- }
- mp = Map();
- mp.put("Phone",nph);
- mp.put("Mobile",nmob);
- update = zoho.crm.updateRecord("Leads",rec,mp);
- info mp;
- info update;
- }
- return "Success";
- }
This new function will take your selected list of Leads and then "for each Record in the idList will run the function"
Step 2 - Create a Mass Update Button in the List view of the Leads/Contacts Module
Go to Settings > Customizations > Modules and Fields > [Module Tab} > Leads
Then go the the Buttons tab > Create New Botton
Button Name: Phone Numbers Mass Update
Define action: Function
Select Page: In List
Select Position: Mass Action Menu (preview to see where the botton will be placed)
Configured Function: Select the function you created in the above step
Doing the above will create a new botton in the main list view for the Module.
To use the button you need to select the entries you want to run the function then click the button.
Step 3 - Create a custom View for your Leads/Contacts so that you have less than 1000
Zoho CRM Limits mass update functions to run for max of 1000 entries at a time. So if you have 10,000's leads you need to figure out how to narrow your view down to less than 1000 entries.
One way is to create a View with specific criteria like
Email starts with A - this will show all leads with email address beginning with A
If this is still more than 1000 then figure out how to reduce it further to less than 1000
Step 4 - Select all records
Select the check box of the view at the top of the Column. This will select all records in the current window.
Windows are limted to 100 records, so you need to select all 1000
You will then see a Blue text option to "Select All records in this view". Click this and all records will be selected.
If you have more than 1000 records in the view you wont be able to do the following step so make sure you've limited the view.
Step 5 - click the Mass Update button
Click the Mass Update Button you created above in Step 2. This will run the fuction for all the entries.
It'll take some time and entries will be added to the execution que. If you are interested you can check the api usage to make sure you keep your usage under the daily limit.
Step 6 - Figure out how to vary your list View for the next batch
Rinse and repeat Step 3-5.
Figure out how to change the View so you see the next 1000 batch but exclude the ones you have already done.
Step 7 - Finish
Make sure you remove the Button you created in Step 2, otherwise someone will definitily run it in future when you dont want them to.
Recent Topics
Using Zoho Desk to support ISMS process
Hi, I am evaluating using Zoho Desk for security incident management. This seems to be aligned with Zoho Desk purpose as its just another type of incident. However in security incident management, ideally I can link incidents (tickets) with a risk from
Bin Locations
Dear all, I am wondering if someone has the ability to develop the bin locations option for zoho inventory (integrated with zoho books) Regards, Ryan
TaxJar vs Avalara
Hi, I'm evaluating adoption of a sales-tax service for US based business. Anyone else have experience with TaxJar and Zoho Books? I am a Zoho One subscriber so anticipate needing to use Flow to make this work. It seems like Avalara are simply too expensive
How to check Leads with no Task (open activity)
Hi everyone, I was wondering if there’s a way to view leads that don’t have any tasks assigned or open activities linked to them.
What can we do on our end to improve the Answer bot answers?
Hi, I'm using the Answer bot card in the Codeless bot builder. I've input several questions and their answers in the FAQ section to feed the Answer bot. The text is all in French, as this is the language our customers communicate in. I've tried testing
Zoho Books Sandbox environment
Hello. Is there a free sandbox environment for the developers using Zoho Books API? I am working on the Zoho Books add-on and currently not ready to buy a premium service - maybe later when my add-on will start to bring money. Right now I just need a
Taxes for EU B2B Transactions
Currently, ZC doesn't seem to have a procedure for validating VAT numbers of businesses purchasing in another EU state, and removing local VAT is valid. This is essential for all inter EU B2B trade.
How to upload file to Connect using API?
Hi there. I looked at the API documentation and nowhere did it mention how to use the API method to upload a file even though it is mentioned that it is possible to be done so. Please help.
Items Landed Cost and Profit?
Hello, we recently went live with Zoho Inventory, and I have a question about the Landed Cost feature. The FAQ reads: "Tracking the landed cost helps determine the overall cost incurred in procuring the product. This, in turn, helps you to decide the
How can I setup Zoho MCP with Chat GPT
I can set up custom connections with Chat GPT but I cat an error when I try to set it up. The error is: "This MCP server can't be used by ChatGPT to search information because it doesn't implement our specification: search action not found" Thoughts?
Group Tax in Service Line Items
Hi FSM Team! I noticed that when you update a tax in the service line item the group tax is not showing up as an option. Let me know what can be done thank you!
Zoho Campaigns - Why do contacts have owners?
When searching for contacts in Zoho Campaigns I am sometimes caught out when I don't select the filter option "Inactive users". So it appears that I have some contacts missing, until I realise that I need to select that option. Campaigns Support have
FSM Improvement Idea - Show an Import button when there is no data
I am setting up FSM for a client and I noticed that there is no option to import data, see screenshot below. Even when you click Create Contact there is only an option to Import from Zoho Invoice. It is only after you add at lease 1 record that the Import
Zoho FSM API Delete Record
Hi FSM Team, It would be great if you could delete a record via API. Thank you,
OAUTH_SCOPE_MISMATCH Error for Marketing Automation APIs with CRM Plus Account
I'm trying to integrate Marketing Automation journey triggering via API but getting OAUTH_SCOPE_MISMATCH errors. I need clarification on API access for CRM Plus users.
Access token generate from the refresh token not working for API
Dear Sir/Madam, When I use my refresh token to obtain new access_token, that token return INVALID_TOKEN when the same API is called. I made sure that my api site is correct and match the auth web site. However the original access_token work fine.
Adding a developer for editing the client application with a single user license
Hi, I want to know that I as a developer I developed one application and handed over to the customer who is using the application on a single user license. Now after6 months customer came back to me and needs some changes in the application. Can a customer
Function #4: Schedule Customer Statements
Regularly sending statements to customers is an imperative part of many business processes as it helps foster strong customer relationships and provides timely guidance on payments. While you can generate the statement of accounts and have it sent over
Limiting search or dependencies with an asterisk "*".
I have a form with several dependency fields with options still developing for each field. Since these options were developing and not yet ready to be a selection in the field, I placed a filter for the dropdown field. In this filter, I selected fields
Improved RingCentral Integration
We’d like to request an enhancement to the current RingCentral integration with Zoho. RingCentral now automatically generates call transcripts and AI-based call summaries (AI Notes) for each call, which are extremely helpful for support and sales teams.
Cross Data Center Support for 1:1 Chats with External Users
Hello Zoho Cliq Team, We hope you're doing well. We appreciate the recent enhancement that enables cross data center collaboration in external channels, which has already improved communication across distributed teams. However, we’ve noticed that this
Support Bots and Automations in External Channels
Hello Zoho Cliq Team, How are you? We actively use Zoho Cliq for collaboration, including with our external developers. For this purpose, external channels are a key tool since they work seamlessly within the same interface as all of our other channels
Answer Bot and Personalized Questions
Hi there, I have the same problem using the SalesIQ Answer Bot and the Zoho Desk Answer Bot (which really need different names, to be honest, in order to avoid confusion...) Customers that visit our website ask questions in the form of "What do you do?"
Handling Greetings/Small Talk at the Beginning of a Zobot Conversation
Hello everyone, I’m currently configuring a **Zobot** in Zoho SalesIQ and everything is working as expected, except for one specific scenario at the very beginning of the conversation. My target audience has the habit of starting with a **greeting or
Regex in Zoho Mail custom filters is not supported - but it works!
I recently asked Zoho for help using regex in Zoho Mail custom filters and was told it was NOT supported. This was surprising (and frustrating) as regex in Zoho Mail certainly works, although it does have some quirks* To encourage others, here are 3 regex
Importing a new list into campaigns
I'm in the middle of switching my email platform to campaigns. I have a list that I want to import, and it overlaps with my existing Zoho CRM list. The fields in my Zoho CTM are more robust. Will this new list that I upload into my campaigns overwrite
Client Script Payload Size Bug
var createParams = { "data": [{ "Name": "PS for PR 4050082000024714556", "Price_Request": { "id": "4050082000024714556" }, "Account": { "id": "4050082000021345001" }, "Deal": { "id": "4050082000023972001" }, "Owner": { "id": "4050082000007223004" }, "Approval_Status":
Webform & spam
Hi, We set up 2 webform on our website, fowarding the content to Zoho CRM. Since it has been opened up, we are getting lot of spam message (for now about 20 a day). To lower the amount of false new leads we added the captcha field and new enquieries are send to the Approval Leads list. However we still get some spam. Is there any "anti spam" mechanism built in Zoho CRM, or how is the best way to avoid these kind of spam ? Thanks
when I email a invoice how can i see it was sent and also were i can go to see all emails sent
when I email a invoice how can i see it was sent and also were i can go to see all emails sent?
Export Invoices to XML file
Namaste! ZOHO suite of Apps is awesome and we as Partner, would like to use and implement the app´s from the Financial suite like ZOHO Invoice, but, in Portugal, we can only use certified Invoice Software and for this reason, we need to develop/customize on top of ZOHO Invoice to create an XML file with specific information and after this, go to the government and certified the software. As soon as we have for example, ZOHO CRM integrated with ZOHO Invoice up and running, our business opportunities
Showing description in timesheet and timelogs.
I am wondering if it’s possible in version 5 of Zoho People to have the description show by default or with a manipulation on the user’s part. Let me show you what I mean. As you can see this is the view for the users. Now if they want to see the full
How can I see content of system generated mails from zBooks?
System generated mails for offers or invices appear in the mail tab of the designated customer. How can I view the content? It also doesn't appear in zMail sent folder.
New in Cadences: WhatsApp follow-ups, upgraded limits, and options for add-ons
Hello everyone, We're rolling out two key updates to help you engage better and scale smarter with Cadences in Zoho CRM. Reach customers on WhatsApp, directly from Cadences Previously, Cadences have enabled you to automate follow-ups through emails, calls,
CRM Blueprint Notification by Cliq
Dear Zoho team, In Workflow, there is nofication by cliq, but in blueprint, there is no option as cliq notification. I think it is very convenient to get notified by Cliq , as there are multi modules in apps, but we will always check Cliqs
Zoho People Attendance Regularization – Wrong Total Hours Displayed
While using Zoho People, I observed that the attendance regularization is showing wrong total hours when applied to past dates. For example, if a check-in is added at 10:00 AM and check-out at 6:00 PM for a previous date, the system sometimes calculates
Sync Contacts in iOS
What does the "Sync Contacts" feature in the iOS Zoho Mail app do?
Live webinar: Craft the ideal sales pitch deck with Show
Every great sale starts with a great story. And your pitch deck? That’s where the story takes shape. But too often, these presentations end up looking generic, overloaded with text, or lacking structure. The good news is, it's easier to fix than you think!
Project Statuses
Hi All, We have projects that sometimes may not make it through to completion. As such, they were being marked as "Cancelled". I noticed that these projects still show as "Active" though which seems counter intuitive. In fact, the only way I can get them
👋 Welcome to the Zoho MCP Community
Hello all, glad to have you here! This is your space for everything AI agents, MCP tools, and intelligent business apps. This community is for you — developers, partners, creators, and businesses exploring how agents can transform work. Whether you’re
Suitability of Zoho One (Single User License) for Multi-State GST Compliance & Cost Analysis
Hello Zoho Team, I am an e-commerce business owner selling on platforms like Amazon, Flipkart, and Meesho, and I'm currently using their fulfillment warehouses. I have two GSTIN registrations and am planning to register for an additional 2-3 to expand
Next Page