Hello all,
I'm in dire need of a solution. I have desperately tried to get this to work but to no avail. I need a solution for lead assignment that will work for NON Zoho Webforms (Google ClickID and Generic), and ALL leads that enter the CRM. I need lead assignment based on different times. Example below
Leads - Weekday 9AM-5PM go to 2 users
Leads - Weekday 5PM - 9PM go to 1 user
Leads - Weekends 7am - 9PM go to 1 user
4 Users total with different Shift Times
Assignment rules will not work because I have a lot of leads that come in through non Zoho web forms (Google Ads, etc). I have tried this custom function and it doesn't work either. I really need a solution for this as my off hours employees are stuck in the mud currently.
Is there a way to assign ANY lead that enters the system based on shifts?
leadDetails = zoho.crm.getRecordById("Leads",leadId);
createdday = ifnull(leadDetails.get("Created_Time"),"");
createdday = createdday.toDate().getDayOfWeek();
if(createdday = 1 || createdday = 7)
{
mp = Map();
mp.put("Owner",1993905000038075001);
update = zoho.crm.updateRecord("Leads",leadId.toLong(),mp);
info update;
}