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

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).

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.

Creating envelopes where first signer specifies next recipient(s)

I need to send out a document / envelope. I'm using the C# SDK, since we'll be sending from a service. We know who the recipients of the document COULD be, but it's up to the first recipient to either sign or choose a recipient.
The first recipient of the document can do one of two things-
Sign the document
select a different recipient from a drop-down list of Roles, and then have the document go to that user for their signature.
these future roles are "Dealer" and "Lawyer". We'll know, at the time of
selection who these user's are (names & emails).
Right now, I have a template (from Word), with tabs that will be populated when sending the initial envelope, so that all users can see the data.
My question(s) are:
Is using the Template the best option? Should I attempt to update the text within the Word document, by not having it configured as a template?
How should I add the users / roles / signers to the envelope, since they can be chosen ? I saw something about Intermediaries - is this what I should be using to specify the next recipient in the document? Currently, I have three "Roles" defined in my template- one for "Provider" - the first recipient, then "Dealer" and "Lawyer".
IF not using a Template, how should I specify / add the follow-up users, "Dealer" and "Lawyer"?
Any assistance is greatly appreciated!
Using a template is probably what you need. You can update the document inside a template before sending an envelope that is created from the template. (you can also use"correct" to update an envelope that was sent, but only by the original sender and there are some other limitations)
see comment from Drew, you cannot do a conditional recipient yet, but there are other options, including a special type of recipient that can add other recipients (if that's what you want).
You can create a more complex workflow that have the first envelope trigger a second envelope with the recipients you want. That could work for you. Not sure yet about all your requirements, but the first signer can trigger this using our web-hook from connect.

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.

Document Templates - Roles Set to In person or email signing

I have successfully created a system to use a document template to create a new envelope.
The system has a tabbed UI and iframe that fetches new URLs from the Docusign API every time a tab is changed, and when a URL expires.
My problem is that now, some clients will either be sign in-person or sign via email. After reading the docs, I don't see a way to change from an in-person to an email signer after the envelope has been created. Is that correct?
Is it possible to set whether a role will be in-person or email sign at the time of envelope creation, without affecting the original template?
If that is not possible, Is my best option to create a template with duplicate fields for both in-person and email signing, and only use the appropriate ones based on my case?
If you need to change an in-person signer to a remote signer, or vice-versa, or any other recipient type into another recipient type you have two options:
Perform an Envelope Correction
Remove then Add the Recipient back to the in-process envelope as a different type.
For option #1, using an envelope correction you can edit things like recipients, tabs, and even documents if they have not been signed yet. Make the following API call to request the correction URL of an envelope:
POST /v2/accounts/{accountId}/envelopes/{envelopeId}/views/correct
API Docs: https://docs.docusign.com/esign/restapi/Envelopes/EnvelopeViews/createCorrect/
For option #2, the system does not let you convert a recipient into another recipient type - HOWEVER - you can delete a recipient from an envelope then add them back in as a different type. For instance, delete an in-person signer and then add them back in as a signer.
You can see the needed calls through the EnvelopeRecipients Resource.

DocuSign Multiple Signers envelope

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.

Resources