Introduction
This Step-by-step guide outlines the updated process for migrating attachments from Salesforce to Zoho CRM using Zoho Analytics and Zoho WorkDrive. As of Dec 17, 2024, you can accomplish this by implementing folder processing limits and automating large volumes of attachments moving to processed folders to prevent timeout errors.
If your company is transitioning from Salesforce to Zoho CRM and dealing with these large volumes of attachments, you’re in the right place!
Objective
To guide the migration process from Salesforce to Zoho CRM, ensuring accurate data transfer and efficient handling of attachments, especially when dealing with large volumes.
1. What you’ll need:
Access to Zoho Analytics and Zoho WorkDrive.
Administrative privileges in Zoho CRM.
Salesforce export containing attachments.
Updated migration code (see section 5. Updated Code for download).
2. Key Steps
2.1 Set Up Zoho Analytics
1. Create “Accounts Migration” Table:
Fields:
- ZCRM Account ID
- Account Name
- SF ID
2. Create “Attachments Migration” Table:
Fields:
- Attachment Id – Unique identifier for each attachment.
- File Name – Original name of the file.
- Parent Id – Zoho CRM Account ID the file is associated with.
- Created By Id – Typically the Zoho admin ID.
- Modified By Id – Typically the Zoho admin ID.
- Attachment Owner Id – Typically the Zoho admin ID.
- Created Time – Format: DD/MM/YYYY HH:MM:SS (e.g., 16/01/2023 14:30:01).
- Modified Time – Format: DD/MM/YYYY HH:MM:SS (e.g., 16/01/2023 14:30:01).
3. Rename the “Attachments Migration” Table:
- Rename to Attachments before uploading to Zoho CRM after downloading.
4. Obtain Workspace ID and View ID:
- Note down the Workspace ID and View ID for both “Accounts Migration” and “Attachments Migration” tables. This can be found in the URL.
2.2 Configure Zoho WorkDrive
1. Organize Folders
- Parent Folder:
Ensure a Parent Folder contains child folders named after Salesforce Account IDs.
- Attachments Folder:
Create a separate folder named Attachments for uploading files. This folder will store all uniquely named files.
- Processed Folder:
Create a “Processed Folder”
Create an additional folder named Processed within Zoho WorkDrive. This folder will be used to store all child folders after their attachments have been successfully processed and migrated. This helps in managing large datasets by preventing reprocessing of already migrated folders.
2. Obtain Folder IDs:
- Parent Folder ID: Note down the Folder ID of the Parent Folder containing Salesforce Account ID-named child folders.
- Attachments Folder ID: Note down the Folder ID for the Attachments folder where files will be uploaded.
- Processed Folder ID: Note down the Folder ID for the Processed folder where processed folders will be moved.
Summary of Folder IDs to Obtain:
- Parent Folder ID: Identifier for the main folder containing account-specific child folders.
- Attachments Folder ID: Identifier for the folder designated for storing unique attachment files.
- Processed Folder ID: Identifier for the folder where processed account folders will be moved to avoid reprocessing.
2.3 Execute Updated Migration Code in Zoho CRM
1. Access Zoho CRM as a Standalone Function:
Navigate to Setup > Developer Space > Functions.
Create a new function and paste the updated migration code provided below.
Ensure all placeholders (e.g., parentFolderId, attachmentsFolderId, processedFolderId, etc.) are correctly filled with your Zoho WorkDrive and Analytics details.
2. Run the Function:
Execute the function to initiate the migration process.
The Function Handles:
– Fetching folders and files from Zoho WorkDrive.
– Limiting the number of folders processed at a time to prevent timeouts.
– Moving processed folders to the designated Processed folder.
– Generating unique Attachment IDs.
– Preparing data for Zoho Analytics.
2.4. Export Data from Zoho Analytics
1. Export CSV Files:
Export the Accounts Migration and Attachments Migration tables as CSV files.
2. Download Attachments
- Verify that all unique file names are present in the Attachments folder.
- Download the Attachments folder as an Attachments.zip file, ensuring the folder name is Attachments.
2.5. Import Data to Zoho CRM
1. Access Import Settings:
Navigate to Zoho CRM > Settings > Data Administration > Import.
2. Choose Import Source:
Select Other CRM as the source.
3. Upload CSV and ZIP Files:
Upload the following files:
- Accounts.csv
- Attachments.csv
- Attachments.zip (Ensure the ZIP contains the Attachments folder with all unique files.)
4. Map Fields Correctly
Ensure that all fields from the CSV files are correctly mapped to Zoho CRM fields.
5. Start Migration:
- Initiate the import process and monitor for any errors.
2.6. Deduplicate Accounts
1. Use Deduplication Feature:
After a successful migration, use Zoho CRM’s deduplication tool to merge any duplicate account records.
2. Select Primary Records:
Choose the primary source for each duplicate and resolve discrepancies.
3. Cautionary Notes
File and Folder Naming:
- Ensure accurate and consistent naming of files and folders to prevent migration errors.
Data Structure Alignment:
- Verify that the data structures in Zoho Analytics match those in Zoho CRM to ensure a seamless data transfer.
Field Mapping Consistency:
- Maintain consistent field mappings during import to avoid data discrepancies.
4. Tips for Efficiency
Monitor Migration Progress:
Regularly check the migration progress and address any skipped files or errors promptly.
Verify Data Integrity:
At each stage of the migration, verify that the data integrity is maintained.
Batch Processing:
Utilize the folder processing limits to handle large volumes efficiently without system timeouts.
5. Updated Migration Code
Please enter your email below for the free updated migration code.
Key Updates in the Code:
Processing Limit: Added a limit variable to restrict the number of folders processed in a single run (e.g., limit = 20). This prevents the function from timing out when dealing with large volumes of attachments.
Processed Folder Handling: After processing each folder, it is moved to a processedFolderId to ensure that the same folder is not processed again in subsequent runs. This is crucial for managing large datasets efficiently.
Unique Attachment ID Generation: Enhance the uniqueness of Attachment IDs by appending a timestamp and a random number, ensuring that each attachment is uniquely identifiable.
Error Handling and Logging: Included info statements (commented out) that can be enabled for debugging purposes to track the migration progress and identify issues.
6. Post-Migration Steps
1. Verify Migration:
Check Zoho CRM to ensure that all accounts and attachments have been imported correctly.
Validate that attachments are correctly linked to their respective accounts.
2. Clean Up:
Ensure that the Processed folder contains all the folders that have been migrated.
Maintain the integrity of the migration by not altering the Processed folder.
3. Monitor for Issues:
Continuously monitor Zoho Analytics and Zoho CRM for any discrepancies or errors.
Address any issues promptly to maintain data integrity.
At Z1 Consultant, we specialize in helping businesses navigate and customize features like these. If you’d like expert guidance on implementing Deluge code or optimizing your current CRM setup, schedule a call with us today.
Good luck, and don’t hesitate to reach out if you need any more guidance on using ZOHO CRM!






