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

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.

Related

Docusign - Populate tabs in envelope using REST API

I have created a template in DocuSign with a number of fields. I have also built an application that creates an envelope from that template and sends it using the REST API.
In that process I also would like to prepopulate those fields in the envelope document before sending to the first recipient. For achieving this I have looked at the update method for recipient tabs (https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeRecipientTabs/update)
However when using the update method I need to have the tabId which is unique for each envelope. If I have 20 tabs in a document I have to fetch them all for getting the ID before doing an update. Is there a better way of doing this?
The API must be able to determine the unique tab you wish to update, so a unique ID of some sort is required to do so. Note also tabs are for a specific recipient and you need to specify the page number as well.

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.

Sign a document in embedded mode and send an email to the second receipt

I'm trying to build a POC for our internal application using DocuSign, but I have some issues.
The flow is:
create a template in docuSign with a set of dynamic fields to be populated from the client app
the template has 2 recipients that have to sign the document - client and buyer with empty emails. The emails should be populated dynamically based on the order, so they're not fixed
from the client app, create an envelope that will use the template, will populate automatically the fields from the template and will open an embedded page where the first user(client) can sign the document immediately(without going to mail)
immediately after the client finished signing the document, an email should be sent to the second recipient(buyer) to finish the signing
For now, I succeed to implement all the steps, except the last one - the document is not sent automatically to the second recipient for signing.
How can I do that?
I know that I can use a recipients lists for sending email to receipts, but this is not possible when using a template - I get an error.
Thanks in advance!
Check that your template definition has the two recipient roles defined with different Signing order values.
The first recipient will have signing order 1, second signing order 2.
When you create the envelope from the template, you set the clientUserId for just the first signer. That way the second signer is a regular ("remote") email recipient.
If you'd like more help, please EDIT your question to show the code you use for creating the envelope from the template.

DocuSign API: Changing the filename when signing from a template

Using the DocuSign API via VisualStudio, I create and send an Envelope out to customers based on a Template on my DocuSign account which contains a list of the recipients and a standard pdf document.
I specify the TemplateRoles and the TemplateId using the EnvelopeDefinition object then create the Envelope. The pdf document returned when everything is signed will have the same name as the pdf on the Template document.
What I need to do is change the name of this document for each Envelope/customer. Ideally I could change the document name to that of the customer to make it easier to store and find, instead of getting a lot of different docs back with one generic name.
Is it at all possible to change the name of the finished document?
I don't know about changing the name of the document.
But you can change the subject of the envelope when you create the envelope. And it is the subject of the envelope that you see in the DocuSign web tool.
You can also set an envelope custom property and later search for envelopes with that property. Using this technique, you could easily bring up all envelopes related to a particular customer (probably best to store your customer_id as an envelope custom property in this case).
This is a bit of a hack but it works.
You can create a dummy cc recipient and their name can be anything (their email address can be random letters). Set up your template with the merge fields to include in the message subject (this also automatically edits the envelope name). Using this guide:
https://support.docusign.com/en/guides/ndse-user-guide-template-merge-fields
Then when you create your envelope from the template, fill in the dummy name with whatever text you want to be added to the envelope name.

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