Quite a few businesses need to use DocuSign to process their documents and contracts. Hence, it’s helpful to be able to integrate DocuSign into CRM itself. DocuSign provides a solution that can be installed to have the basic functionality linked to CRM but it might not be enough for every use case.
In this blog, we will demonstrate how we can utilize custom code to integrate with DocuSign from a CRM plug-in. (Basic background in CRM plug-ins and DocuSign system is recommended)
In Microsoft Dynamics 365, we have created a custom entity called DocuSign Envelope that will contain the actual envelope ID synced from DocuSign itself. For the purpose of this article, we will setup a DocuSign Envelope record with a valid envelope ID that is related to an actual envelope in DocuSign. On deletion of the CRM DocuSign Envelope record, we will register our plug-in so that it will connect to DocuSign and will void the actual DocuSign Envelope. This is just one scenario that we are demonstrating but we can utilize similar code/patterns to do other tasks such as creating DocuSign Envelopes, creating documents themselves from CRM directly, adding/removing recipients from the Envelope, or updating content of the documents with CRM data dynamically.
Note: There is a C# library that DocuSign provides but the DLL can’t be easily uploaded with the plug-in DLL in CRM. As a result, we are using the DocuSign REST API.
Sample Envelope record in CRM with actual DocuSign Envelope ID
In order to demonstrate this feature, we will delete the CRM DocuSign Envelope which will trigger our plug-in to void the actual DocuSign Envelope. When complete we will verify in DocuSign the envelope got voided.
Sample Envelope void status reflected in DocuSign
Screenshots of the SOURCE CODE
References for the DocuSign REST API
Keep checking our blog for more helpful Dynamics 365 content!
Happy Dynamics 365’ing!