Zoho

D7SMS-ZohoCRM-WebHook

Add the following entries as given below:

Send Unicode in D7 SMS
  • Under Append Entity Parameters

  • Add the following parameters from d7sms extension

  • username

  • password

  • from

  • Add parameter “to” from the Module you selected

Code by Zapier
  • Add Message content here as plain text

Run Python
  • Preview URL will be like:

http://http-api.d7networks.com/send?username=${ilyas.d7sms.Authuser}&password=${ilyas.d7s ms.Authpass}&
to=${Leads.Mobile}&from=${ilyas.d7sms.Msg From}&content=This is a test content
code snippet

D7SMS-ZohoCRM Send SMS from Custom Function

Add Arguments for the function as given below:

  • For Module ​Leads,​ ID = Lead ID

  • For Module ​Contact,​ ID = Contact ID

Send SMS from Custom Function zoho
Send SMS from Custom Function zoho
  • Add following code for ​Contact​ Module

messageToBeSent = "TEST Content";
resp = zoho.crm.getRecordById("Contacts",ID);
Mobile = resp.get("Mobile");
d7smsAccUsr = zoho.crm.getOrgVariable("d7sms.Authuser");
d7smsAccPass = zoho.crm.getOrgVariable("d7sms.Authpass");
d7smsfrom = zoho.crm.getOrgVariable("d7sms__from");
mappp = Map();
mappp.put("username",d7smsAccUsr);
mappp.put("password",d7smsAccPass);
mappp.put("from",d7smsfrom);
mappp.put("content",messageToBeSent);
ph_num = Mobile.replaceAll("[^0-9]","");
if(ph_num.length() > 6)
{
    mappp.put("to",ph_num);
    respp = postUrl("http://http-api.d7networks.com/send?",mappp); if(respp.startsWith("Success"))
    {
    status = "Success"; }
    else {
    status = "Error"; }
    updateMap = {
        "Name":"SMS Generated from Custom function",
        "d7sms__Message":messageToBeSent,
        "d7sms__Source":d7smsfrom,"
        d7sms__Destination":ph_num,
        "d7sms__Direction":"Outgoing",
        "d7sms__Status": status,
        "d7sms__Contact":ID
    };
    m = Map();
    l = List();
    l.add(updateMap); m.put("module","d7sms__D7SMS");
    m.put("data",l);
    resp = zoho.crm.invokeConnector("crm.create",m);
}
  • Add following code for ​Leads​ Module:

messageToBeSent = "TEST Content";
resp = zoho.crm.getRecordById("Leads",ID);
Mobile = resp.get("Mobile");
d7smsAccUsr = zoho.crm.getOrgVariable("d7sms.Authuser");
d7smsAccPass = zoho.crm.getOrgVariable("d7sms.Authpass");
d7smsfrom = zoho.crm.getOrgVariable("d7sms__from"); mappp = Map();
mappp.put("username",d7smsAccUsr);
mappp.put("password",d7smsAccPass);
mappp.put("from",d7smsfrom);
mappp.put("content",messageToBeSent);
ph_num = Mobile.replaceAll("[^0-9]","");
if(ph_num.length() > 6){
    mappp.put("to",ph_num);
    respp = postUrl("http://http-api.d7networks.com/send?",mappp);
    if(respp.startsWith("Success")){
        status = "Success";
    }
    else {
        status = "Error";
    }
    updateMap = {
        "Name":"SMS Generated from Custom function",
        "d7sms__Message":messageToBeSent,
        "d7sms__Source":d7smsfrom,
        "d7sms __Destination":ph_num,
        "d7sms__Direction":"Outgoing",
        "d7sms__Status":status,"d7sms __Lead":ID
    };
    m = Map();
    l = List();
    l.add(updateMap); m.put("module","d7sms__D7SMS");
    m.put("data",l);
    resp = zoho.crm.invokeConnector("crm.create",m);
}