Custom Function to Format Phone / Mobile numbers in Australian Standard format

Custom Function to Format Phone / Mobile numbers in Australian Standard format

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
  1. Go to Setup --> Automation --> Workflow Rules --> Create Rule --> Under Module, select Leads --> Give a Rule name and Description (ie Format Phone Numbers Australia) --> Next
  2. When = Select "On a Record action" --> "Create or Edit" --> Next
  3. Condition = In Conditions, choose "All Leads" --> Next.
  4. 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
  5. Copy paste the code from below and proceed to save the code.
  6. "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
  7. Save the Function 
  8. 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
  1. 0400 111 222
  2. 400111222
  3. 0400-111-222
  4. 61400111222
All local numbers  --> +61 3 9000 1111
(works with 02, 03, 07, 08) 
  1. 0390001111                  
  2. 390001111
  3. (03) 9000 1111
  4. (03) 9000-1111
1800 numbers  --> +61 1800 111 222
  1. 1800111222
  2. 1800 111 222
1300 numbers  --> +61 1300 111 222
  1. 1300111222 
  2. 1300 111 222 

      • Recent Topics

      • Announcing Early Access to "Zoho CRM for Everyone" — A new and exciting update to Zoho CRM

        We are delighted to announce an Early Access to Zoho CRM for Everyone— a truly democratic approach to managing a CRM, gift-wrapped in an exciting and intuitive user interface. Here, multiple teams across an organization can coordinate among each other
      • API - Inactive user

        Hi We have a complex flow set up with an API. Yesterday I needed to inactivate a user who had set up the flow and API- realised after this, then broke the connection so - re-activated the user. The flow now seems not to work when gaining information from
      • Based onthe multipick list value want to Show in the pick list field

        Based onthe multipick list value want to Show in the Single pick list field Database Region is multipick list if it contain Saudi and UAE then region pick list want to show Saudi and UAE Database Region is multipick list if it contain Saudi then region
      • CRM quotes and sub forms.

        Recently upgraded to Enterprise CRM - now some added hopes/questions * In a subform in quotes, if I add a "Percent" field, called Overage for instance. I would expect it to allow me to enter a percent like "10%" and carry the percent forward to formulas
      • Add Mileage Tab on Expenses

        Hello, the 'Add Mileage' tab is not visible. How can I enable it? I checked the settings, and my user has admin privileges. I also enabled mileage in the policy, but the 'Add Mileage' tab is still not visible. What could be the issue?
      • Currency transition

        We are using Zoho CRM in Curacao, Dutch Caribbean. Our currency is currently the ANG. Curacao will be transition ing from using the ANG (Antillean Guilder) to using the XCG currency (Caribbean Guilder) on March 31st 2025, see: https://www.mcb-bank.com/caribbean-guilder.
      • Error sending an email

        Hi, I'm trying to send an automated email (receiver is always the same) via Deluge function. It was working perfectly, but yesterday the receiver's mailbox got full and started returning this error: { "data": [ { "code": "NOT_ALLOWED", "details": { "reason":
      • [ Free Webinar] Transform your hiring process with Zoho Recruit's AI tools

        We are conducting a free webinar (on 26th November, 05:00 AM IST - 06:00 AM IST) designed to help you make the most of Zoho Recruit’s AI capabilities and give you a sneak peek into our future roadmap. Why Attend? In this session, you will: Discover how
      • Email signature duplicate

        Hi, For a few weeks, opening the email writer would show an error. After clicking ok, the signature would change slighty (font size, I believe). After that it worked fine, so we thought nothing of it. However, now it no longer shows the error puts the
      • It's time to say goodbye to Zoho Recruit for me.

        Hello, I have been a Zoho Recruit user since 2013. The tool has evolved, with a better UI, new features and so on. The pricing is still a great asset too. BUT, that being said, important features are not coming fast enough. I tried to share my point of
      • Remove "Additional Information" options from user-created tickets

        I'd like to configure customers to be able to create tickets themselves, with and without logging in. However, I don't want them to set things like the priority or due date. Is there a way to remove these options from the help center when customers create
      • Getting Started All Zoho Desk APIs require these two mandatory fields in the header.

        Hey, according to API Dokumentation, All Zoho Desk APIs require these two mandatory fields in the header. Authorization - Authentication request token orgId -ID of the organization to access. All API endpoints except /organizations mandatorily require
      • ZOHO Work Drive Back Up

        I am looking for a ZOHO Work Drive backup solution. Something that is cloud based. There's lots of these kinds of options for Google Drive and other providers, but I have not seen anything for WorkDrive. Any suggestions?
      • Export PDF File Name

        Is it possible to change the default Zoho .pdf naming scheme for inventory items like quotations? Would like to use the the Subject as the default quote name. Is this possible?
      • Facing issue in getting data through api calls

        I have send data of users and want to get the data oof users but facing issue with one field for that I want help
      • Kaizen #126 - Circuits in Zoho CRM - Part 1

        Hello everyone! Welcome back to another week of Kaizen! Today, we will discuss an exciting topic—Circuits in Zoho CRM. For starters, we will discuss what Circuits are, how beneficial they are for businesses, different views of a Circuit, and the different
      • Google Ads Data is Publicly available in Zoho CRM

        We recently discovered that ALL of the following Google Ads fields are visible to all users in our CRM that have access to either Leads or Contacts modules. Not only is this troubling and inconvenient, it should be unacceptable. It also creates a mess
      • Campaigns workflow emails going to Spam

        Hi Everyone, Does anyone have a solution for workflow emails going to recipients SPAM folders? Our domain is not on any Blacklists, We have our domain authenticated with SPF, DKIM and DMARC all set up and we still have leads who tell us they are not getting
      • Best Way to Integrate a Shared Sales Inbox with Zoho CRM

        I’m setting up a shared email inbox (e.g., sales@mycompany.com) for our sales team and want to integrate it with Zoho CRM Leads and Deals so that multiple team members can collaborate efficiently. Since Zoho CRM doesn’t support IMAP for shared inboxes,
      • Add and Delete Customer Portal user via Deluge

        Using Creator to build an app involving a customer portal. I'm trying to integrate the customer portal for the first time and it is raising questions, mainly because it's new territory. Is it possible to add a new user to the customer portal via deluge? For example, if an existing user invites/refers another potential user to try our app, is there code to automate via deluge, setting up an account ready to go for them? The referral would include their email address, and a workflow would set up the
      • Unexpected Error in Reports (Pivot Chart, Pivot Table)

        Dear Zoho Support Team, I am facing an issue while creating reports (Pivot Chart, Pivot Table, etc.) in Zoho Creator. When I try to access the report, I receive an unexpected error, and an alert message saying "Undefined" appears with the loading UI.
      • Access invoice custom modules data from API

        Hi, I am using $url = "https://www.zohoapis.eu/invoice/v3/invoices"; $opts = ["http" => [method" => "GET",header" => [ "Authorization: Zoho-oauthtoken $accessToken", "X-com-zoho-invoice-organizationid: $orgId" ] ] ]; From my app to retrieve the invoices,
      • Using IMAP configuration for shared email inboxes

        Our customer service team utilizes shared email boxes to allow multiple people to view and handle incoming customer requests. For example, the customer sends an email to info@xxxx.com and multiple people can view it and handle the request. How can I configure
      • Zoho CRM and Google Sync - delete Contacts?

        If I delete a contact in Zoho CRM, will it also be deleted in Google contacts?
      • Customize the ticket ID for enhanced ticket tracking

        Hello everyone, Ticket IDs in Zoho Desk are the unique reference numbers that are assigned to tickets when they're created. Agents generally use the ticket ID to locate a particular ticket and to reference a ticket in conversations and feeds. When customers
      • For Each (Desk Ticket) Loop

        What I need is some sort of "for each" loop functionality in Flow, this doesn't seem to be a thing, but I'm wondering if someone found some sort of workaround? Here's the whole situation: I have a Flow, which is supposed to be triggered by a custom field
      • Turn off/Disable Lead Approval

        Is there a way to disable the need to approve leads? I thought there was but I can't find any reference to it in help, etc. We don't need an approval process for incoming leads at the moment. Thanks.
      • Change colour on task lists?

        I have many task lists on my project boards, since they are all the same colour they blend in with each other. Is there a way to change the colour of these task lists in the list view?
      • Zoho Flow Doesn't Detect Desk Ticket Custom Field Change

        I have a Flow that is configured to be triggered when a custom field on a ticket changes. I also have a Schedule in Desk that runs a script that changes the custom field. When I change the custom field manually in the Desk interface, the Flow runs as
      • invokeURL to change custom field

        I have a deluge script that currently runs as a Schedule. It works exactly as intended, however I've recently been informed by Zoho that there's some mechanism in place to block changes made by a script when it runs on a schedule from being detected by
      • Email transfer to projects

        We are unable to add comment/map documents to this task. WHY DID THIS HAPPEN? The possible reasons are : 1. Email ID not confirmed. To confirm use the link http://zohosso.wiki.zoho.com/#resendconfirmation 2. You do not have permission to add comment/
      • Stop adding Default ID column to xls exports

        When anything is exported to xls, Zoho adds a column with an ID.  WE DO NOT WANT THIS COLUMN.  We use an automated report to a team.  We have our own tracking number.  1. This makes the report messy, it just pushes OUR data off to the right.  2. We have
      • Este domínio já está associado a esta conta

        Fui fazer meu cadastro na zoho e quando digitei meu domínio recebi essa mensagem que meu domínio estava associado a uma conta que eu nem faço idéia de quem seja. Como que faço pra resolver isso? Atenciosamente, Anderson Souza.
      • Transferring Attachments from Lead to Account

        Hi All, I'm trying to create a function that will transfer attachments in leads to the newly created account. I know there's an option to choose where the attachments go when you click the standard convert button but we have a high volume of conversions
      • New Line in Double Optin Email

        Hello, is it possible to add new lines to the double optin email? This is necessary to add legal informations to the mail, which would look very messy if it is all in one line. Thank you in advance Carsten
      • Cursor Keeps Disappearing in the Email Fields

        I did the recent update to the Zoho desktop app - I'm on PC Windows 11. My cursor keeps disappearing when I try to type in the "To" "CC" "Subject" boxes and typing in the body of the email. I've been trying to just tab through the sections instead of
      • Hourly Permission not getting Calculated

        That is our settings The total calculation should be from 9:37 AM to 3:37 PM, but the hourly permission isn't getting calculated The last entry is hourly permission, it's not
      • Client Script field.setCriteria need the list of possible operators for criteria or the opposite of "equal"

        The gist is to just filter the lookup the countries not listed in the multiselect field. I've been using a client script and this time I would like to set this criteria for the lookup: op.setCriteria("((Specialty_Requirement:equals:" + spec + ")and(Countries_Excluded:not_equal:"
      • Highlight a candidate who is "off limits"

        Hello: Is there a way to highlight a candidate who is "off limits"?  I would like to have the ability to make certain candidate and / or Client records highlighted in RED or something like that.   This would be used for example when we may have placed a candidate somewhere and we want everyone in our company to quickly and easily see that they are off limits.  The same would apply when we want to put a client or former client off limits so no one recruits out of there. How can this be done? Cheers,
      • old invoices (Exchange rate)

        We have been facing an issue and searching for a solution for over a month. Issue: Previously, the exchange rate in Zoho Books and Zoho CRM was incorrect, and invoices were being recorded in Zoho CRM with the wrong exchange rate. After adjusting the exchange
      • Next Page