DocuSign Multiple Signers envelope - docusignapi

I've created a docusign template that includes multiple documents. The template declares 3 signing roles. I then create an envelope from that template that has 3 recipients. The template, and our account, have document visibility enabled, such that signers can only view the documents that they must sign. After the envelope is completed by all three signatures, I need to store a PDF of each completed envelope under the different recipient's accounts on our site. Because document visibility is enabled, there cannot be a single PDF for all 3 signers. This would break the visibility feature, and they would be able to see each other's private information. Instead, there must be a separate PDF generated for each signer/recipient.
How do I request the completed document/PDF for a specific recipient in a completed envelope?

Document Visibility will control what signers can see in the signing ceremony as well as what they can see/download after the envelope is completed and they review the documents then.
If you are looking to save individual pdf/documents for storage in your system, there is a call to get individual documents rather than a combined document/pdf. Take a look at the REST call for Get Document from Envelope. The URL is /accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}.
Rob

After consultation with DocuSign engineers I decided to follow Rob's advice below, which is simple, but more manual. After the multiple signing sessions have taken place and the envelope is completed, you can extract the documents out individually using the following REST API method:
Get Envelope Document
v2/accounts/:accountId/envelopes/:envelopeId/documents/:documentId
I say this is manual, because rather than allowing document visibility to seamlessly return a combined and correct view of what the user saw and signed in PDF, you have to duplicate that intelligence in code, and will most likely end up with multiple documents per recipient. This isn't a perfect solution, and they noted that it was somewhat of a hole in their api/offering. So to recap:
Template A contains 4 documents A,B,C,D and 3 signers, Buyer, Seller, and Manager.
It uses document visibility to ensure that the buyer sees documents {A,B,C,D}, the Seller sees documents {A}, and the manager sees documents {A,B}.
An envelope is created from Template A and sent to the Buyer, Seller, and Manager.
Each sign the envelope and it is completed, but because it was an embedded signing, no emails were sent. Additionally, we would like to download and store their documents on our site under their user accounts.
Next, the code downloads the documents for each user by simulating the simple logic involved with document visibility. More specifically:
Documents {A,B,C,D} are downloaded separately and stored in the Buyer's account. Documents {A} are downloaded separately and stored in the Seller's account. Documents {A,B} are downloaded separately and stored in the Manager's account.
We could even optimize it by realizing that the Buyer sees ALL the documents, and therefore they can be downloaded as a single document by using the following REST API call:
Get Envelope Documents Combined
v2/accounts/:accountId/envelopes/:envelopeId/documents/combined
I hope this will be helpful in the future to somebody.

Related

Does the Docusign REST API have contract forwarding?

In certain circumstances we would like to automate the forwarding of completed Docusign contracts to certain new recipients, possibly adding another page. Is there a way to do that with the REST API, or does that have to be done manually?
The short answer is Yes.
In DocuSign-speak, "completed" means that the envelope (transaction) has reached its final stage. No more changes, it's frozen and saved in the DocuSign platform.
Also, note that virtually anything you can do via the DocuSign web app can also be done programmatically via one of DocuSign's APIs.
So you have two options:
Send the first envelope to someone else as a new envelope
After the first envelope is complete, your API program could analyse it to see if it needs some additional recipients. If so, your API program could start a new envelope transaction that includes the completed (signed) document, possibly the first envelope's certificate of completion, along with the new documents to be signed (or not) and new recipients.
You could include the first set of documents (from the first envelope) either as supplemental documents to the new envelope or as regular documents within the new envelope. To obtain the documents from the first envelope, your application would download them from DocuSign and then upload them for the new envelope.
A live "supplemental" documents example.
A envelope is optionally sent to additional recipients
An alternative is to have one envelope and optionally programmatically send it to additional signers with, perhaps, additional documents for the new signers.
This might be a bit trickier to program with the DocuSign eSign APIs but is certainly doable.
After the last "original" signer has completed signing, you can pause the workflow.
Once the workflow is paused, your application can again analyse the document to see if more recipients need to sign, an additional document needs to be added, etc. Then your API program uses the API to update the envelope as needed, including adding additional recipients (who may or may not be signers). This is called "correcting" the envelope. Then your program resumes the envelope's workflow.
Your program should be notified that the envelope has paused by using the Connect webhook feature, either at the account or envelope level.
If you have more questions about this answer, please open new questions on StackOverflow. Make each question as specific as you can. Thank you.

Is there a way to get a enveloped document with all custom fields populated on it, using Docusign Rest API?

I am working in a implementation using Docusign to e-sing some documents , I am able to create the envelope successfully a, but when I use the API to get the document in order to show to the user the document before to be signed the document is empty without the custom fields (tabs) that I have set in the template, so my question is : is there any way to get a document with all custom fields populated even is the document had not been signed?
I have tried using the Docusign REST-APIS to get the document:
GET/v2/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
That works I am able to get the PDF file but I dont know why the custom fields are not present in the document
If you want to get PDF with the prepopulated tabs data and want to send for review to Sales Officer then you can achieve it by two ways:
If envelope is created with sent status, then you can add Sales
Officer as the first Recipient as Signer Type and add a Approve Tab
for that signer, that way if Sales Officer approves then DocuSign
will move to next recipient in the workflow and if Sales Officer
declines then workflow will stop. So with this approach, everything
is handled by DocuSign and you do not need to get PDF copy and then
get approval via Email by sending PDF as an attachment, also approval
or decline is captured in the audit trail and also in CoC.
If envelope is created with draft status, then you can download the
PDF with prepopulated tab data by using below API call,
https://{{EnvironmentVal}}/restapi/v2/accounts/{{AccountIdVal}}/envelopes/{{envelopeId}}/documents/{{documentId}}?show_changes=true
to make any of the above solution work, you need to need to enable a Sending Setting under Admin at an Account Level which will show the Tab Value on the document for everyone.
There's an account-wide setting for this.
Navigate to Go to Admin > Sending Settings > When an envelope is sent, write the initial value of the field for all recipients.
As far as I know this can't be toggled at the envelope level by the API.

Supporting Documents in DocuSign signing request

We have a requirement wherein we need to include the additional attachment/supporting documents in the signing request. However, this does not need to be part of the document to be signed - but additional documents which customer would like to be part of the email notification that goes out to signers.
Also, would it be possible to include this document for selected signers only.
Business Case:
We have multiple internal and external signers - some of whom are senior folks who does not go through the entire document but sign based on an executive summary
However, this is an internal document and thus needs to be sent only to the internal signers only and should not be included as part of the signing document
You can include documents in the envelope that do not require signature. IF you want some form of acknowledgement that it was viewed/read/accepted, you can set it as a Supplemental Document.
For the internally view able document, leverage Document Visibility as a way to make certain documents in an envelope only visible to specific recipients of said envelope. This would allow you do add Documents A (customer facing), B (customer facing), and C (internal facing only) for example to an envelope, but only internal recipients on the envelope would be able to see document C.

How to set an option to delete envelope in docusign

am in the process of understanding Docusign and API.
I am trying to achieve with docusign that I should have the document removed after x days and also the envelope.
I see a settings for document purge in the feature tabs.
But i am not seeing an option for deleting the sent envelope itself as i am taking the backup in my database myself.
Any reference to online material or explanation would be greatly appreciated.
Thank you!!!
The "Document Retention" feature in DocuSign will purge documents from the DocuSign servers (for Completed, Declined, and Voided envelopes) N days after the envelope becomes Completed/Declined/Voided, where N is the number you specify in Preferences > Features > Document Retention (link). See page 31 of the Admin guide for details about this setting: https://10226ec94e53f4ca538f-0035e62ac0d194a46695a3b225d72cc8.ssl.cf2.rackcdn.com/account-administration-reference-guide.pdf.
DocuSign retains Envelope-level information for all envelopes indefinitely -- even if you purge an envelope's documents. This is done so that the transaction metadata (i.e., audit trail data like who it was sent to / when, what forms of authentication were used, who signed it / when, etc.) is always available should you need to prove the authenticity of the transaction at a later date. So, you'll still see an Envelope listed in the Sent Items folder even after envelope documents are purged -- so that you can always access Envelope history and Certificate of Completion -- but if you open an Envelope after its documents have been purged, you'll simply see "placeholder" documents in place of what used to be the 'real' documents. (Each placeholder doc contains a one-sentence message to indicate that the original document no longer exists within DocuSign.)
Also, keep in mind that the "Document Retention" feature is an account-wide setting that will apply to all Envelopes sent through the account. If you only want to purge documents for specific envelopes, you can do so via the API ("Purge Documents" operation).

Reuse/alter a DocuSign envelope, to update its document PDF, once the envelope is In Process

We need to be able to handle a scenario where the document PDF needs to be updated and resent, after the envelope is In Process. Do we always need to create a new envelope or can we reuse the current envelope ID?
Our process goes roughly like this:
A PDF document is generated (not using a DocuSign template).
We create an envelope for the document PDF.
The first signer (our employee) signs the document (using an embedded signing page).
The other signers sign the document (also using an embedded signing page).
Firstly, we want to know if we're forced to incur another "sent" envelope (i.e. we're billed) every time we want to update a document PDF. Secondly, we're looking for a clean way to implement updates, without the need to manage multiple envelopes.
Yes you will unfortunately have to make a new envelope if you want to make changes to the underlying document(s) of the envelope after it has been sent. This is actually a fundamental part of the service and the reason is not to make you incur a new envelope - instead it's actually a security / legal requirement.
Imagine that we are in the old world and I need two people to sign a document on paper. I have the first person sign, then before the second person signs I make a change to the document that says the first person owes me $1,000,000. Then the second person signs, the document completes, and now you have a signature from both people but it contains content that the first person did not actually agree to (and they apparently owe you $1,000,000 now!). That's the main reason why you can't change the underlying document once it's been sent.
Two possible workarounds I can think of:
1. Add data fields or other Stick-eTabs to the envelope for the parts of the document that might change.
2. Use the signer attachments tab to add additional documents.
For #1, let's say you send out a sales contract for $100,000, but after it's been sent a new price is determined. If the $100,000 is in the document content itself then you can not edit it and you'd have to create a new envelope with the new document; however if it's through a Data Field then your recipients can simply edit the value as the document works towards completion.
For #2, there are special Stick-eTabs you can add called Signer Attachment Tabs which allow recipients to attach whole documents and other files to the envelope. You could utilize this to add your changes to the envelope.
Is there a human involved in updating/replacing the document, or are you looking to fully automate the process with the API? As Ergin stated, it's not possible to add/remove documents using the API once an Envelope has been Sent. However, it IS possible for the Sender of the envelope to "Correct" (and re-send) the Envelope using the DocuSign web console -- including adding or removing documents for an Envelope that's already been Sent, but documents can be ONLY be removed/replaced IF none of the recipients have yet acted on the Envelope. i.e., once at least one recipient has acted on the Envelope, it won't be possible for the Sender to remove/replace documents in the Envelope (although they can Add new documents, as long as the Envelope is still in-process).
You can use the API to launch the "Correct Envelope" view as follows:
POST https://demo.docusign.net/restapi/v2/accounts/{acctId}/envelopes/{envelopeId}/views/correct
The response to this operation will return a URL that you can use to launch the "Correct Envelope" view.
Finally, one important caveat about using the "Correct Envelope" feature to enable the Sender to modify documents in an envelope: once the person is logged into the DocuSign web console where they'll correct the envelope, they'll have full access to that user account in the DocuSign web console -- i.e, they'll be able to access all Envelopes in that user account (Sent Items, Inbox, Deleted Items, etc.), send new Envelopes, access user settings via "Preferences", etc. So, be careful using the Correct view if you're concerned at all with providing the person with full access to that user account within the DocuSign web console.
Note: In order for the Sender to be able to add/remove Documents in the "Correct Envelope" view, the "Advanced Correct" feature must be enabled for the DocuSign account (in Preferences >> Features).

Resources