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:
<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:
- recordInfo = zoho.desk.getRecordById(OrgID,moduleName,ticketID);
- phone = recordInfo.get("phone");
- full_format = zoho.ai.parsePhoneNumber(phone,"IN");
- //Formatting the phone number in IN format
- cutomer_mobile = full_format.get("e164_format");
- mp = Map();
- mp.put("phone",cutomer_mobile);
- update = zoho.desk.update(OrgID,moduleName,ticketID,mp);
- 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:
- getrecord = zoho.crm.getRecordById("Leads", LeadID);
- num = getrecord.get("Mobile");
- full_format = zoho.ai.parsePhoneNumber(num,"IN");
- customer_mobile = full_format.get("e164_format");
- mp = map();
- mp.put("Mobile", customer_mobile);
- updaterecord = zoho.crm.updateRecord("Leads", LeadID, mp);
- 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: 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