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 


      • Sticky Posts

      • Enhancements to the formula field in Zoho CRM: Auto-refresh formulas with the "Now" function, stop formula executions based on criteria, and include formulas within formulas

        Dear Customers, We hope you're well! By their nature, modern businesses rely every day on computations, whether it's to calculate the price of a product, assess ROI, evaluate the lifetime value of a customer, or even determine the age of a record. With
      • Effortlessly analyze a report with contextual quick-view filter

        Dear Customers, We hope you're well! We are here with nifty enhancements to the reports feature in Zoho CRM. Reports gives you a real-big picture of your business' performance as processed data. This useful tabulation of data can sometimes be extensive
      • Enrich your CRM data and keep them updated

        You spend a lot of your time and efforts in generating quality leads for your business. While generating leads is a challenge in itself, the real deal begins when sales reps try to nurture these leads and convert them as customers. So how equipped is your sales team with information about your leads matters a lot.  For example, you might be using webforms to generate leads and collect customer information from your website. The lesser your webform fields are, the more your sign-ups right? From optimizing
      • Gamescope is leveling upto Motivator for Zoho CRM

        Hello,   As you are aware, we recently made Motivator for Zoho CRM available for Zoho One, CRMPlus and CRM Ultimate editions. Since Motivator has all the features of Gamescope and even more advanced gamification, we are planning to EOL Gamescope on 30th
      • FAQs on Approval Process - Post your Questions

        Dear All, Greetings! Approval process allows to validate records and streamline the process across organization to ensure a systematic approach. To resolve your probable queries, we are constantly gathering relevant FAQs and publishing them to address

        • Recent Topics

        • Zoho Support is Dysfunctional & Don't Know Their Own Support Hours

          Seeking clarification on Zoho support hours and contact numbers please. We have been trying to phone Zoho support on +61 2 8066 2898 at 9:20am AEDT for the second day in a row, and gotten a message on Zoho's support line: "support is open monday through
        • Field Updated based off Call Status

          I'm trying to create a Field Update where: When Call Status is Completed Lead/Contact/Account Description field with the information in the "Outcome Of Outgoing Call" Description field. Once our sales team finishes their calls and they add a description
        • 【参加無料】3/19 東京ユーザ交流会 参加登録 受付開始!(新橋開催)

          ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 3月19日(水)に東京、新橋でユーザー交流会を開催します! 今年最初のユーザー交流会 東京・新橋では、Zoho Champion の松井さん、鈴田さんが登壇します。 Zoho CRM活用事例のセッション、参加者同士で自社の活用・運用について情報交換ができるグループワークや、CRM / Marketing Automationに関するパネルディスカッションも予定しています。 ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
        • Zoho CRM Workflow and Function Backup Options

          Hi everyone! I have been able to make several backups of my CRM data and noticed that the Workflows and Functions are not included in these backups. To my knowledge, there is no backup feature for workflows and functions, which is problematic in of itself.
        • Automating CRM backup storage?

          Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
        • Bulk Delete / Archive

          For me the Bulk delete and archive functions are not working anymore reliable. I get the message that the action is scheduled, but often it is not executed not even minutes later. To me, the user experience became terrible in the last month. It used to
        • Chat function not working properly

          Ever since upgrading to plus, the chat is all messed up. it is coming up behind the web page so that I cannot see what I'm typing and cannot read replies. I can only see the bottom of the text box at the bottom of the page, and then it is blocked. I've
        • Additional step for Deleting an app

          Have an additional step for deleting an app. When the popup occurs, the user needs to write "DELETE" into a text field. This is what Google does. At the moment, it is too easy to Delete, which increases risk, and this should be easy to implement.
        • Passing Information from ZohoCRM to ZohoCreator

          I've got a use case where I'm attempting to use a button within ZohoCRM to pull a list of options into buttons on creator when page is loaded. I'm pretty well versed in Deluge, but I'm having a difficult time trying to understand how to dynamically place
        • Scheduled function not firing workdrive.uploadFile task

          I have a creator app that takes submissions from a published form. I setup a daily scheduled function to send a record template of the form, as well as 3 different uploaded files to workdrive folders. (Initially I intended for this to happen on the submission
        • Automatic Email Alerts for Errors in Zoho Creator Logs

          Hello, We would like to request a feature enhancement in Zoho Creator regarding error notifications. Currently, Zoho Creator allows users to view logs and errors for each application by navigating to Zoho Creator > Operations > Logs. However, there is
        • E-mails to suppliers

          Hi, i want to upload a spread sheet every day and send an e-mail to our suppliers every day (or when triggering a button?) with info from the spreadsheet lines. The supplier e-mail would be on each line. Unfortunately, when creating a scheduled automation,
        • Rearrange web - hidden components

          When you have a good number of forms, reports and pages, searching for one among the hidden components to add it to the menu is simply hell. Huge amounts of time are wasted.
        • Using Insert into to transfert a date in another form

          Hi, I have an order form that creates a record in a calendar form, for managing the delivery date. My customer can change that date in the calendar form, but i need the new date to be put in the original order form. I tried the following but it doesn't
        • Invoice import error - duplicate customer name column - there are no duplicates

          It is not allowing the importing of any rows because of a duplicate customer name problem, but there are no duplicates in the custoemr name row. Has anyone dealt with this issue before?
        • Introducing the New SalesIQ Live Chat Widget: Twice as Fast, Fully Optimized for Engagement!

          Hello everyone! To celebrate our 10-year milestone, we're thrilled to unveil the new and improved SalesIQ Live Chat Widget! Redesigned at both the User Interface and performance levels, this enhanced widget is not only optimized but also 2X faster than
        • Now Indian Businesses can start accepting online payments with Zoho and Razorpay

          Hello Everyone, At Zoho, we have always ensured a hassle-free online payment experience for our customers. Today, with our integration with Razorpay, Zoho's customers from India can now offer a seamless checkout experience for one-time and recurring payments, with a host of payment options including card payments, multiple wallet offerings, and net banking with over 50 banks. With Zoho and Razorpay, help your customers pay their way. Whether it's with debit cards, credit cards, wallets, or net banking,
        • Client Script | Update - Introducing Subform Events and Actions

          Are you making the most of your subforms in Zoho CRM? Do you wish you could automate subform interactions and enhance user experience effortlessly? What if you had Client APIs and events specifically designed for subforms? We are thrilled to introduce
        • Store Google reCAPTCHA Site Keys & Secrets in Zoho Forms

          Hello Zoho Forms Team, We appreciate the support for Google reCAPTCHA v2 (checkbox) and reCAPTCHA v2 (Invisible) in Zoho Forms. However, we have a significant usability concern regarding the current implementation. Current Limitation: Every time we want
        • Enable Organization-Wide reCAPTCHA Settings in Zoho Forms

          Hello Zoho Forms Team, We appreciate the existing security options for Zoho Forms, including Google reCAPTCHA v2 (checkbox) and reCAPTCHA v2 (Invisible). However, we have a major usability concern: Current Limitation: Right now, CAPTCHA is a form-specific
        • Add Support for Google reCAPTCHA v3 in Zoho Forms

          Hello Zoho Forms Team, We appreciate the security measures currently available in Zoho Forms, including Zoho CAPTCHA, Google reCAPTCHA v2 (checkbox), and reCAPTCHA v2 (Invisible). However, we would like to request the addition of support for Google reCAPTCHA
        • CASE Module - email function

          HI there, I dont know if this has been asked or answered before as i couldnt find it on the forums. Issue: when a new case is raised, it goes under case tab and everything is captured. Then how do i send emails to the client who raised case with the details
        • Does Zoho US Payroll now support employees in multiple states?

          Does Zoho US now support having employees in multiple US states? I looked at the site and can't find and of the restrictions on multiple states anywhere.
        • Last Name / First Name

          Hello ,  My company adds contacts on a "Last Name , First Name" basis. We've noticed that when viewing accounts there is no  " , " (comma). It's VERY misleading.  I have set the custom view to show "last name" "first name" instead it joins them both and merges them. Even after you create a contact and you re enter it states "contacts name" instead of "last name" , First name" I have already changed the arrangement of name display in user settings. We need to be able to distingush name orders. Attached
        • Desk Contact Name > split to First and Last name

          I am new to Zoho and while setting up the Desk and Help Center, I saw that new tickets created or submitted from the Help Center used the Contact Name field. This would create a new Contact but put the person's name in the Last Name field only. The First
        • Extract first and last name

          I am trying to build a custom function in Flow, when a new Zoho Booking is added I want to split the Name field into first last name.  I understand the function needs to be a string and this works but I am unsure how to write this in the flow script.  result = first_name.getPrefix(" "); info result; I also assume to then create the last name Ill use the same but getSufix  Any help greatly appreciated.  :-)
        • Import template from Zoho Writer

          I am trying to import a mail merge template - tried to import direct from my .docx file on my hard drive and the formatting went all over the place.  I then imported the .docx file in my Zoho Docs and then fixed up the formatting within Zoho Writer. Can I now import that template directly from Zoho Docs into my templates in Zoho CRM??
        • How do I connect a Google Cloud Project as a Custom Service

          How can I connect a Google Cloud project as a custom service to ZohoCRM? I need to pull YouTube Analytics data into CRM, but I cannot use the included YouTube service as it does not have the scopes I need. Therefore, I need to create a custom service.
        • Member Portal with Subscriptions

          We are a subscription box business using Zoho One.  How do our members login to make changes to their subscriptions, contact details, etc.  Is there a portal?  If not, what should we do to create one?  Also, we must be able to customize the portal with tabs and custom fields.  Finally, we need form and survey information to show up in the portal with some items editable and others read only.  I really need this information soon.  Thank you! Paige
        • How to select alternate invoice email notification template

          When we reissue an invoice, we want to send a different notification email. I am able to set up the alternate email body using Email Notifications/Invoice Notification settings, but I can't figure out how to attach that template to a specific invoice.
        • Telegram -> Zoho Creator answer via API.

          Hello! Did anyone work or established back connection from Telegram to Zoho Creator via API? I'm able to send notification from ZC to TG Bot successfully. (webhook is set) My notification consists of some information and inline buttons "yes" and "no".
        • How Can I Easily Access and Manage My GEPCO Online Bill Using Zoho Sheets?

          Hello everyone, I'm looking for an efficient way to access and manage my GEPCO online bills. I've heard that Zoho Sheets can be a powerful tool for organizing and tracking bills, but I'm not sure how to set it up for this specific purpose. Does anyone
        • Update a form record based on another form with same user ID

          Hi, I have 2 forms linked : Customer and Subscription When a customer fills-in a subsequent subscription form, there is a automatic subscription number created in the subscription form that I want to paste in a miroir field in the customer field. What
        • Notes Filter is not working

          I am trying to filter the CRM down to specific notes that I want that'll show up all the data that has a specific keyword for example, "stocks" and it says no leads are found... Don't know how to fix. don't know if it's a system glitch. I even put a note
        • How to Initiate WhatsApp Message on SalesIQ?

          I've just activated a Business WhatsApp phone number through SalesIQ because of its touted omnichannel chat approach. Sounds exciting. I understand that when a customer sends me a WA message, I can reply to it on SalesIQ and keep the chat going, perfect.
        • How can I transfer data from Production to Development environment?

          Hi, I am using Creator V6 and would like to bring all the data in production to the Development and Testing environments? Is there an easy way of doing that or I have to export and import each table?
        • Issue Configuring SSO Integration with Cognito in Zoho Help Center

          Dear Zoho Support Team, We have been working on configuring SSO integration for our Zoho Help Center using Amazon Cognito. While the setup appears to be completed successfully, we are encountering an issue when attempting to access the Help Center. The
        • Custom Roles & Granular Permission Control in Zoho SalesIQ

          Hello Zoho SalesIQ Team, We appreciate the functionalities offered by Zoho SalesIQ, but we would like to request a crucial enhancement regarding user roles and permissions. Current Issue: At present, Zoho SalesIQ provides fixed roles—Admin, Supervisor,
        • Zoho Creator Upcoming Updates - October 2023

          Hello all! As we step into the final quarter of this year, we're ushering in a fresh wave of improvements and new features to supercharge your experience with Zoho Creator. Join us today as we present the newest updates and enhancements for this month:
        • Sales without an invoice

          Sales without an invoice is not included on the “payments received” report. Also, sales without an invoice is not listed in the transactions under the customer’s profile, also making it easy to do a double entry. Is there a way for me to see my sales
        • Next Page