For Zoho Services only:


I'm actually part of a bigger team at Ascent Business Solutions where we have support technicians and project consultants. Support is for smaller technical fixes but this can include developments, reports or integrations; depending on the size of the task. Projects are for more time-consuming developments such as revamps of the Zoho Suite of apps or on-site training. The advantage of a team is that if I am out-of-office for a day or so, there is always someone at Ascent Business Solutions who can deal with any queries/issues you may have.

Our support rates can be found and purchased at http://ascentbusiness.co.uk/zoho-support-2. A support bundle doesn't have an expiry date. So whether we can do what you want within the bundle and a year later need further support, if there are minutes left on the bundle then there is no additional charge.

Our project rates for bigger developments can be found at http://ascentbusiness.co.uk/crm-solutions/zoho-crm-packages-prices and will involve a dedicated project consultant along with developers who will hold your hand through the development process.

If you want help building a solution for one of the Zoho Apps in the Zoho Suite, contact us on 0121 293 8140 (UK) or by email at info@ascentbusiness.co.uk. You can also visit our website at http://ascentbusiness.co.uk.

I regularly build and specialize in 2-way API integrations for Xero, Shopify and eBay.

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 :: Article: 788

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: The information on this website is provided without warranty and any content is merely the opinion of the author. Please try to test in development environments prior to adapting them to your production environments. The articles are written in good faith and, at the time of print, are working examples used 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

Related Articles

Joes Revolver Map

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin - Valid till 8 May 2022 3QnhmaBX7LQSRsC9hh6Je9rGQKEGNQNfPb
© 2021 Joel Lipman .com. All Rights Reserved.