Zoho CRM Bulk Import CodeLib Solution
The Zoho CRM Bulk Import CodeLib solution enables you to import data in bulk to any standard modules in Zoho CRM.
Note: You can get more detailed information on the steps to install and configure the Zoho CRM Bulk Import CodeLib solution from your Catalyst console. You must navigate to the bottom of your Catalyst console where you will find the Catalyst CodeLib section. You can click on the Zoho CRM Bulk Import CodeLib tile to access the steps.
How does the CodeLib solution work?
Upon installing this CodeLib solution, pre-defined Catalyst components specific to the solution will be automatically configured in your project. These include two Catalyst Serverless functions (Event and Advanced I/O) in Node.js, a rule in the default Catalyst Cloud Scale Event Listener, a folder in the Catalyst Cloud Scale File Store components and a cache segment in the Catalyst Cloud Scale Cache component.
To authenticate and access the resources of your Zoho CRM account securely, firstly you will need to register a self-client application from Zoho's API console. Make sure to note down the generated Client ID and Client Secret credentials for accessing your Zoho CRM account. You can refer to this page for the steps to generate access and refresh tokens. You will need to configure these credentials as constant values in the functions component after the CodeLib solution is installed. You will also need to configure a key named CODELIB_SECRET_KEY in the functions, and pass this in the request header every time you try to access any endpoints of the pre-configured functions in the CodeLib solution. This key allows you to access the Catalyst resources of the CodeLib solution securely.
When you have the file to be uploaded to Zoho CRM ready (in a .csv format), you can invoke the /job endpoint of the crm_bulk_job_service(Advanced I/O) function as a cURL request. You will need to pass the local file path, the organization ID of your Zoho CRM account and the name of the Zoho CRM module to which you need to upload your data, in the request payload. You can upload files up to a maximum size of 50 MB. The crm_bulk_job_service function handles the logic to extract the file from your local system and upload it to the CrmFiles folder in the File Store. This folder will be auto-created as a part of the CodeLib solution.
After the file is uploaded to the CrmFiles folder, an entry is made in the cache segment(CrmFiles). An event rule is auto-configured to check for entries in this segment. Whenever there is data insertion in the segment, it invokes the crm_bulk_job_initiator(Event) function. This function handles the logic to download a copy of the .csv file from the CrmFiles folder into a temporary folder inside the function's directory. This folder will also be pre-configured in the function's directory upon the installation of the CodeLib solution.
We have used Zoho CRM's Bulk File Upload API in the event function, which takes the file input from the temporary folder and uploads it to the Zoho CRM server. Also note that you will need to configure the CLIENT_ID, CLIENT_SECRET and REFRESH_TOKEN credentials you generated while creating the self-client application previously, in the event function to securely access the resources in your Zoho CRM account. For more details on the configurations to be made, please refer to the How to use section in the console.
The maximum data limit that can be uploaded to Zoho CRM during a single upload is configured as 25K rows. If your file contains records greater than the configured limit, the file will be split and processed in batches. You can check the number of records processed in the Catalyst DevOps Logs and also make a note of the assigned jobID. In order to check the status of the Bulk Upload job, you can then invoke the /status endpoint and pass the jobID in the request payload.
The split files are zipped together and the zip is passed to the Bulk File Upload API. The API returns a FileID as response. This File ID denotes the location of the file when it is uploaded to Zoho CRM servers initially. The File ID is then passed to the Bulk Write API, to write the file data to the specified module in Zoho CRM. Also note that, once the file is uploaded to Zoho CRM modules, the copy of the original file will be permanently deleted from Catalyst end in the File Store, the temporary folder and also from the cache segment.
Note :
- The Catalyst resources pre-configured as a part of the CodeLib solution are not subject to HIPPA complaints. If you are working with ePHI and other sensitive user data, we strongly recommend you to make use of Catalyst's HIPAA compliance support.
- You can get more detailed information on the steps to install and configure the Zoho CRM Bulk Import CodeLib solution from the Catalyst CodeLib section in your Catalyst console.
Resources Involved:
The following Catalyst resources are auto-configured and used as a part of the Zoho CRM Bulk Import CodeLib solution:
1. Catalyst Serverless Functions : The crm_bulk_job_service(Advanced I/O) function handles the logic to upload the file from user's local system to a pre-configured folder(CrmFiles) in the File Store.
The crm_bulk_job_initiator(Event) function is invoked when the Advanced I/O function uploads the file to the CrmFiles folder and an entry is made in the pre-configured cache segment(CrmFiles). This function handles the logic to upload the file to CRM servers using the Bulk File Upload API and then write the file to the specific CRM module using the Bulk Write API.
2. Catalyst Cloud Scale File Store : We have used the Catalyst File Store component in the Zoho CRM Bulk Import CodeLib solution for the purpose of storing the files uploaded from the user's local system and uploading it to the Zoho CRM module.
3. Catalyst Cloud Scale Event Listener : A rule in the default Event Listener is pre-configured to execute the event function(crm_bulk_job_initiator) whenever data insertion operation happens in the cache segment(CrmFiles).
4. Catalyst Cloud Scale Cache : The cache segment(CrmFiles) is used to temporarily store the metadata of the file and the CRM credentials information, and is configured with an event rule to invoke the corresponding event function.