Auto-schedule unanswered calls

Automatically schedule a follow-up call in your CRM three days after the initial call attempt goes unanswered.

It is crucial to maintain regular communication with the contacts in your CRM to establish and maintain a strong customer relationship. By setting up regular check-ins, you can stay on your customers' minds and address any concerns they may have. However, if one of those calls goes unanswered or gets directed to voicemail, your outreach efforts may fall through the cracks.

In such circumstances, you can use our low-code tools to schedule the call x days after they went unanswered automatically. To schedule a call, create a custom function and connect it to a workflow rule that triggers whenever a call goes unanswered in your CRM. This ensures that your team doesn't miss any important calls and stays organized.

Permissions and availability

  • Users with the Manage Automation permission can create and update workflow rules.
  • Users with the Manage Extensibility permission can write custom functions.
  • Users with the Manage Sandbox permission can manage the sandbox.

Requirements

  • Create a workflow rule for the Calls module that will trigger when an outbound call with a duration of 00:00 is logged. Learn more
  • Write a custom Deluge function that schedules a follow-up phone call three days after an initial unanswered call. The subject and owner of this call can be customized to fit specific needs. Learn more
  • Test the workflow rule in a sandbox before deploying it in your production environment. Learn more

Create a workflow rule

  1. Navigate to Setup > Workflow Rules > +Create Rule.
  2. Select the Module as Calls from the drop-down list.
  3. Provide a name for the rule. For example: "Schedule outbound call".
  4. Add a description, if required, then click Next.
  5. In the Execute this workflow rule based on section, do the following:
    1. Choose Record Action, then select <Outgoing call> is <logged or modified> from the drop-down.
    2. Click Next.
  6. In the Which calls would you like to apply the rule to? section, do the following:
    1. In Would you like to set conditions for call properties?, select Yes.
    2. Specify the condition as <Call Duration> is <00:00>.
    3. In Apply this rule to, choose Contact.
    4. In Which contacts would you like to apply this rule to?, select All Contacts.
    5. Click Next.
  7. Under Instant Actions, select Function and Write your own.
  8. Provide a Name and optional description for the function.
  9. On the Deluge Script Editor, do the following:
    1. Copy and paste the code given below.
    2. Click Edit Arguments.
    3. Choose Accounts - Account Id, and name it as accountId.
    4. Click the + icon to add more arguments.
    5. Choose Contacts - Contact Id, and name it as contactId, then click Save.
    6. Click Save & Execute Script.
  10. Click Save on the workflow rule page.
Create Workflow Rule

The code

Code Copied
contactDetails = zoho.crm.getRecordById("Contacts",contactId);
//Enter how many days after the initial call you would like to schedule
createdtime = ifnull(contactDetails.get("Created_Time"),"").toTime("yyyy-MM-dd'T'HH:mm:ss").addDay(3);
relrec=zoho.crm.getRelatedRecords("Calls_History", "Contacts", contactId);
if(relrec.size()>0)
{
if(relrec.get(0).get("Call_Duration")=="00:00")
{
 createdtime = ifnull(relrec.get(0).get("Call_Start_Time"),"").toTime("yyyy-MM-dd'T'HH:mm:ss").addDay(3);
}
}
mp = Map();
acctname = ifnull(contactDetails.get("Account_Name"),"");
if(acctname != "")
{
	acctid = acctname.get("id");
	accountDetails = zoho.crm.getRecordById("Accounts",acctid);
	mp.put("$se_module","Accounts");
	mp.put("What_Id",accountId);
}
//Specify the details for the scheduled call
mp.put("Subject","Scheduled for Unanswered Call");
mp.put("Owner",ifnull(contactDetails.get("Owner"),"").get("id"));
mp.put("Call_Type","Outbound");
mp.put("Who_Id",contactId);
mp.put("Call_Start_Time",createdtime.toString("yyyy-MM-dd'T'HH:mm:ss+02:00"));
mp.put("$which_call","ScheduleCall");
create = zoho.crm.createRecord("Calls",mp);
info mp;
info create;

Notes

  • You can customize the number of days after which you want to schedule a follow-up call by modifying the "addDay(3)" syntax.
  • Make sure you update the script with the accurate API name of their corresponding fields. Learn more
  • The above script is an example of scheduling a follow-up call for contacts who didn't answer their initial call. You can customize and use this code for the Leads module.

Tip

  • Configure and test the function in a sandbox to ensure that further development doesn't disrupt your production environment.

Test the solution

  1. Navigate to Calls > Create Call > Log a call.
  2. In the Log a call pop-up window, do the following:
    1. Look up and choose the appropriate contact and account in the Call To and Related To fields. 
    2. Select Call Type as Outbound.
    3. Specify the Call Duration as 00 minutes 00 seconds and click Save.
  3. Check whether a scheduled call has been created for the contact three days after the date and time of the above call.

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

  • ModuleCalls
  • Trigger PointWorkflow Rule
  • EditionEnterprise and above
  • ComplexityMedium
  • Implementation Time30 minutes

Features used in the solution

Workflow RuleDeluge ScriptSandbox
Story Image

Looking for a custom solution?

Contact us, we will help enhance your productivity at lightning speed.

SUBMIT REQUEST

Developers: Share your solution with our community!