Efficiently managing outbound calls to potential customers is a crucial part of CRM. Your sales team must keep a record of all calls made, track the outcomes of each call, and follow up when necessary to prioritize and engage with leads based on their sales potential.
A common way to streamline outbound calls is to add a picklist field in the leads module that offers various call outcomes to select from. To ensure all necessary information is recorded, create a custom function workflow rule that adds a call record with call notes, timestamps, and the call owner every time you select an outcome from the picklist field. To learn more, please read the sections below.
Permissions and availability
- Users with the Modules Customization permission can add custom fields.
- Users with the Manage Automation permission can create and update workflow rules.
- Users with the Manage Extensibility permission can create custom functions.
- Users with the Manage Sandbox permission can manage the sandbox.
Requirements
- Add a picklist field and a multi-line field in the Leads module. The picklist field will offer different call outcomes, while you can use the multi-line field to record call notes. Learn more
- Create a workflow rule for the Leads module that triggers every time you choose an outcome from the picklist field. Learn more
- Write a custom Deluge function and link it up with the workflow rule. Learn more
- Test the workflow rule in a sandbox before deploying it to your production environment. Learn more
Add custom fields
The first step is adding the custom picklist and multi-line fields to the Leads module.
- Navigate to Setup > Customization > Modules and Fields.
- Click the Leads module to open the layout editor.
- Drag and drop the picklist field from the New Fields tray to the desired section of the layout.
- Name the pick list field (e.g. "Call Log"), enter the options, and define its properties as required.
You can enter multiple options such as Connected - Bad Timing, Connected - Success, No Answer, Left Voicemail, Wrong Number, and Gatekeeper/Phone Tree. - Similarly, drag and drop the multi-line field from the New Fields tray to the desired section of the layout.
- Name the multi-line field (e.g. "Call Notes") and define its properties as required.
- Once you have finished, select Done and then click Save and Close.
Create a workflow rule
The next step is to create a workflow rule in your Zoho CRM account:
- Navigate to Setup > Workflow Rules > +Create Rule.
- Select Leads from the module dropdown list.
- Provide a name for the rule. For example: "Create call record for outbound calls".
- Add a description (optional) and then click Next.
- In the Execute this workflow rule based on section, choose Record Action, then select Edit from the dropdown.
- Select Specific field(s) get modified and specify the condition as "When <Call Log> is modified to <any value>".
- In the Which leads would you like to apply the rule to? section, specify the condition as "<Call Log> is <not empty>" and click Next.
- Under Instant Actions, select Function and Write your own.
- Provide a name and description, if necessary, for the function.
- On the Deluge Script Editor, do the following:
- Copy and paste the code given below.
- Click Edit Arguments.
- Choose Leads - Lead Id and name it as leadId, then click Save.
- Click Save & Execute Script.
- Click Save on the workflow rule page.
The code
leadDetails = zoho.crm.getRecordById("Leads",input.leadId.toLong());
info "lead details : " + leadDetails;
ownerId=leadDetails.get("Owner").get("id");
firstName=ifnull(leadDetails.get("First_Name"),"");
lastName=ifnull(leadDetails.get("Last_Name"),"");
logCall=ifnull(leadDetails.get("Call_Log"),"");
callNotes=ifnull(leadDetails.get("Call_Notes"),"");
ctTime=zoho.currenttime.toString("yyyy-MM-dd'T'HH:mm:ss'+05:30'");
callMap=map();
callMap.put("Subject",logCall + " with" + " " + firstName + " " + lastName);
callMap.put("Owner",ownerId);
callMap.put("Call_Start_Time",ctTime);
callMap.put("Call_Type","Outbound");
callMap.put("Description",callNotes);
callMap.put("What_Id",leadId);
callMap.put("$se_module","Leads");
info "call map : " + callMap;
createcall = zoho.crm.create("Calls",callMap);
info "create call : " + createcall;
leadDetails.put("Call_Log","-None-");
leadDetails.put("Call_Notes","");
update_resp = zoho.crm.updateRecord("Leads",input.leadId.toString(),leadDetails);
info "update resp : " + update_resp;
Notes
- Make sure to use the accurate API names for their corresponding fields in the code snippet. Learn more
- You can also trigger this function via a custom button in the Leads module. Just make sure to add return "success"; at the end of the script.
- The script above is an example of creating an outbound call record with call notes, timestamps, and the call owner whenever you select an outcome from the lead's custom picklist field. You can use this code for any other module, such as Contacts, by modifying the module name and other parameters.
Test the solution
- Go to the Leads module and click on the desired lead.
- On the Lead Details page, enter call notes and choose a value for the Call Log field.
The workflow rule will be triggered. - Check whether a new call record gets created with the lead details, call notes, timestamps, and the owner.
Did you find this useful? Try it out and let us know how it works. Share this with your team if they'd benefit from it! If you have questions, please don't hesitate to contact us.
More info
- ModuleLeads
- Trigger PointWorkflow Rule
- EditionEnterprise and above
- ComplexityMedium
- Implementation Time30 minutes

Looking for a custom solution?
Contact us, we will help enhance your productivity at lightning speed.
SUBMIT REQUEST