DocuSign Integration with Salesforce using DocuSign API’s-Part 1

By | May 23, 2018

Docusign is a digital signature provider for your documents, quotations and various other papers which are digitally generated and maintained and signing each of them manually would quite be a hectic task. While it has been around for years, DocuSign has provided its own API for integrating your Salesforce org with your DocuSign Account. So let’s say you create a Quote and need the end user to confirm it, instead of going through various time-consuming tasks of mailing the document and then waiting for the client to simply respond, you could now send and receive the documents without leaving Salesforce over a click of a button. And while we are talking about integrating the two systems it’s not much of a herculean task in the first part we will discuss how to send the document from Salesforce to DocuSign. So without further ado, let’s begin-

Pre-Requisite-
1. Developer Org Salesforce
2. Demo Account for DocuSign which can be created over here- https://demo.docusign.net/

Steps for sending the document from Salesforce to DocuSign-

1. Add the below-mentioned link to your Salesforce org “Remote Site Setting”, this acts as your endpoint- https://demo.docusign.net/api/3.0/dsapi.asmx
2. Create a new Salesforce site and activate it. If you don’t know how to create a site in Salesforce visit this link- Creating a site in Salesforce
3. Now, create a new Visualforce page named “RenderContract”. This page will contain all the pdf content that you want to display. Remember this page should have the signature tag named “By:” which will notify the DocuSign system where to place the digital signature. Refer this link for creating Vf page “RenderContract”– VF page code
4. Now add this newly created page to your Sites “Visualforce Pages”.
5. Also, since the content revolves around Contract we need to give the site access to this object in “Public Access Settings” page.
6. Now, we will create the DocuSign API class by parsing the class generated from this WSDL – https://demo.docusign.net/api/3.0/Schema/dsapi-send.wsdl
7. Once the class is generated then create a new Custom Setting named “DocuSign Setting” and create fields like DocuSign Accountid, Docusign Userid, Docusign Password, Docusign Integratorskey, and DocuSign ExternalPoint.
8. After the fields are created then log into your DocuSign demo Account and click on “Go To Admin” then under “Integration” section click on “API & Keys” and then find the respective values such as Accountid, Integrator key, Username, and Password. And enter this value in endpoint- https://demo.docusign.net/api/3.0/dsapi.asmx
9. Now create a new class by referring this link- https://developer.secure.force.com/cookbook/recipe/accessing-docusign-api-from-salesforcecom-to-send-contracts-for-esignatures and then edit this class and in its Constructor set the values for “Accountid, IntegratorsKey, Username, and Password”.
10. Now, create the second page that will be called from Contract page layout that will refer to this class.
11. Add this button to the Contract page layout and create “Detail Page button” with URL- /apex/SendToDocuSign?id={!Contract.Id}
12. Once the button is added just click on this button and your Document will be sent to DocuSign.
Note- Do note that the Contract should have value in the field “Customer Signed by” with proper email id.

Click on Send to DocuSign button for sending the document for signature

Click on Send to DocuSign button for sending the document for signature

Click on sign option for placing the signature

Click on sign option for placing the signature

For more elaborate description visit this link- https://developer.secure.force.com/cookbook/recipe/accessing-docusign-api-from-salesforcecom-to-send-contracts-for-esignatures

Once, you have clicked the button all you need to do is log into your DocuSign Account and you can notice the document will be available in the inbox section. In our next part, we will discuss how to sign the document and send it back to Salesforce.

About Us
Greytrix is one stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product customization’s, data migration, system integrations, third-party add-on development and implementation expertise.

Greytrix has some unique solutions for Cloud CRM such as Salesforce integration with Sage X3, Sage 100 and Sage 300. We also offer best-in-class Cloud CRM Salesforce customization and development services to business partners and end users. Greytrix has some unique solutions for On-Premise CRM such as Sage CRM integration with Sage X3, Sage 100, Sage 300, Sage 500 and Sage 50. We also offer best-in-class On-Premise Sage CRM customization and development services to business partners and end users.

For more information, please contact us at salesforce@greytrix.com. We will be glad to assist you.

Related Posts