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
UPI QR Code in Invoices
Hi, It would be easier to make payment, if UPI Qr code is generated by Zoho Books and shown in the invoice itself. This will promote digital payments and also makes it easier for customers to pay. It would be even helpful, if QR code contains the invoice
Validation Rule (Date)
Hi There, Can any anyone help me with the validation rule? I'm trying to fire a rule whereby the End Date cannot be before Start Date. Any takers? Manoj Nair
Multi-currency in Zoho CRM Forecast and Reports
As a company we have branches in 4 different countries with as many different currencies. Our Sales Teams would like to work with their local currency as much as possible. The Forecast module using only 1 currency is practically usable only by the sales
Action requested: Retain your sales journey configuration in Path Finder
Dear Customers, We hope you're well! As you might know, we're completely overhauling our journey management suite, CommandCenter, and are in the last leg of it. As a means of getting ready to go live, we will be announcing a series of requests and updates
WebDAV support
I need WebDAV support so that I can upload/download (and modify) documents from my local file system. Is anything planned in his direction?
Zoho Notifications - Received two notifications for one message and none for the other
We had a client reply to a ticket twice in one minute. The ticket owner received two emails for the second message but none for the first (which was crucial content and unfortunately was therefore missed). I'm assuming this created a race condition -
Desk - CRM Integration: SPAM Contacts (Auto Delete)
SPAM contacts is a useful feature, but when the CRM sync is used, it is very frustrating. When a contact is marked as SPAM on Desk, I wish to do the same on CRM. When a SPAM contact is deleted, I would like it deleted from CRM. The feature looks half-baked.
Backorder For Composite Items
Hello If i released SO for composite item and use backorder feature of zoho inventory then it should backorder child item items of composite and not composite item.This is basic of backordering.I conveyed this to zoho call center but no solution yet.
Announcing Kiosk 1.1 - Customize screen titles, configure new fields & actions, use values from your Kiosk to update fields, and more.
Hello all We are back again with more enhancements to Kiosk. So what's new? Enhancements made to the Components Add titles for your Kiosk screens and adjust its width to suit your viewing preferences. Three new fields can be added to your screen: Percentage,
Zoho Inventory Feature Roadmap Visible To All
Hello, please consider making your feature roadmap visible to us users so that we know what to expect in future. This may appease current users who are seeking clarification on feature implementation dates, so that they can make an informed decision whether
Recurring Events Not Appearing in "My Events" and therefore not syncing with Google Apps
We use the Google Sync functionality for our events, and it appears to have been working fine except: I've created a set of recurring events that I noticed were missing from my Google Apps calendar. Upon further research, it appears this is occurring
Drawings in forms
I do a lot of drawings during my consultations and I’d like to add body maps or stencils that I can draw on in different colours and add explanations etc. I need to be able to erase mistakes etc. Ideally in a form that I can prepopulate with client details and a few questions/ client signature and then save as a form. is this currently possible? if not, is it in the pipeline? thanks, Dennis
Multi-Select lookup field has reached its maximum??
Hi there, I want to create a multi-select lookup field in a module but I can't select the model I want the relationship to be with from the list. From the help page on this I see that you can only create a max of 2 relationships per module? Is that true?
Sorry to inform you that currently we cannot access the subform fields through writer deluge (zoho.writer.mergeAndSend).
This is the premium support answer from zoho. It means we cannot merge and send thru deluge related records (sub forms) items... Has anybody suffered from the same ordeal ? DO you have a workaround ? If not can you vote for this feature to be added to
Zoho Inventory Item History
Hi Zoho Inventory Team, I 've been testing the History feature on Inventory Items in a demo system and I noticed that when I changed the value of a field to a new value, the history just says "updated by - user1", it doesn't say what what field was changed
Importing a contact with a linked product
Hi, I'm trying to import my contacts from an excel spreadsheet and each of those contacts have fields that relate to products. Is there a way that I can import the contact with their linked product? Some of the contacts in my spreadsheet have multiple products. When importing contacts and trying to map the fields, it doesn't let me map to any of the product fields. Is there any way around this? Or would I have to import all of the contacts, then import all of the products and manually link each contact
Filter Images in Work Drive
Hi, what is the best way to be able to filter files by multiple descriptions, for example, the name of a person in the photo as well as, an item in the photo and other descriptions? With labels it looks like you can only select one label at once but this
Flow not working when trying to Create a Merged Doc with info from a custom CRM module w/ subform
I am having a problem creating a flow that gets its info from a webhook connected to a button in a custom module in Zoho CRM. I have made a template in Writer that follows: This is a clone of the template in the CRM mail merge which works perfectly if i do it manually through there. My flow gets the custom module entry id through a webhook, then fetches the module entry data, and creates a merge document from that data. I know the webhook and the fetch work because if i replace the "create merge
Smart Scheduling via Agent Confirmation
We’re excited to introduce a smarter and more streamlined way to manage dispatched service appointments in Zoho FSM! Feature Highlights Field agents can now approve or reject service appointments assigned to them—helping reduce unnecessary workload and
How to delete Inactive users?
We want to delete inactive users from our system, but went you deactivate still the names are shown at the inactive section. How to get really rid off these names? Thanks for your response! Fabian van den Barselaar
Can i integrate bigin with google voice?
I make all my calling through google voice to seprate my personal line from business. I want to log my calls with customers automatically but i domt see anywhere where i can do that. Any help? Im pretty sure i wont be able to. Sad
Custom Field for Customer ID in Zoho Commerce's Customer Section
Hi everyone, I’m wondering if it’s possible to add a custom field in the "Customer" section of Zoho Commerce. Specifically, I need to include a "NIF" or "Customer ID" field, as it's mandatory for invoicing in Spain. I know this can be done in Zoho Inventory,
Enable History Tracking for Picklist Values Not Available
When I create a custom picklist field in Deals, the "Enable History Tracking for Picklist Values" option is not available in the Edit Properties area of the picklist. When I create a picklist in any other Module, that option is available. Is there a specific reason why this isn't available for fields in the Deals Module?
How do I modify the the incoming/current call popup? I can modify other call pages but not that one.
I want to modify the incoming and active call popup on the crm to include customer relevant information, such as purchase history or length of relationship. Under modules and fields, I don't seem to see active call as a choice to modify, only the main
Are downloadable product available in Zoho Commerce
Hi all. We're considering switching to Zoho Commerce for our shop, but we sell software and remote services. Is there a features for downloadable products? I can't find any information about this. Thank you very much Alice
Introducing Zoho CRM for Everyone: A reimagined UI, next-gen Ask Zia, timeline view, and more
Hello Everyone, Your customers may not directly observe your processes or tools, but they can perceive the gaps, missed hand-offs, and frustration that negatively impact their experience. While it is possible to achieve a great customer experience by
Sales IQ needs to capture both first and last names
Sales IQ chat only has one field for name. When this then syncs with Campaigns, the field populates the "last name" field in Campaigns. However most people fill in the "name" field of Sales IQ with either their full name or their Christian name. This
API Self Client Authtoken conversion always returns "invalid_client".
I am having a problem when trying to convert an Authtoken to OAuth for a Self Client script. I have made sure that the client Id, secret, and organisation are correct, and the domain is definitely ".com"/ This is the python code I am using to create
average cost display
Hello there, I'm using the average cost valuation method, and the cost price shown in the Items menu should reflect the latest WAC (Weighted Average Cost). However, it doesn't update automatically. Is there a way to display the current average cost without
Invitation-Based User Access in Zoho Analytics
Hello everyone, We’re rolling out an important update on how users are added to your Zoho Analytics Organization and Workspaces. Previously, when admins added users, they were automatically added to the organization. Moving forward, to improve security
Cliq iOS can't see shared screen
Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
How to handle this process need using a Blueprint?
See one minute screen recording: https://workdrive.zohoexternal.com/external/eb743d2f4cde414c715224fc557aaefeb84f12268f7f3859a7de821bcc4fbe15
Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM
Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
Automation#24: Auto-Update custom field from Accounts to Tickets
Hello Everyone! Welcome back to the Community Learning Series! This episode dives into how Zylker Techfix streamlines account-related ticket references. Previously, employees had to manually check account details to retrieve specific customer information,
[Webinar] Live demos and user Q&A with Zoho Writer product experts
Join us on June 12, 2025 for live demos based on your use cases and real-world scenarios raised via form. This is also an opportunity to get your questions answered directly by product experts from the Zoho Writer team. Webinar agenda Live demos based
Schedule mass emails, view mass emails status and more!
Hello everyone, Mass emails help you communicate with multiple customers in a couple of clicks. We have introduced a Mass Emails dashboard in Bigin so that users can see the status of the mass emails like how many emails were opened, clicked and bounced.
CRM Custom function updating a module record shows the Super Admin user as the record modifier
Dear Zoho CRM Team, Is there any way to update this so that when a custom function has updated a record the Super Admin user doesn't become the modifier? This happens on the record as a modifier and shows up in the audit logs. It would be more useful
Support Mixed Visibility Settings in Knowledge Base Categories
Hello Zoho Desk Team, We hope you're all doing well. We’d like to submit a feature request regarding visibility settings in the Knowledge Base module. 🎯 Current Limitation As of today, when a category is set to a specific visibility level (e.g., Public),
Multiple Selection/Select All for Approvals
I have a suggestion from users regarding Approvals. In our environment, our Regional Managers can receive multiple requests for Approval or Rejection. They find it tedious to approve (or reject) each individual record. They would like to have a way to
Nimble enhancements to WhatsApp for Business integration in Zoho CRM: Enjoy context and clarity in business messaging
Dear Customers, We hope you're well! WhatsApp for business is a renowned business messaging platform that takes your business closer to your customers; it gives your business the power of personalized outreach. Using the WhatsApp for Business integration
Next Page