Howdy, tech wizards!
This week’s Kaizen explores how Catalyst Solutions in the Zoho CRM Developer Hub help import large volumes of data into Zoho CRM while improving data quality and simplifying the migration process.
Catalyst Solutions provide a library of independent, ready-to-use backend solutions called
CodeLibs. The
CRM Bulk Data Processor CodeLib helps handle complex data operations on large datasets. Following are the key benefits:
- Highly Scalable: Processes large datasets efficiently, supporting up to 200,000 records per API call.
- Automation Made Simple: Automate complex tasks like segmentation, data cleansing and lead scoring with minimal effort.
- Effortless Integration: Comes with pre-configured Catalyst resources such as serverless functions and data stores that integrate directly with Zoho CRM.
Business Scenario
Zylker, a manufacturing company, migrated over 3 lakh Lead records into Zoho CRM from spreadsheets.
Post-migration, the Lead data showed the following inconsistencies and challenges:
- Phone number field did not include country codes, or contained incorrect country codes. This inconsistency made it difficult for sales teams to contact Leads reliably.
- Identifying potential Leads for follow-up required manual effort and marketing team has to run generic campaigns without lead segmentation.
Using workflows before record creation to fix phone numbers for this volume would result in 3 lakh individual workflow executions, which can slow imports and cause partial failures.
Solution Overview
Zylker can use the CRM Bulk Data Processor available in Catalyst Solutions to address these challenges at scale.
The solution works as follows:
- Lead records are fetched in bulk from Zoho CRM using the Bulk Read API.
- The fetched data is temporarily stored to evaluate the priority and quality of each record. Based on this evaluation, the records are also segmented accordingly.
- The Country field value is used to identify and append the correct country code to the phone number.
- The processed records are updated back into Zoho CRM using Bulk Write API.
All operations are executed using pre-configured Catalyst resources provided by the CodeLib. You can explore the
Bulk Data Flow in Catalyst help page to understand how each resource participates in the processing pipeline.
Prerequisites
Before you begin, ensure the following:
1. Log into your Zoho CRM and navigate to Setup > Customization > Modules and Fields > Leads.
Create the following custom Single Line fields to map existing record data in Zoho CRM.
- Last Activity Days
- Web Engagement Score
2. Create the following custom Single Line fields to store the calculated values during bulk processing:
- Lead Score Value
- Lead Segment
- Sales Priority
- Data Quality Status
3. Go to Setup > Developer Hub > Catalyst Solutions > Zoho CRM Bulk Data Processor.
4. Click Go to Catalyst and create a Catalyst account if required.

6. Create a new folder on your local system, which will act as a local project directory. Use the following command:
7. Navigate to the project folder in your terminal and execute the following command:
8. Follow the prompts to select and initialize your desired project from the Catalyst console.
When prompted to choose a feature, press Enter and proceed without choosing any feature.
9. Run the following command to install the CRM Bulk Data Processor CodeLib.
Step 1: Create a Cron Job
1. Open the Catalyst Console and navigate to the same project in which you have installed the CRM Bulk Data Processor CodeLib.
2. Go to Cloud Scale > Triggers > Cron and click Create Cron.
3. Fill in the following details:
- Provide a Name and Description for the cron job.
- Select Function and choose BulkJobScheduler from the dropdown in the Target Function field.
- Enter the following parameters and values:
MODULES -> Leads
FIELDS_TO_BE_PROCESSED -> Last_Name, Company, Mobile, Country, Designation, No_of_Employees, Web_Engagement_Score, Lead_Score_Value, Lead_Segment, Sales_Priority, Data_Quality_Status
Use GET Modules Metadata API and GET Fields Metadata API to get the API names of the required module and fields.
- Choose the Schedule Type as One Time for our use case.
Step 2: Configure Zoho CRM API Credentials
2. Generate a Grant Token with the following scopes:
- ZohoFiles.files.ALL
- ZohoCRM.bulk.ALL
- ZohoCRM.modules.ALL
- ZohoCRM.settings.ALL
- ZohoCRM.org.ALL
3. Follow the
OAuth Help Section for a step-by-step guide to generate Access and Refresh tokens for your Zoho CRM organization.
Store all the API credentials securely for later use.
4. To allow Catalyst to access Zoho CRM data, configure the stored API credentials as environment variables in the catalyst-config.json file within the BulkDataProcessor function.
These environment variables are used by
Catalyst Connectors to create access tokens for establishing secure connection between Zoho CRM and Catalyst.
Step 3: Add Business Logic
1. Go to com.processor.record.ZCRMRecordsProcessorImpl.java file of the BulkDataProcessor in the functions directory.
2. Override the ZCRMRecordsProcessor method with the business logic.
The complete code sample for this use case is available on
GitHub for reference.
Following is the major custom logic used here:
Phone Number Normalization:
This can be implemented in two stages, Country standardization and Phone Number formatting.
For country standardization, CountryStandardizerUtil maps different variations of the Country field in records to a single standardized country identifier. These variations may include,
- Country Names (India, Unites States, United Kingdom)
- Abbreviations (Ind, IN, USA, US, UK)
- Calling Codes (+91, +1, +44)
With this, we can ensure different interpretations of the same country are interpreted consistently during the process.
Once the country is standardized, Phone Numbers are formatted to E.164 format in the PhoneNormalizerUtil.
It removes all non-numeric characters and converts the Phone input to E.164 format with the respective country codes.
public class PhoneNormalizerUtil { private static final Pattern NON_DIGIT = Pattern.compile("[^0-9]"); public static Optional<String> normalizeToE164(String rawPhone, String countryCode) { if (rawPhone == null || rawPhone.trim().isEmpty()) { return Optional.empty(); } String digits = NON_DIGIT.matcher(rawPhone).replaceAll(""); if (rawPhone.startsWith("+") && digits.length() >= 10) { return Optional.of("+" + digits); } switch (countryCode) { case "IN": return normalizeIndia(digits); case "US": return normalizeUS(digits); case "UK": return normalizeUK(digits); default: return Optional.empty(); } } private static Optional<String> normalizeIndia(String digits) { if (digits.length() == 10) { return Optional.of("+91" + digits); } if (digits.startsWith("91") && digits.length() == 12) { return Optional.of("+" + digits); } return Optional.empty(); } private static Optional<String> normalizeUS(String digits) { if (digits.length() == 10) { return Optional.of("+1" + digits); } if (digits.startsWith("1") && digits.length() == 11) { return Optional.of("+" + digits); } return Optional.empty(); } private static Optional<String> normalizeUK(String digits) { if (digits.startsWith("44") && digits.length() == 12) { return Optional.of("+" + digits); } if (digits.length() == 10) { return Optional.of("+44" + digits); } return Optional.empty(); }
} |
Lead Priority and Segmentation
The lead priority is calculated using the Title, No of employees, Last Activity Days and Web Engagement Score fields in the record.
Each field value contributes a predefined number of points:
- If the job title indicates a senior role such as CEO, CTO, Director, or VP, 25 points are added.
- If the company size is 200 employees or more, 20 points are added.
- If the Lead has been active within the last 7 days, 15 points are added.
- If the web engagement score is 70 or higher, 10 points are added.
The sum of all applicable factors is returned as an integer and based on this score the lead's priority and segmentation is assigned as follows:
- High (Hot): score ≥ 70
- Medium (Warm): score ≥ 40
- Low (Cold): score < 40
public static int calculateLeadScore( String jobTitle, Integer companySize, Integer lastActivityDays, Integer webEngagementScore) { int score = 0; // Decision Maker if (jobTitle != null) { String title = jobTitle.toLowerCase(); if (title.contains("ceo") || title.contains("cto") || title.contains("director") || title.contains("vp")) { score += 25; } } // Company Size if (companySize != null && companySize >= 200) { score += 20; } // Recency if (lastActivityDays != null && lastActivityDays <= 7) { score += 15; } // Engagement if (webEngagementScore != null && webEngagementScore >= 70) { score += 10; } return score; } public static String deriveSegment(int score) { if (score >= 70) return "Hot"; if (score >= 40) return "Warm"; return "Cold"; } public static String derivePriority(String segment) { switch (segment) { case "Hot": return "High"; case "Warm": return "Medium"; default: return "Low"; } }
|
Lead Quality:
Lead quality is evaluated based on the validity of the Mobile and Country fields in the records.
- Clean: Both field values are valid.
- Critical: Both field values are invalid.
- Needs Review: Only one of the field values is invalid.

Write Back to Records:
The processed data is written back to Zoho CRM as follows:
- Mobile: Formatted phone numbers.
- Lead Score: Total score calculated from all applicable fields.
- Lead Segment: Segment derived from the lead score.
- Sales Priority: Priority assigned based on the lead segment.
- Data Quality Status: Overall quality of the Lead record.
if (normalizedMobile.isPresent()) { data.put("Mobile", normalizedMobile.get()); } data.put("Lead_Score", leadScore); data.put("Lead_Segment", leadSegment); data.put("Sales_Priority", salesPriority); data.put("Data_Quality_Status", dataQualityStatus); }
|
Step 4: Deploy to Development
You can find the complete code sample on
GitHub for reference.
Try it Out!
With the changes deployed to the Development environment, let us now test the solution.
We hope this Kaizen helps you import large volumes of data into Zoho CRM while improving data quality and lead intelligence using the CRM Bulk Data Processor.
Have questions or suggestions? Drop them in the comments or write to us at
support@zohocrm.com.
We will circle back to you next Friday with another interesting topic.
On to Better Building!
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
Recent Topics
ms
Email set up for communication
WorkDrive issues with Windows Explorer Not Responding
We are using WorkDrive to collaborate on editing video content. We have a lot of files and quite a few are a few gigs. Recently anytime I try and work with the files Explorer freezes for a couple minutes whether it's dragging the files into Premiere or
Fix the speed
It takes ages to load on every step even though my dataset is quite small.
Capture Bank Charges for Invoice Payments
We've added the Bank Charges field in the "Add Payments" page both in Zoho Invoice & Zoho Books. So all you need to do is to enter the bank charges when you record a payment for the invoices. This bank charge will be included to the amount paid for that invoice. Steps to add the bank charges while you record the payment: 1. Click the "Invoices" sub-tab under the "Money-In" tab. 2. Click the 'add payment' link for the invoice that you wish to record the payment for. 3. On the add
Conditional Layouts On Multi Select Field
How we can use Conditional Layouts On Multi Select Field field? Please help.
Fill Mail Merge document up with subform fields of an Inventory module record being in the Related List
Hi, I try to insert subform fields from an inventory module record being on the Related List of another inventory module record into a Mail Merge template without success. For example: we use ratecards in licensing and this ratecard items are available
my zoho mail is hacked
my email is sending my username and password to people i dont know
How can we add products using a Wizard?
We want to create a Wizard to add products. Why is there no possibility to use the products module when creating a wizard?
Image field in custom module
Hi guy, Is there any hope of adding a custom image field in the custom module? We created a custom module to keep track of assets, and it would be helpful if we could attach an image to the record. Thanks Rudy
Deluge Function to Update Custom Field
I'm trying to get a Deluge function (which will run as part of a Schedule in Desk) that retrieves all tickets with the status "Recurring" and updates the custom field checkbox "cf_recurring" to "true". Here's what I have, which doesn't work: searchValue
"View ticket" link is broken
The "View ticket" link in our Zoho ticketing system confirmation emails is broken (please see attached). Impacts ability to update/review details, and, refresh recollection at a later date. Any help would be much appreciated.
import data from Apollo.ai into zoho crm via zoho flow
I might be asking this question in the wrong forum. We use Apollo.ai to find potential new leads for our business, there are around 10000 leads that we have initially found. We have an Apollo.ai account but just to do searches, we dont use it as a crm.
Woocommerce Line Item Information
I'd like to add each line item from a Woocommerce order to a zoho creator form record. The line items are found within the line items array, but I'm not sure how to get each item out of the array? Any help would be much appreciated.
Synching changes to Stripe when changes are made in Zoho Billing
We have a situation where we have merged customers in Zoho BIlling and then found out later that the payment in Stripe was not updated and still associated with the old customer record. The card gets updated and billed, but that payment is still associated
How do I fix this? Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked.
How do I fix this? Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked.
Disable Smart Filters By Default
The smart filters "feature" is causing confusion for Zoho Mail users. New emails should be delivered to the inbox unless they have specifically opted to redirect them somewhere else. People don't understand that new emails might be waiting in a random
ME SALE ESTE ERROR: No fue posible enviar el mensaje;Motivo:554 5.1.8 Email Outgoing Blocked
Ayuda!! Me sale este error al intentar enviar mensajes desde mi correo electronico de Zoho! Tampoco recibo correos pues cuando me envia rebotan. Ayuda, Me urge enviar unos correo importantes!! Quedo atenta MAGDA HERNANDEZ +5731120888408
Client Script | Update - Client Script Support For Custom Buttons
Hello everyone! We are excited to announce one of the most requested features - Client Script support for Custom Buttons. This enhancement lets you run custom logic on button actions, giving you greater flexibility and control over your user interactions.
Zoho Mail not working
Zoho Mail not working
Product line search in quotes
Is there a way to change the search setting when you add a product line to a quote. We have created a field in products called 'Part Number' and I would like when I'm adding a product line to the quote that I can search on that field. At the moment it only searches on product description. In products I can search on the 'Part Number' field Any help welcome.
CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive
Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
Queries on Project-Based Inventory Consumption and Proforma Invoice in Zoho ERP
We would appreciate your clarification on how Zoho ERP plans to handle the following: Project-based inventory consumption without itemized sales orders Accurate project cost tracking along with inventory reduction Proforma Invoice usage We look forward
I can't add a new customer in Zoho invoice? Anyone had this issue before?
Ive been using Zoho invoice for over 6 years. Today I wanted to add a new customer to send an invoice to but it doesn't save when I try to access it from the pulldown menu when you go to send a new invoice.
Spreadsheet View click & focus issue in Arabic (RTL) localization
Hello Zoho Support Team, I am facing an issue in Zoho Creator Spreadsheet View when using Arabic localization (RTL). Scenario: My app supports English (LTR) and Arabic (RTL). I created a Spreadsheet View for a form. In English, everything works correctly.
Customer address in Zoho Bookings
Hello, Is it possible to add customer address information to the Zoho bookings appointment screen? Or have it pull that information automatically from the CRM? We are wanting to use this as a field management software but it is difficult to pull the address from multiple sources when it would be ideal to have a clickable address on the appointment screen that opens up the user's maps. It would also be advantageous for the "list view" to show appointment times instead of just duration and booking
Ghost email notification on a form
Hello, We have recently encountered an error where I can not see a email notification set up for a form which I am currently the owner, although neither the form nor the notification were created by me. However, neither can the Super Admin access the
bulk edit records and run internal logic
hi there is few logics in manner "it this than that" logics work well when i edit entry openning it one by one (via workflow "on add/edit - on success" , for custom field "on update/on user input") but when i try bulk edit records - logic does not work. how can i turn on logic to work as programmed - for mass editing records via bulk edit?
Dheeraj Sudan and Meenu Hinduja-How do I customize Zoho apps to suit my needs?
Hi Everyone, I'm Meenu Hinduja and my husband Dheeraj Sudan, run a business. I’m looking to tweak a few things to fit my needs, and I’d love to hear what customizations others have done. Any tips or examples would be super helpful! Regards Dheeraj Sudan
Bulk bank rule creatioin
Hi team, I am exploring Option to create a multiple bank rule. Could please suggest the option to implement this?
Limitations on editing a message in Cliq
Hi I've checked the documentations and there's no mention of how many times a message can be edited. When trying with code, I get various numbers such as ~1000 edits or so. Please mention if there's a limit on how many times one can change a message via
Orphan email alias blocking user creation – backend cleanup required
Hello Zoho Mail Support, I´m unable to assign or create the address xx@iezzimatica.ar in my organization. Current situation: Alias cannot be assigned to any user (system says it is already in use) New user with this address cannot be created Address does
email address autocomplete
Is there a way to eliminate certain addresses from showing up in auto complete when entering an address? Many old and unused addresses currently show up, many of which I would like to get rid of. Thanks
How to use MAIL without Dashboard?
Whenever I open Mail, it opens Dashboard. This makes Mail area very small and also I cannot manage Folders (like delete/rename) etc. I want to know if there is any way to open only Mail apps and not the Dashboard.
Introducing Radio Buttons and Numeric Range Sliders in Zoho CRM
Release update: Currently out for CN, JP, AU and CA DCs (Free and standard editions). For other DCs, this will be released by mid-March. Hello everyone, We are pleased to share with you that Zoho CRM's Layout Editor now includes two new field formats—
How can i download and secure all my mails from the archive folders?
Hi, i would like to download all my mails from my archive folders and secure it on my external HDD. Is this possible? Thx. amir
How to open filtered report in popup using Zoho Creator Deluge?
First report: There is so many records in Report, If I click one record, pop up is occur. Second report (Pop up): there is also so many record data, and this pop up is also Report, not Form. First report: It has got "Sales Order" field. when I click any
Make panel configuration interface wider
Hi there, The same way you changed the custom function editor's interface wider, it would be nice to be able to edit panels in pages using the full width of the screen rather than the currently max-width: 1368px. Is there a reason for having the configuration panel not taking the full width? Its impossible at this width to edit panels that have a lot of elements. Please change it to 100% so we can better edit the layouts. Thanks! B.
Can you default reports/charts to report the current week?
Our data table maintains two years of data. Management wants certain report to automatically filter the report to the latest calendar week. I know I can do this manually with filters but I want the report to automatically default to the latest calendar
Rendering PDF to view on page
My company upload lots of PDF files onto Zoho. But every time we open it, it downloads the file instead of viewing it on the web page. Does Zoho allow uploaded PDF files to be rendered to view on web page yet? I've been trying to use <embed> or <object> but it cannot be loaded. (similar thread: https://help.zoho.com/portal/community/topic/how-to-open-a-pdf-file-of-a-view-in-preview-mode)
Overlapping Reports in Dashboards
It's rare, but occasionally it would be a good feature if I were able to overlap reports, either fully or partially in the Dashboards. Also, then having the ability to move objects to the front or rear, or make them transparent/translucent would be good
Next Page