This article outlines how to automate the E-signature process via a Flow with DocumentsCorePack and PowerAutomate.
Prerequisites: DCP Template Designer and a pre-configured E-Signature provider (DocuSign, AdobeSign, or AssureSign).
- DocuSign for DocumentsCorePack
- Additional information about simplifying contracts with DocumentsCorePack
- The DocumentsCorePack connector for PowerApps and PowerAutomate (Microsoft Flow)
- How to: Set up the DocumentsCorePack custom connector for PowerAutomate (Microsoft Flow)
- How to work with the new DocumentsCorePack custom connector for PowerAutomate (Microsoft Flow)
The video and step-by-step description below outline an example where we are automating the sending of an NDA to opportunities with E-signature capability.
Step-by-Step description:
1. Create a flow and select the trigger.
Since we are creating a Flow for an NDA to be sent from an opportunity, we will first select an opportunity from our Dynamics 365 environment. We then hit the Flow button and then select Create a flow. This automatically sets up our flow with the trigger being When a record is selected. If you have a different use case, you can setup your Flow in PowerAutomate and choose your trigger yourself.
Figure 1: Create a Flow in Dynamics 365
We recommend naming your flow to find it again easily for future use, and to name each step of the flow for organization.
2. Get the contact information of the first signer: Contact.
Press + New step, select the Microsoft Dataverse option, and then select Get a row by ID to collect the contact information of the first signer. For the Table Name, select Contacts. Then click in the Row ID section and then click the blue icon to the left of the Table Name section. Search contacts in the corresponding window, and then select Contact.
Figure 2: The Get Contact step
Please note: You can define a name for each step to help with organization and clarity.
3. Get the information of the second signer: Owner.
Press + New step, select the Microsoft Dataverse option, and then select Get a row by ID again. However, this time we select Users (systemusers) for the Table Name. Then click in the Row ID section and then click the blue icon. Search owner in the corresponding window, and then select Owner (Owner ID).
Figure 3: The Get Owner step
4. Create the NDA document from a DocumentsCorePack template.
Press + Next step and then search for and select the DocumentsCorePack connector. From here, select Create document (sync) (V3). Next, we will define the template type as NDA under Template. Then we need to define what we are running the template against, so we will pull in the data from our opportunity. To do this, click in the Row ID box and search and select Opportunity. We then select .docx as our File Type.
Figure 4: The Create NDA step
5. Send the document for E-Signature.
Press + New step and search for the DocumentsCorePack connector again, and then select Sign DocumentJob (sync) (V3). Click in the Row ID field and then on the blue icon to the right. Here, search for and select Opportunity. Click in the Table Name field and search for and select Opportunity again. Press in the DocumentJob ID field, click the blue icon to the right and search for and select DocumentJobID. Then select your signing provider in the Signing Provider drop-down menu, which in our example is DocuSign.
Now you can define your signers. For the first signer, click in the Signee Name – 1 field and then on the blue icon. Search for and select Full Name. Then for Signee Email – 1, search for and select Email. Type in False for Signee InPerson – 1, since we want an E-Signature. Complete these steps for Signee Name – 2, Signee Email – 2, and Signee InPerson – 2, except this time choose Primary Email instead of just Email.
Figure 5: The Sign DocumentJob step
6. Save and test the Flow.
At the bottom of the Flow select Save. Once it has finished saving, navigate back to your opportunity in Dynamics 365. You may need to refresh this page a few times. Click Flow and then select the newly created Flow. Select Continue in the following window and then select Run Flow and Done. Navigate back to PowerAutomate and view the history for your Flow. You can then view the runs for the Flow to ensure each step is running correctly. The previously selected signees should then receive the DocuSign email for E-Signature.
Figure 6: Run the Flow
Figure 7: View the runs of the Flow
You now know how to automate the E-signature process with DocumentsCorePack and PowerAutomate.
That’s it! We appreciate your feedback! Please share your thoughts by sending an E-mail to support@mscrm-addons.com.