Lesson Progress
0% Complete

When something doesn’t quite go your way (every once in a while you will simply encounter bugs.

Zoho is constantly updating their products and sometimes things break or don’t quite work perfectly) there is almost assuredly a workaround.

In this video, we simply create a test function in CRM to be able to retrieve our Sign document JSON in its proper format.

It’s important to understand how the Sign Doc JSON is formatted! It’s quite different from other applications. Make sure you understand and can follow along.

Below is the snippet for what we wrote so far.

Or, view the full code here.

string createInvoices(int doc_ID)
// Zoho Books Org ID
orgId = "722265549";
grabDocument = zoho.sign.getDocumentById(doc_ID);
grabDocument = grabDocument.getJSON("requests");
// info "Document details: " + grabDocument;
email = grabDocument.get("actions").get("0").get("recipient_email");
if(grabDocument.get("request_name") = "Business Plan Contract.pdf")
 fields = grabDocument.get("actions").get("0").get("fields");
 //  info fields;
 for each  field in fields
  if(field.get("field_name") = "installments")
   installments = field.get("field_value").toNumber();
  if(field.get("field_name") = "email")
   newEmail = field.get("field_value");
 info "Requested Installments: " + installments;
 info "New email? " + newEmail;
return "HA! Finished";