get tabs from all documents in templates DocuSign - node.js

Docusign Provides a way to get tabs data for a single document in a template by specifying documentId. I could not find a way to get tabs data for all documents included in a template.

There's no data in templates, templates are not sent, or acted upon.
Only envelopes have data, and you mentioned you can get data from envelopes.
Now, maybe you meant how can I aggregate ALL the DATA from ALL envelopes created from a template.
If that's what you meant, then you may have to first find all these envelopes.
To do this, include some meta-data in your envelopes using custom fields. These will be used to later find them first, so that then you can get all the data from them using the search envelope endpoint (that can also return data).

If you're looking to see which tabs are placed on a template, you can do so by making a Templates::Get call with ?include=recipients,tabs.
As Inbar states, this won't get you any tab values (except one that are pre-populated by the template creator), as the template itself isn't what a signer interacts with - an envelope is sent that references the template. So if you're trying to collect data from your signers, you would need to be pulling tab data from an envelope instead.

Related

What is the best way to get all the envelopes for a template?

I have the template id and I want to fetch all the envelopes for this template. What is the right and the best way to get this information?
So, if your integration/app sent these envelopes and you put some code that will allow you to do in the future - you can do that.
However, if you have envelopes sent from a template without anything in there to indicate where they came from - there's no way to do that.
The system considers the envelope and template independent objects and there's no correlation (no FKs in the database). When you ask for an envelope to be created from a template, the template is simply copied into a fresh new envelope with everything in it. That's it.
So, for example, if you have unique documents, recipients, fields, etc. etc. you can use them to ascertain the template, but there's nothing directly tying the templateId.
Blog post that covers this topic -
https://www.docusign.com/blog/developers/the-trenches-track-your-templates-envelope-custom-fields

PowerForms and its advantage

Few questions about PowerForms
What is the real advantage of using PowerForms? In which case(s) it is most useful?
In Docusign Classic View >> PowerForms, there is an option to download Form Data as XML and CSV. Can we download this data using APIs?
For this question, I referred this thread "Can We get a report for the values filled in radio button in DocuSign Envelope".
PowerForms are an easy way of referencing a DocuSign Template through the API without writing any code. They are intended for less technical end-users who want to quickly access a Template through either email delivery or through a direct link (URL) but don't know / want to code it up. Instead they manually initiate such requests through a created PowerForm.
With regards to the form data question- yes, you can programmatically retrieve the form data through the API. You need to keep in mind that DocuSign tabs (aka fields) are always with respect to recipients and not the document itself.
Therefore, you can make the Get Tab Information For Recipient API call (REST version linked).

scoping out docusign for a client

I just wanted to understand certain terms such as
1) what is a template in context of docusign
2) What is an envelope an when do we use it ?
3) What is embedding signature ?
Basically my client wants to populate a pdf contract form with certain data got from a form. Would liek to send the pdf form to get it signed by the client...
Although the form maybe same the data fields in it may change ..
so what approach should be taken
a) template or b) embedded ?
assuming a blank form needs ot be sent for signing how does that work ? does the form goto the client phsycially ? or do they come on your site to sign it ...
i am sorry if i am all over i just wanted to understand the process frolm a developers stand point.
I suggest you read up on the DocuSign Developer Center. In particular the Explore -> Features section has pages dedicated to Templates and Embedding (among other topics) that have much of this info.
what is a template in context of docusign
Templates help streamline the sending process by allowing you to - at design-time - save document(s), recipients (or placeholder roles for recipients), tab locations and types for those recipients, routing and workflow, and more. Then at real-time when you want to request a signature you simply match a recipient to a role on your template and they automatically inherit all that previously configured workflow. The data they enter into their fields will still be specific to them, but things like the location of the signature tabs you've placed for them will always be the same, any conditional or dynamic workflows will be the same, etc. Templates are very flexible and have many features and options so I suggest you read up on them both through the Features -> Templates page but also through the API docs.
An alternative to requesting a signature from a Template is to request a signature on a Document. This is a similar call except that you need to define the tab locations, recipients, routing, etc every time before sending. With a template you just define all of that stuff once, at design time.
What is an envelope an when do we use it?
Definition from Explore page overview: "An envelope is basically a "container" used to send documents to recipients. The envelope carries information about the sender and timestamps to indicate the progress of the delivery procedure. It can contain collections of Documents, Tabs and Recipients and is analogous to a physical envelope you would send through the mail".
An envelope can have as many documents as you want in it (I think there's a total size limitation but that it's set high) and can be addressed to 1 or more recipients (actually up to 1,000 if using Bulk Send feature). And once the last person is done signing the docs in the envelope a Certificate of Completion (CoC) PDF doc is automatically generated and placed inside the envelope as part of an audit trail for your review.
What is embedding signature ?
Embedding allows you Embed the signing workflow directly into your website or app or whatever you are building. The signing still takes place through a DocuSign endpoint but you can generate the unique signing URLs yourself and open in an iFrame or Webview. You can control the branding around the signing experience and you also have control over where the user is re-directed to after they sign. See the Features -> Embedding page.
Regarding your questions about form fields, yes DocuSign also supports that- you want to use Data Fields (called textFields in the API), see the Features -> Stick-eTabs page.
Lastly, in terms of what approach should be taken (Template or Embedded) - hopefully my first answer cleared this up but those are not mutually exclusive. You can create an envelope from a Template or from a Local Document(s), and you can either Embed the signing experience or have it remote (i.e. recipient receives an email to start signing). To make a recipient an Embedded one, you have to set their clientUserId property. See the links I've referenced.
DocuSign also has sample code in 6 different languages for 9 common API scenarios, including Embedding, Requesting a signature from a Template, on a Document, and more. See the API Walkthroughs:
http://iodocs.docusign.com/apiwalkthroughs
DocuSign has free code samples in 6 different languages

Download Docusign Envelope with populated data

I'm trying to download an unsigned envelope form a template.
The URL I'm hitting is https://demo.docusign.net/restapi/v2/accounts/{our account id}/envelopes/{envolopID}/documents/{documentId}. But this returns the empty template instead of the populated template. This seems to be the desired behavior but it looks like it is solvable. There isn't a clear explanation to how it was solved so I figured I'd ask again.
Are you using REST GET Documents to download docs from a DocuSign Envelope or Template? If from an envelope, you can enable the account setting in Features > Display SecureField initial value to all recipients. This will show the burned in initial values on the resulting PDF after the envelope is Sent. Downloading a Template's documents or a Draft (Created) Envelope's documents will not show these values. So if that is what you are trying to do, you'll want to get the tab values using the Get Tab Information for a Recipient call mentioned in the linked solution.

Getting started with the Docusign API

I want to make sure I am on the right track as I have been having some problems getting started with the API. I am looking to maintain a list of product application PDFs as templates on docusign. When a customer comes to our site and wants a particular product they need to fill out an application form. All the data would be collected on our site. I would then want to:
Create an envolope with the customer (and potentially other parties) that need to sign the document
Fill in the form fields from data collected on our site
Send the envelope out for signature and monitor the progress.
So in doing this I am trying to build this up a piece at a time and first task is to make sure that I can provide form data to docusign. I create a template with the docusign web user interface and all of the form fields seem to be preserved. However when I try and retrieve the template with API
https://demo.docusign.net/restapi/v2/accounts/xxxx/templates/yyyy
I see a very short response with an envelopeTemplateDefinition showing the correct name for the template but no documents object and no custom fields object. I have also tried this by creating an envelope with the document (in draft) but with similar results.
My apologies in advance for this newbie question.
I've repro'd the issue you describe -- i.e., the Response I get from a GET Template request contains only very limited information and is thereby not consistent with the expected Response as documented on pages 194-196 of the DocuSign REST API guide (http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf). Not sure if this is a bug with the GET Template operation or with the Documentation -- someone at DocuSign will need to confirm (#Ergin).
In light of this limitation with the GET Template operation, you can alternatively retrieve the recipient information (including tabs) and document information about a Template by using the GET Envelope Recipients and GET Envelope Documents operations -- just specify the TEMPLATE Id in place of the Envelope Id, as shown here:
GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{templateId}/documents
GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{templateId}/recipients?include_tabs=true

Resources