Reading email ID from the form and update the recipients list in envelope programmatically

Viewed 57

I have a DocuSign with multiple signature field (one primary and others secondary), I need to send a form to primary signer where there are few additional email fields which the primary signer will fill and the document needs to go to those email ids (which primary signer has provided in the form). Primary recipient has to sign first signature field and then send the same form to another recipient and he has to sign other signature field keeping the previous recipient signature and so on and I have to set the recipients programmatically in envelop. Is it possible? and how can I implement that?

2 Answers

The answer to this is 'sort of.' We do have a feature that can take care of this for you, or you can programmatically add in additional recipients based on formdata.

The recipient role is an agent managed envelope, specifically Address Recipients. What this role does is allows that person to set the name / email address of any future recipients in the signing order. You would essentially create a placeholder role with the tab information for the additional recipients. Once your Address Recipients role fills in the names / emails, they're automatically processed per your template / envelope.

The other option would be to either update existing envelope roles from dummy information to the intended recipients programmatically. The reference guide for creating a new recipient on an envelope can be found here: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/enveloperecipients/create/ -- you should be able to add in additional signers as long as the envelope has not reached a 'Completed' status. I would advise adding a sort of placeholder / approver role after the initial signer fills in the email information so the envelope doesn't automatically complete.

The reference page for updating an existing recipient can be found here: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/enveloperecipients/update/

Regards,

Matt

The way it worked for me is -

  1. Created a template envelop with a recipient role (Update Recipients) and few dummy signers.

  2. In the code just pick the first recipient and send the document to that recipient.

  3. When the recipient with role "Update Recipients" receives the document he can further modify the dummy recipients and the email goes to them for their signature.

  4. When all the recipients signs the document the workflow completes.

But I have one problem: When all the recipients complete their signature and workflow completes, I want to further do some processing in my code so how I can specify a "return url" which will be called when workflow is completed.

Related