For Zoho services only


I'm currently part of a wider delivery team at Ascent Business Solutions, recognised as a leading Zoho Premium Solutions Partner in the United Kingdom.

Ascent Business Solutions support organisations with everything from targeted technical fixes through to full Zoho CRM implementations and long-term platform adoption. Working as a team rather than a one-person consultancy allows projects to move forward consistently, with access to the right skills at each stage.

The team I manage specialises in API integrations between Zoho and third-party finance and commerce platforms such as Xero, Shopify, WooCommerce, and eBay. Much of our work involves solving integration challenges that fall outside standard documentation, supporting new ideas, new sectors, and evolving business models.

Success is measured through practical outcomes and return on investment, ranging from scaling small operations into high-turnover businesses to delivering rapid gains through online payments, automation, and streamlined digital workflows.

If you are looking for structured Zoho expertise backed by an established consultancy, you can contact Ascent Business Solutions on 0121 392 8140 (UK), email info@ascentbusiness.co.uk, or visit https://www.ascentbusiness.co.uk.
Zoho CRM: Schedule a Call using Deluge

Zoho CRM: Schedule a Call using Deluge

What?
This is an article to document how to schedule a call with a reminder in Zoho CRM using Zoho Deluge.

Why?
Because I find a need to document anything that takes longer than 30 minutes to figure out so I don't spend so long the next time I have to do it. The use-case scenario here is that when an appointment is made for a Lead in a booking system, we want a task or call in CRM to popup and remind us that we need to phone this Lead.

How?
It sounds straightforward: schedule a call using the GUI then write a test function to check the JSON that is being returned for API names... If that were the case, it would have been a 5 minute job. Instead, it's turned into over an hour of figuring this out. So here's a working snippet of code:
copyraw
// test to get the JSON response format
r_CallDetails = zoho.crm.getRecordById("Calls",123456789012345678);
info r_CallDetails;
//
// system/application is set to EST (America/New_York)
v_SystemCallTime = '2021-11-19 11:12:34';
//
// manual setting to specify system/application offset
v_ApplicationTimeOffset = "-05:00";
//
// customer is in (America/Los_Angeles)
v_CustomerCallTime = '2021-11-19 08:12:34';
//
// set system/application date time start in CRM format
v_SystemAppointmentDateTimeStart = v_SystemCallTime.toString("yyyy-MM-dd'T'HH:mm:00") + v_ApplicationTimeOffset;
//
// set system/application date time start in US format
v_CustomerAppointmentDateTimeStart = v_CustomerCallTime.toString("MM/dd/yy h:mma z");
//
// sample lead owner ID and lead ID record
v_LeadOwnerID = 5432109876543210987;
v_LeadID = 4321098765432109876;
v_CustomerName = "Test User";
//
// build map to schedule a call
m_ScheduleCall = Map();
m_ScheduleCall.put("$se_module","Leads");
m_ScheduleCall.put("Owner",v_LeadOwnerID);
m_ScheduleCall.put("What_Id",v_LeadID);
m_ScheduleCall.put("Subject","Scheduled Call with " + v_CustomerName);
m_ScheduleCall.put("Call_Start_Time",v_SystemAppointmentDateTimeStart);
m_ScheduleCall.put("Call_Status","Scheduled");
m_ScheduleCall.put("Call_Type","Outbound");
//
// optional fields
m_ScheduleCall.put("Call_Purpose","Prospecting");
m_ScheduleCall.put("Call_Agenda","A scheduled call to phone " + v_CustomerName + " at their time of " + v_CustomerAppointmentDateTimeStart);
//
// with a reminder 10 minutes before
m_ScheduleCall.put("Reminder","10 mins");
// not sure if this does anything. hopefully notifies the staff user
m_ScheduleCall.put("send_notification",true);
r_ScheduleCall = zoho.crm.createRecord("Calls", m_ScheduleCall);
info r_ScheduleCall;
  1.  // test to get the JSON response format 
  2.  r_CallDetails = zoho.crm.getRecordById("Calls",123456789012345678)
  3.  info r_CallDetails; 
  4.  // 
  5.  // system/application is set to EST (America/New_York) 
  6.  v_SystemCallTime = '2021-11-19 11:12:34'
  7.  // 
  8.  // manual setting to specify system/application offset 
  9.  v_ApplicationTimeOffset = "-05:00"
  10.  // 
  11.  // customer is in (America/Los_Angeles) 
  12.  v_CustomerCallTime = '2021-11-19 08:12:34'
  13.  // 
  14.  // set system/application date time start in CRM format 
  15.  v_SystemAppointmentDateTimeStart = v_SystemCallTime.toString("yyyy-MM-dd'T'HH:mm:00") + v_ApplicationTimeOffset; 
  16.  // 
  17.  // set system/application date time start in US format 
  18.  v_CustomerAppointmentDateTimeStart = v_CustomerCallTime.toString("MM/dd/yy h:mma z")
  19.  // 
  20.  // sample lead owner ID and lead ID record 
  21.  v_LeadOwnerID = 5432109876543210987
  22.  v_LeadID = 4321098765432109876
  23.  v_CustomerName = "Test User"
  24.  // 
  25.  // build map to schedule a call 
  26.  m_ScheduleCall = Map()
  27.  m_ScheduleCall.put("$se_module","Leads")
  28.  m_ScheduleCall.put("Owner",v_LeadOwnerID)
  29.  m_ScheduleCall.put("What_Id",v_LeadID)
  30.  m_ScheduleCall.put("Subject","Scheduled Call with " + v_CustomerName)
  31.  m_ScheduleCall.put("Call_Start_Time",v_SystemAppointmentDateTimeStart)
  32.  m_ScheduleCall.put("Call_Status","Scheduled")
  33.  m_ScheduleCall.put("Call_Type","Outbound")
  34.  // 
  35.  // optional fields 
  36.  m_ScheduleCall.put("Call_Purpose","Prospecting")
  37.  m_ScheduleCall.put("Call_Agenda","A scheduled call to phone " + v_CustomerName + " at their time of " + v_CustomerAppointmentDateTimeStart)
  38.  // 
  39.  // with a reminder 10 minutes before 
  40.  m_ScheduleCall.put("Reminder","10 mins")
  41.  // not sure if this does anything. hopefully notifies the staff user 
  42.  m_ScheduleCall.put("send_notification",true)
  43.  r_ScheduleCall = zoho.crm.createRecord("Calls", m_ScheduleCall)
  44.  info r_ScheduleCall; 

Error(s) Encountered:
  • {"code":"INVALID_DATA","details":{"expected_data_type":"datetime","api_name":"Call_Start_Time"},"message":"invalid data","status":"error"}
    correct Call_Start_Time to CRM format of yyyy-MM-ddTHH:mm:ss-05:00 or have you mapped the field twice?

  • {"code":"MANDATORY_NOT_FOUND","details":{"api_name":"Call_Type","json_path":"$.data[0].Call_Type"},"message":"Empty Call Type","status":"error"}
    ok specify a call_type

  • {"code":"INVALID_DATA","details":{"api_name":"Reminder"},"message":"invalid data","status":"error"}
    trying to submit a CRM date time when it just wants the dropdown option equivalent (eg. "10 mins", "1 hrs")

    Just as a refresher if this was a task and not a call:
    copyraw
    v_ReminderDate = v_SystemAppointmentDateTime.subMinutes(15);
    v_ReminderStr = "FREQ=NONE;ACTION=EMAILANDPOPUP;TRIGGER=DATE-TIME:" + v_ReminderDate.toString("yyyy-MM-dd'T'HH:mm:ss") + "-05:00";
    m_ReminderAlarm = Map();
    m_ReminderAlarm.put("ALARM",v_ReminderStr);
    m_CreateTask.put("Remind_At", m_ReminderAlarm);
    1.  v_ReminderDate = v_SystemAppointmentDateTime.subMinutes(15)
    2.  v_ReminderStr = "FREQ=NONE;ACTION=EMAILANDPOPUP;TRIGGER=DATE-TIME:" + v_ReminderDate.toString("yyyy-MM-dd'T'HH:mm:ss") + "-05:00"
    3.  m_ReminderAlarm = Map()
    4.  m_ReminderAlarm.put("ALARM",v_ReminderStr)
    5.  m_CreateTask.put("Remind_At", m_ReminderAlarm)



Source(s):
Category: Zoho CRM :: Article: 323

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com