How to make a GoTo Connect Bot in Zoho CRM

How to make a GoTo Connect Bot in Zoho CRM




Code below:


extension = "gotoconnectmessagingsmstextingextension";
Lead = zoho.crm.getRecordById("Leads",LeadID);
//your authorized phone number with GoTo
fromPhone = "+15615551212";
//Your Record ID to the GoTo Bot 1st record
id = 5512116000007632006;  
targetNumber = Lead.get("Phone");
if(!targetNumber.startsWith("+1"))
{
targetNumber = "+1" + targetNumber;
}
template = zoho.crm.getRecordById(extension + "__GoTo_Response_Bot",id);
templateId = template.get("id");
msg = template.get("Message");
newRecord = Map();
firstName = Lead.get("First_Name");
lastName = Lead.get("Last_Name");
newRecord.put(extension + "__Leads",LeadID);
newRecord.put("Name","To " + ifnull(firstName,"") + " " + ifnull(lastName,"") + "(" + targetNumber + ")");
newRecord.put(extension + "__Inbound",false);
newRecord.put(extension + "__TextSmall",msg);
newRecord.put(extension + "__From",fromPhone);
newRecord.put(extension + "__To",targetNumber);
newRecord.put("Bot_Template",templateId);
resp = zoho.crm.createRecord(extension + "__GoTo_SMS",newRecord,{"trigger":{"workflow"}});
info resp;
Go ahead and reach out to us for custom programming:

IMPORTANT: Each questions must always have A and B answer combos like Yes or No.