We're developing a project at our company that displays a company roster and allows easy DocuSign paperwork generation with many of the tabs already filled out so that we can cut down on inaccuracy and increase ease of use.
With the REST API, I am able to generate envelopes just fine with templates inside and even fill out some of the tabs for the recipient (the tabs we have information for) with information from our database.
The problem I'm experiencing lies with the list tabs (select drop-down boxes) on the templates. When an envelope is generated from the DocuSign website itself, the select boxes have "-- select --" selected, and I see that on the template editor as well, which is proper because we need the employee or manager to select those things (they're required). However, using the API and not even touching the listTabs when doing a PUT for the recipient tabs, there is no "-- select --" even on the drop-down and the first option on the list tab is pre-selected.
We're still using the DocuSign website (via "Review Documents" in email or simply opening the user's inbox on the website) to fill out the paperwork; the generation is the only thing we do with the API at the moment. This list tab thing is a problem; if someone skips selecting those list tabs, then there's already a pre-selected value that could be wrong. Even when the tab is marked as required, the template sees that there is a value selected and it passes validation. Does anyone know if I'm doing something wrong with the template or API calls here or is this a bug?
I would provide code, but it's scattered across so many Java classes that it would be hard to compile into something easily understood on a stackoverflow question. Not only that, but, as I said, I'm not even touching the listTabs at all when doing a PUT on the recipient tabs.
Thanks for your time.
Ok so I believe this is by design, and if you want the "default select item" in there you just have to add it in. I would imagine that some people do not want a "null" option so the api gives them complete control over the list items, whereas when you send through the console it seems to always have "--select--" as the first option.
When you send through the console the "--select" option has a check mark next to it, which means it's just another list option. I was able to mimic this with the following request body:
{
"emailBlurb": "This goes in the email body",
"emailSubject": "API Signature Request",
"documents": [
{
"documentId": "1",
"name": "document.pdf"
}
],
"recipients": {
"signers": [
{
"email": "<email_address_goes_here>",
"name": "John Doe",
"recipientId": "1",
"tabs": {
"signHereTabs": [
{
"xPosition": "250",
"yPosition": "75",
"documentId": "1",
"pageNumber": "1"
}
],
"listTabs": [
{
"xPosition": "100",
"yPosition": "90",
"documentId": "1",
"pageNumber": "1",
"recipientId": "1",
"tabLabel": "DropDownList",
"listItems": [
{
"selected": "false",
"text": "--select--",
"value": "--select--"
},
{
"selected": "false",
"text": "One",
"value": "One"
},
{
"selected": "false",
"text": "Two",
"value": "Two"
},
{
"selected": "false",
"text": "Three",
"value": "Three"
}
],
"width": "56"
}
]
}
}
]
},
"status": "sent"
}
Related
let's say I defined mutilple check boxes with DocuSign eSignature Java SDK, each of the check box been given unique Tab Label, then group them together in tabs group A and all the check boxes in tabs group A are mandatory (with Validator).
Is there any way that I can define another individual check box (call it B) in the envelope, by checking the check box B will automaticly check/uncheck all the check boxes in tabs group A by using DocuSign Java SDK or eSignature REST API.
I would appreciate it if any one could provide a solution, thank you^_^.
To the best of my knowledge, no. I would instead suggest playing with Tab Replication feature. It might serve as a good replacement for this requirement.
Here's an example use case...
Let's assume you have a job application that asks the applicant to specify which languages she is familiar with. At the top of the list of languages, there is a checkbox labeled "All". If the user selects this option, all checkboxes next to the individual languages are hidden from view. Otherwise, the user can select the languages that are applicable.
Once the user completes her signing, the business logic of your app can check if that "all" checkbox was selected and interpret it to mean that the user is comfortable with all languages, otherwise, you would check the individual values of the other checkboxes.
Here is how you would build that envelope from scratch: Notice that each checkbox references its parent via conditionalParentLabel. conditionalParentValue": "off"tells DocuSign to hide the children from view if the parent is checked.
POST /envelopes
{
"emailSubject": "Please sign this document set",
"documents": [
{
"documentBase64": "JVBERi0xLj...UlRU9GCg==",
"name": "Test Doc",
"fileExtension": "pdf",
"documentId": "1"
}
],
"recipients": {
"signers": [
{
"email": "test#test.com",
"name": "Matthew Roknich",
"recipientId": "1",
"routingOrder": "1",
"tabs": {
"checkboxTabs": [
{
"tabLabel": "all",
"locked": "false",
"xPosition": "100",
"yPosition": "100",
"documentId": "1",
"pageNumber": "1"
},
{
"tabLabel": "english",
"locked": "false",
"xPosition": "130",
"yPosition": "110",
"documentId": "1",
"pageNumber": "1",
"conditionalParentLabel": "all",
"conditionalParentValue": "off"
},
{
"tabLabel": "spanish",
"locked": "false",
"xPosition": "160",
"yPosition": "110",
"documentId": "1",
"pageNumber": "1",
"conditionalParentLabel": "all",
"conditionalParentValue": "off"
},
{
"tabLabel": "french",
"locked": "false",
"xPosition": "190",
"yPosition": "110",
"documentId": "1",
"pageNumber": "1",
"conditionalParentLabel": "all",
"conditionalParentValue": "off"
}
]
}
}
]
},
"status": "sent"
}
I know that there is no authentication performed by Docusign when using embedded signers. In the RecipientViewReuest it allows for an authentication_method. So far I have found that 'none' and 'email' work fine. I assumed that this was a free form text field that allowed me to say something like 'Checked their IDs' But any I've used so far (besides none and email) cause an error, so I assume there a limited list of acceptable answers. Anyone know what they are?
You can enable the following recipient authentication types on your envelope:
Access Code
Phone Authentication
SMS
Knowledge-Base Authentication(KBA)
ID Verification (IDV)
In your case (for embedded signing) you have two separate API requests to make: The only change will come in your POST /envelopes call.
Ex. Let's say I wanted to add an access code to a particular recipient. Easy as adding the accessCode property when you create your envelope.
{
"documents": [{
"documentBase64": "JVBERi0xLjMNJeLjz...lRU9GDQo=",
"documentId": "1",
"fileExtension": "pdf",
"name": "Lorem"
}],
"emailBlurb": "Sample text for email body",
"emailSubject": "Please Sign",
"envelopeIdStamping": "true",
"recipients": {
"signers": [{
"name": "{SIGNER_NAME}",
"email": "{SIGNER_EMAIL}",
"roleName": "",
"note": "",
"routingOrder": 1,
"accessCode": "{ACCESS_CODE}"
"status": "created",
"tabs": {
"signHereTabs": [{
"documentId": "1",
"name": "SignHereTab",
"pageNumber": "1",
"recipientId": "1",
"tabLabel": "SignHereTab",
"xPosition": "75",
"yPosition": "572"
}]
}
}]
},
"status": "Sent"
}
Here is a full guide on this topic.
Matthew has provided the list of additional authentication that DocuSign can do for you if you wish.
Here is the list of authentications that you can list as having performed before calling the EnvelopeViews:createRecipient method.
They're listed on that page in the description for the recipientViewRequest.authenticationMethod attribute. Use the value that best describes the authentication that your application did.
Biometric
Email
HTTPBasicAuth
Kerberos
KnowledgeBasedAuth
None
PaperDocuments
Password
RSASecureID
SingleSignOn_CASiteminder
SingleSignOn_InfoCard
SingleSignOn_MicrosoftActiveDirectory
SingleSignOn_Other
SingleSignOn_Passport
SingleSignOn_SAML
Smartcard
SSLMutualAuth
X509Certificate
I have a Word document that serves as the Document template. It only has an outline on it. I then added text fields to the template.
for example, the template JSON, it looks like this:
"recipients":
{ ...
"signers": [
{ ...
"tabs":
{
"listTabs": [
{
"documentId": "1",
"pageNumber": "1",
"recipientId": "55177519",
"tabType": "list",
"tabLabel": "##parentf2e8b853-3ef1-4872-af19-4f1e3c60a3a7##recipient",
"listItems": [
{
"text": "Dealer",
"value": "Dealer"
},
{
"text": "Customer",
"value": "Customer"
}
],
"required": "true",
"shared": "true",
"value": ""
}
],
"textTabs": [
{
"documentId": "1",
"height": "19",
"pageNumber": "1",
"recipientId": "55177519",
"tabId": "55ab5a10-54d6-4ca0-a66b-7c637c8ad61a",
...
"tabLabel": "DealerPhone",
...
},
My questions are:
How can I get all of the text fields to display the data, no matter who the recipient is- for example, the DealerPhone above? Under "Collaboration", I have set the fields set to "Recipients can Collaborate".
Once the first user selects the user from the drop-down list (the listTab below), I do not want subsequent users to go in and change that selection, but I do need the users to see who the previous / first user selected in that drop-down list.
I can share JSON files of both the template and what I'm sending to create the envelope. The template displays, but the text data is blank.
Sample JSON request body:
{
"email": "...email....",
"name": "Test Dealer",
"roleName": "Dealer",
"tabs": {
"textTabs": [
{
"tabLabel": "DealerPhone",
"value": "1-800-111-2222"
},
{
"tabLabel": "DealerContact",
"value": "Billy Dealer"
}]
}
}],
"emailSubject": "DocuSign API - TEST!!!",
"templateId": "{{templateId}}",
"status": "sent"
}
There's an account-level setting that's relevant here, available from Go to Admin > Sending Settings > When an envelope is sent, write the initial value of the field for all recipients. With that enabled, all pre-populated data will be visible to all recipients. With that disabled, data only gets 'burned in' to the PDF when the assigned recipient completes their role.
If you do not want later recipients to be able to change the value of the dropdown, you will want to disable Collaboration on it. Later signers will be able to see that selection regardless of if Collaboration is enabled or not.
Finally, you'll want to avoid using Conditional Logic on fields that should always appear. Setting a tag to be a conditional child means that it will only appear if circumstances are met.
If recipients sign sequentially (increasing routing order) then every subsequent recipient can see the tabs that prior recipients have filled and they cannot modify them. If you have all tabs assigned to your first recipient, all the other recipients will see them but they'll be read-only for them.
Using the docusign rest api i would like to create an envelope with 2 documents.
I will then be using the Post Recipient view to show document 1 to the first recipient (in an iframe) and once signed show document 2 in the same envelope to another recipients.
i have created the templates with different tempalteRoles (different names, order 5 and 10).
Its my understanding using a userId and the right settings in my docusign account, i can show document 1 to recipient 1 and then document 2 to recipient 2.
When i try and create the composite envelope the whole document is shown.
when i call the recipient status for the envelope it only shows one signer.
I have found the envelope will only create when the 2 template roles have the same clientUserId, userName and email, otherwise i get the error "ONESIGNALLSIGN_NOT_SATISFIED"
here is the envelope i am sending through
{
"accountId": "ACCOUNT_ID",
"emailSubject": "Email subject",
"status": "sent",
"templateId": "TEMPLATE_ID",
"templateRoles": [
{
"roleName": "PDS Customer",
"email": "pds#example.com",
"name": "TestFirstName TestSurname",
"clientUserId": "1",
"tabs": {
"textTabs": [
{
"tabLabel": "DocumentNumber",
"value": "123456789",
"locked": true,
"documentId": 1,
"pageNumber": 1
}
...removed some
]
}
},
{
"roleName": "Customer",
"email": "test#example.com",
"name": "mrTestFirstName TestSurname",
"clientUserId": "2",
"tabs": {
"textTabs": [
{
"tabLabel": "StorerEmail_LocalPart",
"value": "test",
"locked": true,
"documentId": 2,
"pageNumber": 1
}
...removed some
]
}
}
],
"compositeTemplates": [
{
"compositeTemplateId": 1,
"serverTemplates": [
{
"sequence": 1,
"templateId": "TEMPLATE_ID_2"
}
]
}
]
}
The error message is due to having Document Visibility enabled. In that scenario, each signer must have at least one tab present. Your second signer (embedded or not) must have at least one tab. In this case it'd probably be on the second document.
Your API call above does refer to a second documentId though so you may be okay there.
I would suggest that you not mix the "simple" sending (using templateRoles at the top level) with composite templates. Instead, add an inline template to the compositeTemplates structure with all of your recipient information. You may be seeing some odd behavior due to mixing those.
Lastly, the default Document Visibility configuration will show a document to a recipient only if they have a tab on that document. If your second signer should see all documents then you must either add a tab for them on each document or explicitly set visibility per document.
I'm trying to setup a template that will have a number of fields pre-filled out. It should behave exactly the way "Full Name" currently does -- I provide the values when creating the envelope and they show up as read-only additions to the document.
I've tried adding "Data Fields" to the document, however there are two problems:
1) When I setup the envelope via API, I try to preset the values (see below for example), but the values do not show up for the signer. The "" matches what I set the DataField to have.
2) The signer can override those values.
"<customFields>"+
"<textCustomFields>"+
"<textCustomField>"+
"<name>Trip Date</name>"+
"<value>Jul 17-21</value>"+
"</textCustomField>"+
"<textCustomField>"+
"<name>Country</name>"+
"<value>Uganda</value>"+
"</textCustomField>"+
"</textCustomFields>"+
"</customFields>"
What is the proper way of doing this?
If you want to set data fields for your recipients through the API you need to use textTabs. The custom fields that you have referenced are at the envelope level, not the recipient level.
Please go through the DocuSign Developer Center as it covers this info. In particular you should take a look at the Explore -> Features -> Stick-eTabs page. There's a section there called Data Fields which answer all your questions:
https://www.docusign.com/developer-center/explore/features/stick-etabs
You use the tabLabel property to pre-populate them and you need to set them in the tabs section of your request body. For instance, if you had 2 data fields (called "Data Field 1" and "Data Field 2") and you wanted to fill them with "foo" and "bar" and you wanted to make them read-only you could use the following JSON. If you don't want them read-only then set "locked" to "false"...
"tabs": {
"textTabs": [
{
"tabLabel": "Data Field 1",
"value": "foo",
"locked": "true",
"xPosition": "200",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1"
},
{
"tabLabel": "Data Field 2",
"value": "bar",
"locked": "true",
"xPosition": "300",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1"
}]
}