Send for Signature via CRM

Send for Signature via CRM

Hi All,

I am trying to trigger a Zoho Sign Signature request custom function when a specific tag is added to a deal. I am having trouble with the Zoho Sign Request on line 57 - undefined variable

  1. recordmap.put("zohosign__Account",accountid);
I tried looking through the API literature but I feel like I am missing something. I have installed the Zoho CRM to Zoho Sign module + added Zoho Sign in Developer Space --> connections
  1. //Get the name, email, client # & booking # necessary fields to merge in the Zoho Sign Document
  2. record = zoho.crm.getRecordById("Deals",id);
  3. firstname = record.get("First_Name");
  4. lastname = record.get("Last_Name");
  5. name = firstname + "\n" + lastname;
  6. booking = record.get("Booking_Number");
  7. client = record.get("Client_Number");
  8. nameaddress = firstname + "\n" + lastname;
  9. email = record.get("Email");

  10. //Parameter map: to create a Zoho Sign document with prefilled fields using a Zoho Sign Template - Note:
  11. actionMap = Map();
  12. fieldTextData = Map();
  13. fieldTextData.put("Name and Address",nameaddress);
  14. actionMap.put("field_data",{"field_text_data":fieldTextData});
  15. eachActionMap1 = Map();
  16. eachActionMap1.put("recipient_name",name);
  17. eachActionMap1.put("recipient_email",email);
  18. eachActionMap1.put("Full_name",name);
  19. eachActionMap1.put("booking",booking);
  20. eachActionMap1.put("client",client);
  21. eachActionMap1.put("action_type","SIGN");
  22. eachActionMap1.put("action_id","111430000000143036");
  23. eachActionMap1.put("role","Client");
  24. eachActionMap1.put("verify_recipient","false");
  25. fieldList = List();
  26. fieldList.add(eachActionMap1);
  27. actionMap.put("actions",fieldList);
  28. submitMap = Map();
  29. submitMap.put("templates",actionMap);
  30. parameters = Map();
  31. parameters.put("is_quicksend","true");
  32. parameters.put("data",submitMap);

  33. //Send the Zoho Sign Template with the pre-filled fields to the desired recipient/ recipients
  34. response = zoho.sign.createUsingTemplate("273382000000083026",parameters);

  35. //Get the Template Name - used as the name for the record in the "ZohoSign Documents" module in Zoho CRM later
  36. template = zoho.sign.getTemplateById("273382000000083026");
  37. templatename = template.get("templates").get("template_name");

  38. //Get the Zoho Sign Document ID
  39. requests = response.get("requests");
  40. docs = requests.get("document_ids");
  41. docinfo = docs.get(0);
  42. docid = docinfo.get("document_id");

  43. //Get the Zoho Sign Request ID
  44. reqid = requests.get("request_id");
  45. docinfo = docs.get(0);
  46. docid = docinfo.get("document_id");

  47. //Create Map for CRM Record - ZohoSign Documents
  48. recordmap = Map();
  49. recordmap.put("Name",templatename);
  50. recordmap.put("zohosign__Account",accountid);
  51. recordmap.put("zohosign__Deal",dealid);
  52. recordmap.put("zohosign__Owner",deal.get("Owner").get("id"));
  53. recordmap.put("zohosign__Date_Sent",today);
  54. recordmap.put("zohosign__ZohoSign_Document_ID",docid);
  55. recordmap.put("zohosign__Module_Record_ID",dealid.toString());
  56. recordmap.put("zohosign__Document_Deadline",today.addDay(3)); //--> This is arbitrary
  57. recordmap.put("zohosign__Document_Status","Out for Signature");

  58. //Check Date and Frequency are additional fields created in the "ZohoSign Documents" CRM Module to control the email notification triggering and field update via workflow rule
  59. recordmap.put("Check_Date",today.addDay(1));
  60. recordmap.put("Frequency",0);
  61. recordmap.put("Request_ID",reqid);

  62. //Create a Record in the "ZohoSign Documents" module in Zoho CRM
  63. create = zoho.crm.createRecord("zohosign__ZohoSign_Documents",recordmap);





                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation
                                        • Sticky Posts

                                        • Zoho CRM Functions 53: Automatically name your Deals during lead conversion.

                                          Welcome back everyone! Last week's function was about automatically updating the recent Event date in the Accounts module. This week, it's going to be about automatically giving a custom Deal name whenever a lead is converted. Business scenario Deals are the most important records in CRM. After successful prospecting, the sales cycle is followed by deal creation, follow-up, and its subsequent closure. Being a critical function of your sales cycle, it's good to follow certain best practices. One such
                                        • Custom Function : Automatically send the Quote to the related contact

                                          Scenario: Automatically send the Quote to the related contact.  We create Quotes for customers regularly and when we want to send the quote to the customer, we have to send it manually. We can automate this, using Custom Functions. Based on a criteria, you can trigger a workflow rule and the custom function associated to the rule and automatically send the quote to customer through an email. Please note that the quote will be sent as an inline email content and not as a PDF attachment. Please follow
                                        • Function #50: Schedule Calls to records

                                          Welcome back everyone! Last week's function was about changing ownership of multiple records concurrently. This week, it's going to be about scheduling calls for records in various modules. Business scenario Calls are an integral part of most sales routines.. Sales, Management, Support, all the branches of the business structure would work in cohesion only through calls. You could say they are akin to engine oil, which is required by the engine to make all of it's components function perfectly. CRM
                                        • Function #37: Create a Purchase Order from a Quote

                                          Welcome back everyone! Last week, we learnt how to calculate the total number of activities for a lead and further take note of the activity count for particular dates. For instance, from the period of Demo to Negotiation. This week, let's look at a function that lets you create a Purchase Order instantly from a Quote. Business scenario: In any form of business, one of the most important things to do is to document the transactions. Naturally, negotiation, signing an agreement, placing an order,
                                        • Function-2: Round-Robin assignment of records

                                          Welcome back folks! Last week, we saw how to update sales commission in quotes using a custom function. This week, let's see an interesting use case asked by many of you - auto-assignment records by round-robin method. Business scenario: Right now, the solution allows you to auto-assign leads from web form and imported lists. Let us look at a need where you want to auto-assign leads from in-bound calls in a round-robin method, across modules. Prerequisite: You must create a permanent record in the


                                        Manage your brands on social media



                                                Zoho TeamInbox Resources

                                                  Zoho DataPrep Resources



                                                    Zoho CRM Plus Resources

                                                      Zoho Books Resources


                                                        Zoho Subscriptions Resources

                                                          Zoho Projects Resources


                                                            Zoho Sprints Resources


                                                              Qntrl Resources


                                                                Zoho Creator Resources


                                                                  Zoho WorkDrive Resources



                                                                    Zoho Campaigns Resources

                                                                      Zoho CRM Resources

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series


                                                                      • Tips

                                                                        Tips

                                                                      • Functions

                                                                        Functions

                                                                      • Meetups

                                                                        Meetups

                                                                      • Kbase

                                                                        Kbase

                                                                      • Resources

                                                                        Resources

                                                                      • Digest

                                                                        Digest

                                                                      • CRM Marketplace

                                                                        CRM Marketplace

                                                                      • MVP Corner

                                                                        MVP Corner

                                                                      





                                                                      




                                                                          Design. Discuss. Deliver.

                                                                          Create visually engaging stories with Zoho Show.

                                                                          Get Started Now