Harnessing Rich Text Fields and Deluge Functions in Zoho CRM
Introduction:
In Zoho CRM, the combination of Rich Text fields and Deluge functions can unlock a powerful capability to integrate email content from related records. This blog post explores how you can use Deluge functions to iterate through information on related records and seamlessly merge it into Rich Text fields for email content in Zoho CRM.
Step 1: Setting Up Rich Text Field
1. Go to the desired module in Zoho CRM for storing email content.
2. Click “Settings” > “Customization” > select the module > “Fields.”
3. Add a new field with type “Rich Text,” providing an appropriate name before saving the changes.
Step 2: Formatting and Merging Email Content
1. Input the email content into an email template. You can use text, images, links, etc.
2. Utilize the Rich Text editor tools for formatting, including font styles, colors, alignment, etc.
3. Place the Rich Text Field merge tag in the body of the email where you want the related records content.
Step 3: Leveraging Deluge Functions for Dynamic Content
1. Write a Deluge function to retrieve information from related modules or associated records.
2. Iterate through the fetched data to extract required details and assign them to variables.
3. Incorporate these variables dynamically into the Rich Text field within the Deluge script.
Step 4: Sending Personalized and Dynamic Emails
1. While drafting an email in Zoho CRM, select the email template containing the Rich Text field.
2. Zoho CRM can populate the template with the dynamic content retrieved using Deluge functions.
3. Ensure that the email reflects the merged data from related records for a personalized communication approach.
Conclusion:
By combining the capabilities of Rich Text fields and Deluge functions in Zoho CRM, you can revolutionize your email content merge process. The ability to dynamically fetch and merge data from related records using Deluge scripting enhances personalization and customization in your email communications. Embrace this methodology to create impactful and tailored email templates, fostering engagement and driving meaningful interactions with your contacts in Zoho CRM.
Example:
A construction management company works on RFPs it is pursuing out of the Deals module. Each RFP has at least one, but potentially many, Projects within, each with their own details. It is sometimes necessary to email about the RFP as a whole, including any related projects.
Commented Code:
// Fetch the Deal record using the provided DEAL_ID
dealRecord = zoho.crm.getRecordById(“Deals”, DEAL_ID);
// Get all related records from the “Related_Projects” related list under the “Deals” module
getProjects = zoho.crm.getRelatedRecords(“Related_Projects”, “Deals”, DEAL_ID);
// Output the list of related projects for debugging purposes
info getProjects;
// Initialize an empty string to store the snippets for each project
snippetList = “”;
// Iterate through each related project
for each project in getProjects
{
// Get the Project ID from the current project record
PROJECT_ID = project.get(“id”);
// Fetch the complete project record from the “Pursuit_Projects” module using the Project ID
projectRecord = zoho.crm.getRecordById(“Pursuit_Projects”, PROJECT_ID);
// Get the Project Name from the project record
Project_Name = projectRecord.get(“Name”);
Architect_Name = projectRecord.get(“Architect_Company”).get(“name”);
Estimated_Start = projectRecord.get(“Estimated_Start_Date”);
Estimated_End = projectRecord.get(“Estimated_End_Date”);
Budget = projectRecord.get(“Estimated_Project_Budget”).toString();
Size_in_Square_Feet = projectRecord.get(“Size_in_Square_Feet”);
Scope_of_Work = projectRecord.get(“Scope_of_Work”);
// Create an HTML snippet with the project’s details
projectSnippet = “<b>Project Name: </b>” + Project_Name + “<br><b>Architect: </b>” + Architect_Name + “<br><b>Timeframe: </b>” + Estimated_Start + “-” + Estimated_End + “<br><b>Estimated Budget: </b>$” + Budget + “<br><b>SF: </b>” + Size_in_Square_Feet + “<br><b>Scope of Work: </b>” + Scope_of_Work + “<br><br>”;
// Append the project snippet to the list of snippets
snippetList = snippetList + projectSnippet;
}
// Output the complete list of project snippets for debugging purposes
info snippetList;
// Create a map to update the “Email_Content” field in the Deal record with the snippets
updateMap = Map();
updateMap.put(“Email_Content”, snippetList);
// Update the Deal record with the new email content and trigger any associated workflows
updateDeal = zoho.crm.updateRecord(“Deals”, DEAL_ID, updateMap, {“trigger”: {“workflow”}});
Recent Comments