Format numbers in CRM or Desk

Formatting Phone numbers using Deluge - AI Tasks

Summary:

In scenarios where you want to format phone numbers in Zoho CRM or Zoho Desk based on the country code, the traditional approach has been to use Deluge functions to programmatically modify and standardise the numbers.

With the introduction of the Parse Phone Number AI Task in Deluge, this process can now be achieved with low-code effort and far more easily.


Business-case:

Customers may enter phone numbers in various formats — some with the country code, others without. To ensure uniformity and maintain consistent phone number formatting across Zoho Desk and Zoho CRM, you can use the Parse Phone Number AI Task.

This task helps parse and format phone numbers accurately based on the provided country code.


 
Reference:

For more details on the Parse Phone Number AI Task, please refer to the following help document: Zoho Deluge – Parse Phone Number AI Task

Syntax -   
<response> = zoho.ai.parsePhoneNumber(<phone_number>, <country_code>);

Code:

The sample code below demonstrates how to fetch the Phone field in Zoho Desk and update it with the formatted phone number:

  1. recordInfo = zoho.desk.getRecordById(OrgID,moduleName,ticketID);
  2. phone = recordInfo.get("phone");
  3. full_format = zoho.ai.parsePhoneNumber(phone,"IN");
  4. //Formatting the phone number in IN format
  5. cutomer_mobile = full_format.get("e164_format");
  6. mp = Map();
  7. mp.put("phone",cutomer_mobile);
  8. update = zoho.desk.update(OrgID,moduleName,ticketID,mp);
  9. info update;

Screenshot displaying the number in Zoho Desk before Function Execution:


 
 
 
 
Screenshot displaying the formatted Phone number after the function is executed:


 



In similar way this can also be done in Zoho CRM. You can fetch the number from the record and format it according to the required country's format.


Code:

  1. getrecord = zoho.crm.getRecordById("Leads", LeadID);
  2. num = getrecord.get("Mobile");
  3. full_format = zoho.ai.parsePhoneNumber(num,"IN");
  4. customer_mobile = full_format.get("e164_format");
  5. mp = map();
  6. mp.put("Mobile", customer_mobile);
  7. updaterecord = zoho.crm.updateRecord("Leads", LeadID, mp);
  8. info updaterecord ;

Note - The functions shared above is a sample. Please modify further according to your requirement.

Screenshot before the Function execution:




Screenshot after the Function execution:





You can have this function added in Workflow rule so for every new record created it updates the number in the required format.


With the Parse Phone Number AI Task, formatting phone numbers across Zoho Desk and Zoho CRM becomes a simple, low-code process. You can incorporate this function within workflows or automation rules to ensure every record maintains a consistent, country-specific format — enhancing data quality and reducing manual effort.




Notes
Notes: Refer to the following Guide - Article to learn the best practices for Optimizing the code and various ways to deploy Custom Function across Zoho CRM.

Custom Solution Created by Sabareesh | Zoho Partner Support

If you need any further clarifications, please don’t hesitate to contact - partner-support@zohocorp.com.

Additionally, we kindly ask all "Europe and UK partners" to reach out to partner-support@eu.zohocorp.com.

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              WCAG

                                        Create. Review. Publish.

                                        Write, edit, collaborate on, and publish documents to different content management platforms.

                                        Get Started Now







                                                          You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                              Manage your brands on social media


                                                                • Desk Community Learning Series


                                                                • Digest


                                                                • Functions


                                                                • Meetups


                                                                • Kbase


                                                                • Resources


                                                                • Glossary


                                                                • Desk Marketplace


                                                                • MVP Corner


                                                                • Word of the Day


                                                                • Ask the Experts


                                                                  Zoho Sheet Resources

                                                                   

                                                                      Zoho Forms Resources


                                                                        Secure your business
                                                                        communication with Zoho Mail


                                                                        Mail on the move with
                                                                        Zoho Mail mobile application

                                                                          Stay on top of your schedule
                                                                          at all times


                                                                          Carry your calendar with you
                                                                          Anytime, anywhere




                                                                                Zoho Sign Resources

                                                                                  Sign, Paperless!

                                                                                  Sign and send business documents on the go!

                                                                                  Get Started Now




                                                                                          Zoho TeamInbox Resources





                                                                                                    Zoho DataPrep Demo

                                                                                                    Get a personalized demo or POC

                                                                                                    REGISTER NOW


                                                                                                      Design. Discuss. Deliver.

                                                                                                      Create visually engaging stories with Zoho Show.

                                                                                                      Get Started Now








                                                                                                                            Wherever you are is as good as
                                                                                                                            your workplace

                                                                                                                              Resources

                                                                                                                              Videos

                                                                                                                              Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                              eBooks

                                                                                                                              Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                              Webinars

                                                                                                                              Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                              CRM Tips

                                                                                                                              Make the most of Zoho CRM with these useful tips.



                                                                                                                                Zoho Show Resources