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
Add Direct Ticket Link to Zoho Help Center Portal in Email Replies
Hi Zoho Support Team, We hope you're doing well. We’d like to request a small but valuable improvement to enhance the usability of the Zoho Help Center portal (https://help.zoho.com/portal/en/myarea). Currently, when someone from Zoho replies to a support
[Webinar] Deluge Learning Series - AI-Powered Automation using Zoho Deluge and Gemini
We’re excited to invite you to an exclusive 1-hour webinar where we’ll demonstrate how to bring the power of Google’s Gemini AI into your Zoho ecosystem using Deluge scripting. Whether you're looking to automate data extraction from PDFs or dynamically
Connecting Zoho Inventory to ShipStation
we are looking for someone to help connect via API shipStation with Zoho inventory. Any ideas? Thanks. Uri
Subform edits don't appear in parent record timeline?
Is it possible to have subform edits (like add row/delete row) appear in the Timeline for parent records? A user can edit a record, only edit the subform, and it doesn't appear in the timeline. Is there a workaround or way that we can show when a user
New in Cadences: Option to Resume or Restart follow-ups when re-enrolling records into a Cadence, and specify custom un-enrollment criteria
Managing follow-ups effectively involves understanding the appropriate timing for reaching out, as well as knowing when to take a break and resume later, or deciding if it's necessary to start the follow-up process anew. With two significant enhancements
Im Stuck in an EDIT ONLY WITH WIZARD issue
So I found Wizards to be a really helpful tool in minimizing the exposure of redundant, superfluous fields to staff that would never otherwise have to edit those fields. My issue is, that when the record (in this case a lead) is created with a wizard,
Account upgrade
Good evening, I upgraded my account and paid for it. From standard to professional. Unfortunately after the paiment my account was not upgraded. Please your advise. Best Regards Erik van Staverden
How to set ALL default dates of my organization to DD-MM-YYYY format?
All replies to this question comes from a time where the UI was different. It's extremely frustrating not being able to find how to do this simple setting change. I want everything and everyone in my organizations to have DD-MM-YYYY date format by default.
How can I sync from Zoho Projects into an existing Zoho Sprints project?
Hi I have managed to integrate Zoho Projects with Zoho Sprints and I can see that the integration works as a project was created in Zoho Sprints. But, what I would like to do is to sync into an existing Zoho Sprints project. Is there a way to make that
Meet Canvas' Grid component: Your easiest way to build responsive record templates
Visual design can be exciting—until you're knee-deep in the details. Whether it's aligning text boxes to prevent overlaps, fixing negative space, or simply making sure the right data stands out, just ironing out inconsistencies takes a lot of moving parts.
Zoho Subform Workflows onAdd of Row
Suppose I have a form with attached workflows onLoad. If I use the form as a subform, will it inherit the workflows or do I need to create new ones onAdd of row?
Super Admin removal
I brought a sub, and I gave the Super admin rights to a person who is no longer with us, so I need to change, and I need to make myself the Super admin
Employees in Leave Policy exceptions
In the Leave Policies we should be able to add specific employees to the exception list So it will be like All Employees except A,B,C in the exception list, currently we can only add departments etc
Better Notes Commenting
Hi, I'd like to suggest better collaboration tools for NOTES. The current notes section for Accounts, Contacts and Deals is not ideally suitable for any degree of communication or collaboration. When responding to a note, there is no ability to leave
Formula field with IF statement based on picklist field and string output to copy/paste in multi-line field via function
Hello there, I am working on a formula field based on a 3-item picklist field (i.e. *empty value*, 'Progress payment', 'Letter of credit'). Depending on the picked item, the formula field shall give a specific multi-line string (say 'XXX' in case of 'Progress
Messages not displayed from personal LinkedIn profile
Hello. I connected both our company profile and my personal profile to Zoho social. I do see all messages from our company page but none from my private page. not even the profile is being added on top to to switch between company or private profile,
Exporting Templates
I have just spent 2 hours creating a project template for a Netsuite configuration, and want to share it with other Zoho Projects users - who have a different account. Is there any way to do this?
Power of Automation:: Streamline Associated Teams based on the Task Owner update.
Hello Everyone, A Custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:
No Response from Zoho Support in 8 Days - Typical?
I have a couple of issues I'm trying to work through. Initially, I was getting support from support@zohofsm.com, but I have not received a response in 8 days (11 on another question). Is this typical? Can I pay for support? For context, I am not spamming
Add QUOTE OWNER profile image to a Quote Template
I can add their email address.. phone number, DOB. I need to add a users profile picture so when they assign a template to a quote they own it adds their picture to the cover page. I've tried hacking a solution together but there has to be an easier way.
Email Integration - Zoho CRM - OAuth and IMAP
Hello, We are attempting to integrate our Microsoft 365 email with Zoho CRM. We are using the documentation at Email Configuration for IMAP and POP3 (zoho.com) We use Microsoft 365 and per their recommendations (and requirements) for secure email we have
Elevate your CX delivery using CommandCenter 2.0: Simplified builder; seamless orchestration
Most businesses want to create memorable customer experiences—but they often find it hard to keep them smooth, especially as they grow. To achieve a state of flow across their processes, teams often stitch together a series of automations using Workflow
Zoho Connections Desk API relative URL PATTERN_NOT_MATCHED
While i am trying to do this: async function fetchTicketsFromDesk(timeFilter = 'current_month') { try { const response = await ZOHO.CRM.CONNECTION.invoke("desk_connection", { url: "/api/v1/tickets", method: "GET", }); const data = response.details ? JSON.parse(response.details)
Zoho CRM - Custom Views for Portal Users
I'm looking for an option to customise custom views for portal users in CRM. It would be great if "portal user" was a permission on custom views.
【参加無料】10/17(金) 東京 ユーザ交流会 Vol.3 参加登録 受付開始!
ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 10/17(金)に、東京・新橋で「東京 ユーザー交流会 Vol.3」を開催します! 今回のユーザー事例セッションのテーマは、「Zoho Flowを活用した他社の決済サービスとの連携事例」です。 さらに、Zoho Flowに限らず、Analytics や Campaigns などの多彩なZohoサービスの活用方法について、豊富なご経験をもとにご紹介いただきます。 また、Zoho社員セッションでは、Zoho CRMを活用して日々の営業業務を効率化する具体的な事例をお話しします。業界を問わず、幅広い方にご参考いただける内容となっています!
Zoho Meeting Plug compatibility with newer versions of Outlook
Documentation states that the zoho meeting plug in for outlook is only compatible with versions up to Outlook 2019 What is available to users of more up to date versions of outlook/office 365?
Getting Attachments in Zoho Desk via API
Is there a way to get attachments into Zoho Desk via an API? We have a process by which a zoho survey gets sent to the user as a link in a notification. The survey has several upload fields where they can upload pdf documents. I've created
Introducing Zoho's own SMS gateway
We're thrilled to announce the launch of our own SMS gateway feature within Zoho Marketing Automation! This new feature enables seamless SMS campaign management alongside your email marketing initiatives, providing a more integrated and efficient way
Embedding in Desk articles
We would like to embed documents in our Desk articles. When we use an iframe for the embed, we get scrollbars and a frame border. Neither of those is acceptable. I've spoken with the Desk Support team about what we want and they tell me that it cannot
Zoho Desk KB article embedded on another site.
We embed KB articles from Zoho Desk on another site (our application). When opening the article in a new tab, there is no issue, but if we choose lightbox, we are getting an error "To protect your security, help.ourdomain.com will not allow Firefox to
Zoho CRM button to download images from image upload field
Hello, I am trying to create a button in Zoho CRM that I can place in my record details view for each record and use it to download all images in the image upload fields. I tried deluge, client scripts and even with a widget, but feel lost, could not
Mass Update Contacts In Zoho Campaigns
Is there a way to mass update contacts in zoho campaigns? I want to be able to change the content of a field for a few hundred contacts, and can't go through all of them individually.
report showing assignment type
Hi, We've created a number of workflows to allow us to auto assign tickets to agents based on keywords and other criteria. I'm struggling to create a report that would show me what is the percentage of tickets that are assigned automatically via workflows
Option to Disable Knowledge Base Section in Feedback Widget Popup Hello Zoho Desk Team
Hello Zoho Desk Team, How are you? We are actively using Zoho Desk and would like to make more use of the Feedback Widget. One of the ways we implement it is through the popup option. At the moment, the popup always displays the Knowledge Base section,
Placeholders in Ticket Templates
We should be able to use placeholders in ticket templates. When we create a new ticket, our description field is shown to the client in the email they receive. It would be very handy to be able to personalize that description field in our ticket templates to pull in the name of the client that the ticket is for. Using them in the subject field as well, so we can auto populate Account Names, etc.
when the record is created the tag want to Show as Opportunity how i achive this using Deluge Script
In the quotation i have the work flow schedule for create opportunity record in the module , on that time the quotation tag select as opportunity created. How i achive this using Deluge Script . this like i want to Do tag1 = Map(); tag1.put("name","Nurturing
Delete a channel
I need delete a channel in tickets.
Copy / Duplicate Workflow
I have workflows setup that are very similar to each other. We have a monitoring system watching servers, and all notifications - no matter what client it is about - will come from a noreply@ address which is not very helpful in having it auto assigned to the right account. I have setup a workflow that will change the contact name of the ticket (currently it would say noreply@) to the correct customer which is based on the subject line, as that mentions which server the alert it is about. I need
Subtasks don't update parent task's times
Hi there: I've recently upgraded to premium and check that subtasks completion % don't update the proportional completion of the parent tasks related to it. We've been challenging with the problem of having to update twice or sometimes 3 times the completion of the related tasks. I've seen posts similar to this, of 3 years old. Is there any roadmap for making this happen in a future release? Thanx César Ratto Lima, Perú.
Apply transaction rules to multiple banks
Is there any way to make transaction rules for one bank apply to other banks? It seems cumbersome to have to re-enter the same date for every account.
Next Page