Replicate Zoho Sign UI in Deluge script
I'm trying to write a Deluge function for sending document sign link via SMS
With my current deluge script, I can get the sing link delivered by email, no SMS
- info zoho.currenttime.addHour(17);
- deal = zoho.crm.getRecordById("Deals",id);
- account = zoho.crm.getRecordById("Accounts",deal.get("Account_Name").get("id"));
- contact = zoho.crm.getRecordById("Contacts",deal.get("Contact_Name").get("id"));
- documentid = "9ovp116285db24942421486c5f3db4f382077";
- url = "https://zohoapis.com/writer/api/v1/documents/" + documentid + "/merge/sign";
- // change to data merge sign
- fields = Map();
- fields.put("Account_Name.Account_Name",account.get("Account_Name"));
- fields.put("Account_Name.ACN",account.get("ACN"));
- fields.put("Account_Name.Billing_Street",account.get("Billing_Street"));
- fields.put("Account_Name.Billing_Street_2",account.get("Billing_Street_2"));
- fields.put("Account_Name.Billing_City",account.get("Billing_City"));
- fields.put("Account_Name.Billing_State",account.get("Billing_State"));
- fields.put("Account_Name.Billing_Code",account.get("Billing_Code"));
- fields.put("Account_Name.ABN",account.get("ABN"));
- fields.put("Account_Name.Trading_Name",account.get("Trading_Name"));
- fields.put("Account_Name.Trustee_Name",account.get("Trustee_Name"));
- fields.put("Director_1_Name",deal.get("Director_1_Name"));
- fields.put("Currency_Code",deal.get("Currency_Code"));
- fields.put("Amount",deal.get("Amount"));
- data = Map();
- data.put("data",fields);
- params = Map();
- signerList = List();
- signerObj1 = Map();
- signerObj1.put("recipient_1","vit@lend.com.au");
- signerObj1.put("action_type","sign");
- signerObj1.put("recipient1_countrycode","+61");
- signerObj1.put("recipient1_phonenumber","123456789");
- signerObj1.put("language","en");
- signerList.add(signerObj1);
- params.put("signer_data",signerList);
- params.put("merge_data",data);
- params.put("service_name","zohosign");
- params.put("filename","Account Terms - " + deal.get("App_ID") + " - " + account.get("Account_Name"));
- documentObj = invokeurl
- [
- url :url
- type :POST
- parameters:params
- connection:"newzohosignconn"
- ];
- info "documentObj :";
- info documentObj;
There is no even an option like in UI "Email" or "Email+SMS", I don't know if that is even possible in the Deluge script. The documentation doesn't explain anything
Please, advise.