Workflow Rules in Zoho CRM are a set of actions including email notifications, and field updates that are executed when specific conditions are met. You can create a workflow rule and set an action to automate Writer's Mail Merge Tasks. (Ex: Merge and email, merge and download, merge and store)
Click
here for detailed steps on how to create a workflow rule in Zoho CRM and associate custom function as an instant action. Once you chose custom function as an instant action, do the following:
- You need to write a new custom function in the Deluge script editor and associate with the Workflow rule to automate Writer's mail merge tasks.
- Choose Write your own option from the Configure Function pop-up.
- In the following Create new function pop-up, enter a function name, display name, and select the module to associate the custom function. Click Next.
- Now start writing your custom function in the Deluge script editor. Click here to find the steps to programming custom functions in the Deluge script editor.
Write your own custom function
Here are the available Writer tasks you can automate by creating a workflow.
Refer the below examples and sample code for creating a workflow rule to automate Writer's mail merge tasks - Merge and Send and Merge and Store.
Merge and Send
To merge a CRM record data with merge fields and send email automatically.
Syntax
<response> = zoho.writer.mergeAndSend(<document_id>, <output_format>, <email_id>, <values_map>, <connection>);
Refer to
this page for more details and examples of Merge and Send task.
Merge and Store
To merge CRM record data and save the merge documents in Writer's folder automatically.
Syntax
<response> = zoho.writer.mergeAndStore(<document_id>, <output_format>, <email_id>, <values_map>, <connection>);
Refer to this page for more details and examples of Merge and Store task.