Multiple Embedded DocuSign Signers

  • 1 June 2023
  • 0 replies
  • 142 views

Userlevel 2
Badge +4

As many of you know, today, Nintex DocGen for Salesforce supports a single embedded signer for DocuSign, but what if you have several signers that need to sign right then and there? In that case, a custom Visualforce page is the way to go to give your users a seamless end user experience.

I’ve put together a sample to demonstrate how you can redirect your users to a Visualforce page after your first embedded signer is complete. This Visualforce page will house all of the signing links for each individual signer. There are a few additional steps that have to be taken for this process to work.

The first step is to set up the DocuSign delivery option to include embedded signers. To do this, the field marked “Embedded Signer” should be set to “Routed via Looplus” for every Recipient record who needs to be an embedded signer.
 

A field must then be set up on the main record that will store the Envelope Id of the DocuSign Envelope. This field does not have to be visible to the end user, but must be readable. Within DocuSign Connect, set up a Connect setting to to update this field on Envelope creation with the DocuSign Envelope Id. For instructions to do this, please see this documentation: https://help.nintex.com/en-US/docgen/docservices/#docgen-sfdc/Services/manageDDP/ConfigureDocuSignConnect.htm

Now it is time to upload the Visualforce page and controller. Attached to this blog post, are 2 files: InPersonSigningRedirect.page (Visualforce page) and InPersonSigningRedirectController.cls (Apex controller). There are 2 lines of code that will need to be updated:

Line 3 - update DocuSignAccountId to the DocuSign API Account Id (retrievable from the DocuSign Admin console)

Line 21/22 - update the API name of the DocuSign Envelope Id field and object name of the main object where the Envelope Id field exists.

At this time, also consider if there is already an established means of authenticating with DocuSign from within the context of Salesforce. If this already exists, then the code will need to be updated to retrieve the auth token from that method. If not, I will be putting together a secondary blog post to explain how I got the auth token through the DocuSign API. I’ll be sure to link that here.

Once the Apex class and Visualforce page are loaded in Salesforce, we will once again revisit the very first Recipient Embedded Signing recipient for the DocuSign delivery option. Here, we will copy and paste the full URL for the new Visualforce page that was created into the RedirectUrl field. To make this redirect URL dynamic, the field tag for the main object record can be added.

What this does is automatically redirect the page once the first embedded signer has completed the signing process to the Visualforce page. The Visualforce page will look something like this:

The Click Here buttons will launch the DocuSign Embedded Signing experience for each additional embedded signer for this envelope.

Hope this overview was helpful. Please let me know in the comments below if there are any questions! Happy building!


0 replies

Be the first to reply!

Reply