E-Sign for Zoho Vertical Apps : Implementation Guide

E-Sign : Implementation Guide

E-Sign lets your subscribers send documents for electronic signing using a designated Send for E-Sign button, which can be placed on any page you decide.This feature is provided by integrating with Zoho Sign using various developer tools offered by Zoho Vertical Solutions. We'll walk you through the entire process, outlining each step in detail.
In this document we will provide a detailed step-by-step guide for implementing E-Sign for your solutions. For a deeper understanding of the functionalities of E-Sign, please refer to this document.

Step 1 : Create the custom modules for the E-Sign implementation

Custom modules are required for storing and managing data related to the document signing process within your solution. By creating custom modules specifically tailored for E-Sign functionality, you can ensure efficient organization and retrieval of relevant information.
The Sign Documents, Sign Recipients, and Sign Document Events modules are used for storing information regarding the documents to be signed, recipients involved in the signing process, and events related to document signing activities, respectively. Begin the implementation step by creating these custom modules, with the relevant custom fields in each. Refer to our help documentation for detailed guidance on how to create custom modules.

a. Sign Documents

The Sign Documents module is used for storing details about the documents to be signed, including document names, descriptions, statuses, and deadlines. Refer to the table below for a breakdown of the module's fields. 
Please note that you need to add lookup fields to all the modules where you need the E-Sign functionality.

Sl. No:
Field Label
Data Type
Remarks
01
Sign Documents Image
profileimage
Standard
02
Sign Documents Name
text
Standard
03
Sign Documents Owner
ownerlookup
Standard
04
Created By
ownerlookup
Standard
05
Modified By
ownerlookup
Standard
06
Contacts
lookup

Lookup Module : Contacts
Related List Title : ZohoSign Documents
Custom
07
Created Time
datetime
Standard
08
Last Activity Time
datetime
Standard
09
Quotes

lookup

Lookup Module : Quotes
Related List Title : Sign Documents
Custom
10
Tag
Text
Standard
11
Date Declined
Date
Custom
12
Date Sent
Date
Custom
13
Declined Reason
Textarea
Custom
14
Document Deadline
Date
Custom
15
Document Status
Text
Custom
16
Document Description
Textarea
Custom
17
Document Note
Textarea
Custom
18
Sign Document_ID
Text
Custom
19
Sign Request_ID
Text
Custom
20
Is Sign Reminder Sent
Boolean
Custom
21
Number of Sign Reminder Sent
Text
Custom
22
Modified Time
Datetime
Standard
23
Unsubscribed Time
Datetime
Standard

b. Sign Recipients

The Sign Recipients module stores information about the recipients involved in the signing process, such as their names, email addresses, and signing statuses. Refer to the table below for details on the module's fields.
Sl No:
Field Label
Data Type
Remarks
01
Sign Recipients Image
profileimage
Standard
02
Sign Recipients Name
text
Standard
03
Email
email
Custom
04
Date Completed
date
Custom
05
Recipient Status

picklist

Picklist Values

None, Sent, Signed, Declined, Mailed
Custom
06
Date Declined
date
Custom
07
Recipient Type

picklist

Picklist Values

SIGN, VIED, INPERSON SIGN
Custom
08
Sign Recipients Owner
ownerlookup
Standard
09
Date Delivered
date
Custom
10
Modified By
ownerlookup
Standard
11
Modified Time
datetime
Standard
12
Created Time
datetime
Standard
13
Declined Reason
text
Custom
14
Last Activity Time
datetime
Standard
15
Sign Document

lookup
Lookup Module : ZohoSign_Documents

Related List Title : Sign Recipients
Custom
16
Tag
text
Standard
17
Created By
ownerlookup
Standard
18
Unsubscribed Time
datetime
Standard
19
Sign Docuement_ID
text
Custom
20
Recipient Order
text
Custom

b. Sign Document Events

 The Sign Document Events module stores events related to document signing activities, providing a track of actions performed throughout the signing process. Refer to the table below for details on the module's fields.

Sl No:Field LabelData TypeRemarks
01Sign Document Events ImageprofileimageStandard
02Sign Document Events NametextStandard
03Sign Document Events OwnerownerlookupStandard
04Sign DocumentsdateCustom
05Recipient Status

lookup

Lookup Module : ZohoSign_Documents

Related List Title : Sign Document Events

Custom
06Modified ByownerlookupStandard
07Sign Recipients

lookup

Lookup Module : ZohoSign_Recipients

Related List Title : Sign Document Events

Custom
08Created TimedatetimeStandard
09Last Activity TimedatetimeStandard
10DatedateCustom
11TagtextStandard
12Created ByownerlookupStandard
13Modified TimedatetimeStandard
14Unsubscribed TimedatetimeStandard
15Description

text

Custom




Step 2: Create and establish the Connector

Connectors facilitate the integration process between solutions built on the Vertical Solution platform and third-party applications via the OAuth 2.0 protocol.
For ease of understanding, we will outline the connector configuration specific to Vertical Sign product. Henceforth, we will stick to the term Vertical Sign for the rest of the document.
By creating and establishing a connector for Vertical Sign or Zoho Sign, you enable your solution to communicate with the Vertical Sign securely. The connector facilitates authentication and authorization processes, ensuring that data exchanges between your solution and Vertical Sign are encrypted and protected.

2.1. Create the Connector

To enable Vertical Sign integration, follow these steps for creating a connector:
  1. Log in to the Zoho Developer Console and navigate to Vertical Solutions.
  2. Choose the application you wish to modify and select Edit.
  3. Access Connectors under Utilities.
  4. Click on Create Connector.
  5. Specify an appropriate name and description for the connector.
  6. Name the third-party service. For example, "ESign."
  7. Provide the signup URL for the third-party service.
  8. Input the necessary URLs for generating the Auth token. In the URLs given below, Replace {{portal-id}} with your portal ID. To get your Portal ID, Go to Set Up > Developer Space > APIs and click on the ? > API Console. The API console URL has the Portal ID in the format https://{{your_solution_name}}.zohoplatform.com/accounts/console/user/{{portal_id}}
    1. Request Token URL: https://accounts.zohoportal.com/clientoauth/v2/{{portal-id}}/auth?scope=ZohoSign.documents.ALL,ZohoSign.account.ALL,ZohoSign.setup.ALL,ZohoSign.templates.ALL&access_type=offline&prompt=consent 
    2. Access Token URL: https://accounts.zohoportal.com/clientoauth/v2/{{portal-id}}/token?scope=ZohoSign.documents.ALL,ZohoSign.account.ALL,ZohoSign.setup.ALL,ZohoSign.templates.ALL&access_type=offline&prompt=consent
    3. Refresh Token URL: https://accounts.zohoportal.com/clientoauth/v2/{{portal-id}}/token?scope=ZohoSign.documents.ALL,ZohoSign.account.ALL,ZohoSign.setup.ALL,ZohoSign.templates.ALL&access_type=offline&prompt=consent
    4. Revoke Token URL: https://accounts.zohoportal.com/clientoauth/v2/{{portal-id}}/token?scope=ZohoSign.documents.ALL,ZohoSign.account.ALL,ZohoSign.setup.ALL&access_type=offline&prompt=consent
  9. Choose whether to revoke authorization using the Access token or the refresh token.
  10. Click Save.
Upon successful creation, you will see a window displaying the redirect URL for the client. Here, you need to input the client credentials for Vertical Sign.


2.2. Create a Server-Based Client

In this step, you should create a server-based client in your API console, and use the redirect URL provided in the previous step and the redirect URI for the client.
  1. Click the API Console button located in the top right corner.
  2. To create a new server-based client, click +ADD CLIENT > Server Based Applications. Enter the following details:
    1. Client name: Provide a client name for identification purposes.
    2. Homepage URL.
    3. Authorized Redirect URIs: Use the redirect URI obtained from the previous step after connector creation.
  3. Click CREATE.


Upon successful client creation, you will receive the client ID and client secret. Copy these credentials and input them into the client details window obtained in the previous step.


2.3. Authorise the Connector

Once you have created the connector, it will need to be authorized. By authorizing the connector, you grant it permission to perform specific actions and access data within the specified scope
To authorize your connector,
  1. In the Connectors page of your Zoho developer, click the Authorize link next to the connector you are working on.
  2. If you are not already logged in, you will be prompted to do so. Login with user credentials. 
  3. Once you are logged in, the authorization window will display the access permissions for the connector.
  4. Click Allow.
Your connector will now be authorized.



2.3 Add APIs

After creating your connector, specify the actions it can execute by adding an API for each action. For the Vertical Sign feature, we will utilize Zoho Sign APIs to perform tasks such as adding a document, sending a document for ESign, or sending a reminder. These APIs are to be invoked by the widgets using the JS SDK methods of Zoho CRM, or any other methods that fit your development environment.
To add the APIs,
  1. Navigate to Connectors under Utilities.
  2. Click Edit on the connector created for the Vertical Sign implementation.
  3. Click on Create Connector API.
  4. For each API, provide the following details:
    1. Name of the connector API
    2. Method type
    3. API URL
    4. Headers
  5. Click Create.
To add more APIs, repeat steps 4 and 5 by clicking on Create API. The following are the basic APIs you need to add for the Vertical Sign implementation. You may add more APIs to implement your business requirements, from the Zoho Sign APIs.


Note : In the API URL, replace {{solution-name}} with the name of your solution. For example, if the solution URL is https://zylker.zohoplatform.com/, the URL for the gethostusers API would be http://zylker.sign.zohoplatform.com/api/v1/signhosts.

Sl. No
API Name & Purpose
API URI
Method
Headers
1
To update an existing document
http://{{solution-name}}.sign.zohoplatform.com/api/v1/requests/${reqId}
PUT
NA
2
createdocument

To create a new document
http://{{solution-name}}.sign.zohoplatform.com/api/v1/requests
POST
NA
3
sendsignrequest

To send a document to the recipients for signature.
http://{{solution-name}}.sign.zohoplatform.com/api/v1/requests/${reqId}/submit?data=${data}
POST
NA
4
downloaddocument

To retrieve  the PDF content of a particular file.
http://{{solution-name}}.sign.zohoplatform.com/api/v1/requests/${reqId}/documents/${docId}/pdf
GET
NA
5
getcompcert

To get the completion certificate.
http://{{solution-name}}.sign.zohoplatform.com/api/v1/requests/${request_id}/completioncertificate
GET
NA
6
remindrecipient

To send a reminder to the recipients.
http://{{solution-name}}.sign.zohoplatform.com/api/v1/requests/${reqId}/${remind}
POST
NA

After adding the required APIs, publish your connector by clicking on the Publish button in the top right corner of the connector window, and take a note of the extension URL you get after publishing the connector. 

2.4 Associate Connector

In this step, you need to associate the connector that you just created with the Vertical Sign app.  This step ensures that the connector is recognized and authorized to access Vertical Sign resources within your solution. Although this is a one-time process, if you update the connector, you should publish the connector again and repeat this step. 
To associate the connector,
  1. Access Connectors under Utilities.
  2. Select the Associated Connectors tab. All the published connectors will be listed.
  3. Select the Connector
  4. Click on Add


Every time you update the connector, or update one or more of the added APIs, you should publish the connector, and update the same in the Associated Connectors section. To do this,
  1.  Access Connectors under Utilities.
  2. Select the Associated Connectors tab.
  3. Hover over the connector name, and click on View All APIs.
  4. Click on the Update button on the top.


Step 3 : Connected App

A Connected App helps you integrate your solution with various applications via APIs. This integration enables you to incorporate the functionalities provided by external applications, thereby enhancing the feature set of your solution. In this step, you will create a connected app (widget) for the Vertical Sign implementation. By creating a connected app for Vertical Sign, you provide users with a user-friendly interface for initiating document signing processes.
Create the widget to fit your specific business requirements. Although the basic functionality of Vertical Sign involves sending documents for E-Sign, sending reminders, revoking documents, and downloading the completion certificate, you can implement many more functionalities utilising the Zoho Sign APIs.  Use the JS SDK methods of Zoho CRM  to invoke the Connector and the APIs added within the connector. Click here to learn Invoking Connectors and its APIs via JS SDK Methods.

To create a connected app,
  1. Click on Connected Apps from Utilities 
  2. Enter the following details to create the connected app:
    1. Connected App Name
    2. Description
    3. Choose the hosting as External or Internal, depending on your requirement. You need to specify the domain details of the server where your application is hosted. For internal hosting, specify the base URL of your app and upload the zip file. Refer here to know more about Internal hosting. For external hosting, specify the Base URL for both Sandbox and Production.
    4. Check the Modifiable check-box if you want your connected app to be editable.
  3. Click on Save


Step 4 : Add necessary functions to be invoked as REST API

Define standalone functions to be invoked as REST API, to implement functionalities pertaining to Vertical Sign. For instance, define functions to get the mail merge templates in the account or to get the mail merge document, and invoke them from the widget for the specific functionality. 
To add the functions,
  1. From the Solution home page, click on Automate > Functions
  2. Click on New Function
  3. In the Create Function page, specify the following details:
    1. Function Name
    2. Invoke as REST API > YES
    3. Specify the return type for the function
  4. Click Next
  5. In the function editor, define your function, and click on Save & Close. 

Repeat these steps for all the custom functions that you want to invoke from your widget. Click on the Invoke as REST API button in the editor window to get the Sandbox and Production invoke URLs for the function. These functions should be invoked using the execute method of the JS SDK:

      ZOHO.CRM.FUNCTIONS.execute( function namespace, params).then(function (data) {console.log(data);})






The following are the basic functions you need to define for the Vertical Sign functionality.
getMMtemplates - To get the mail merge templates available in the account, for the corresponding module from where the function is invoked. Given below is a sample code for this function. Feel free to make changes according to your specific requirements.
  1.  moduleName = crmAPIRequest.get("params").get("module");
  2. tempList = zoho.crm.getTemplates(moduleName);
  3. return tempList;
getMergeFile - To get the merged files. Given below is a sample code for this function. Feel free to make changes according to your specific requirements.

  1. moduleName = crmAPIRequest.get("params").get("module");
  2. recordId = crmAPIRequest.get("params").get("recordId");
  3. fileName = crmAPIRequest.get("params").get("fileName");
  4. mailMerge_templateId = crmAPIRequest.get("params").get("templateId");
  5. info "ModuleName :: " + moduleName;
  6. info "templateId :: " + mailMerge_templateId;
  7. mergeFile = zoho.crm.getMergedFile(moduleName,recordId,mailMerge_templateId);
  8. getPrefixName = fileName.getPrefix('.');
  9. checkExtension = fileName.getSuffix(".");
  10. info mergeFile;
  11. info getPrefixName;
  12. info checkExtension;
  13. if(checkExtension == "zdoc")
  14. {
  15.  newFileName = getPrefixName + ".docx";
  16.  info newFileName;
  17.  mergeFile.setFileName(newFileName);
  18. }
  19. else
  20. {
  21.  info fileName;
  22.  mergeFile.setFileName(fileName);
  23. }
  24. mergeFile.setParamName("content");
  25. info mergeFile;
  26. filesMap = Map();
  27. filesMap.put("file",mergeFile);
  28. dynamic_map = Map();
  29. dynamic_map.put("CRMAPIFILES",filesMap);
  30. info dynamic_map;
  31. uploadFileResp = zoho.crm.invokeConnector("esignv2.uploadfile",dynamic_map);
  32. info uploadFileResp;
  33. return uploadFileResp;
sendEreminder - To send reminders for E-sign to all the recipients. Given below is a sample code for this function. Feel free to make changes according to your specific requirements.
  1. signDocRecId = sign_documents.get("ZohoSign_Documents.ID");
  2. //signDocRecId = "4479873000000274065";
  3. info signDocRecId;
  4. recDetails = zoho.crm.getRecordById("ZohoSign_Documents",signDocRecId);
  5. signReqId = recDetails.get("Sign_Request_ID");
  6. docuStatus = recDetails.get("Document_Status");
  7. if(!"INPROGRESS".equalsIgnoreCase(docuStatus) || signReqId.isNull() || signReqId.isEmpty())
  8. {
  9. if(signReqId.isNull() || signReqId.isEmpty())
  10. {
  11. return "E-Sign Request Id is not found, Can't send Reminder";
  12. }
  13. return "E-Sign Document Status is " + docuStatus + " So, Can't send Reminder";
  14. }
  15. dynamic_map = Map();
  16. //Map all dynamic params to your desired values 
  17. dynamic_map.put("reqId",signReqId);
  18. dynamic_map.put("remind","remind");
  19. remindResp = zoho.crm.invokeConnector("esignv2.remindrecipient",dynamic_map);
  20. info "remindResp is :: " + remindResp;
  21. status = remindResp.get("status_code");
  22. if(status >= 200 && status < 300)
  23. {
  24. response = remindResp.get("response").toMap();
  25. remindMsg = response.get("message");
  26. return remindMsg;
  27. }
  28. return "Reminder Failed";
zohosigncallback_Function - The call back function to handle the callbacks, and update the CRM records according to the events. Click here to download a sample code for this function. Feel free to make changes to handle your specific requirements.

Step 5 : Add Button to the required modules

In this step, you need to create a button for the E-Sign in the modules where you want the E-Sign feature. Adding buttons to relevant modules within your solution provides users with intuitive access to Vertical Sign functionalities. Refer to our help document here to know more.
To add a button, 
  1. Click on BUILD > Components in the left pane menu
  2. Click on Links & Buttons > Create new Button
  3. In the Create Button page, select the module where you want the E-Sign functionality
  4. Specify a name for the button. For example, Send for E-Sign
  5. Add a description for the button.
  6. Select where you want this button placed. Select View Page to place the button in the record view page.
  7. Select the action you want the button to perform. In our case, Invoke a Widget.
  8. Choose the Connected application from the dropdown.
  9. Specify the resource path for the Sandbox and Production URL
  10. Specify the dimensions for the button
  11. Select the profiles that should have access to the button.
  12.  Click Save


For additional functionalities, like Send Sign Reminder, Download completion certificate, or Recall Document, add corresponding buttons, and implement the functionality according to your requirements. 

Step 6 : Signals for notifications

To receive notifications about Vertcal Sign events, utilize Signals. You can set up custom signals and activate it using a callback function. For detailed instructions on invoking signals through functions, please see here.

6.1 Define a signal

  1. Log in to the Zoho Developer Console and navigate to Vertical Solutions.
  2. Choose the application you wish to modify and select Edit.
  3. Access BUILD > Automate > Signals
  4. Click on Define Signal
  5. Provide Signal Name and click on Save. Please note that the name space will be generated automatically.

6.2 Trigger the signal via a function

Use the namespace of the signal in the callback function to trigger the signal when an event occurs in Vertcal Sign, according to your requirements. Refer to this guide for detailed instructions on invoking signals using functions.
After you have successfully completed all the mentioned steps, publish the solution, and upgrade your customers to the latest version. 
When a user clicks on the Send for E-Sign button within a module, it invokes the connected app (widget) configured for Vertical Sign integration. This initiates a series of processes orchestrated in the backend. Firstly, the connected app communicates with the established connector, facilitating secure data transmission and interaction with Vertical Sign via the OAuth 2.0 protocol. Subsequently, the app leverages the defined REST APIs to execute specific functions required for the E-Sign process, such as retrieving document templates, sending reminders, and handling recipient responses. Additionally, the app interacts with the custom modules created for Vertical Sign, storing and retrieving relevant data to ensure smooth workflow management. This implementation streamlines the E-Sign process, ensuring a user-friendly experience for both senders and recipients.

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION











                                        You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                            Manage your brands on social media

                                              Zoho Desk Resources

                                              • Desk Community Learning Series


                                              • Digest


                                              • Functions


                                              • Meetups


                                              • Kbase


                                              • Resources


                                              • Glossary


                                              • Desk Marketplace


                                              • MVP Corner


                                              • Word of the Day


                                                Zoho Marketing Automation

                                                  Zoho Sheet Resources

                                                   

                                                      Zoho Forms Resources


                                                        Secure your business
                                                        communication with Zoho Mail


                                                        Mail on the move with
                                                        Zoho Mail mobile application

                                                          Stay on top of your schedule
                                                          at all times


                                                          Carry your calendar with you
                                                          Anytime, anywhere




                                                                Zoho Sign Resources

                                                                  Sign, Paperless!

                                                                  Sign and send business documents on the go!

                                                                  Get Started Now




                                                                          Zoho TeamInbox Resources



                                                                                  Zoho DataPrep Resources



                                                                                    Zoho DataPrep Demo

                                                                                    Get a personalized demo or POC

                                                                                    REGISTER NOW


                                                                                      Design. Discuss. Deliver.

                                                                                      Create visually engaging stories with Zoho Show.

                                                                                      Get Started Now









                                                                                                          • Related Articles

                                                                                                          • E-Sign for Zoho Vertical Apps

                                                                                                            E-Sign for Vertical Apps is a feature that can be added into your Vertical Solution, enabling users to request electronic signatures for documents. This functionality allows users to send documents to any recipient, both inside and outside your ...
                                                                                                          • Quickstart Guide For Extensions

                                                                                                            Extensions—prebundled software components that can add a set of custom features to your Zoho CRM—enable developers to deliver a range of functionality not available by default on our system. This allows our partners to streamline the customization ...
                                                                                                          • Customization - Sign Up Function

                                                                                                            The Sign Up function allows you to adjust the user sign up settings for your Vertical Solutions. Some adjustable features include setting default input values, sending out email notifications, and setting custom organization variables for later use. ...
                                                                                                          • Publishing your CRM

                                                                                                            This guide helps you with the following: Publish your solution Deactivate a solution Restrict New Sign ups Publish Your Solution Your solution will be live only if it is published. Only then your subscribers will be able to sign up and start using ...
                                                                                                          • Getting Started with Zoho CRM Platform

                                                                                                            The Zoho CRM Platform is a low-code development suite that empowers developers with Zoho expertise to craft tailored solutions. By utilizing our low-code development tools, developers from diverse industries can design custom solutions that address ...
                                                                                                            Wherever you are is as good as
                                                                                                            your workplace

                                                                                                              Resources

                                                                                                              Videos

                                                                                                              Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                              eBooks

                                                                                                              Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                              Webinars

                                                                                                              Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                              CRM Tips

                                                                                                              Make the most of Zoho CRM with these useful tips.



                                                                                                                Zoho Show Resources