I am trying to convert form fields with name signature_1 and pre-filled value of signature_1.
I have been following this guide:
https://www.docusign.com/developer-center/explore/features/stick-etabs
Here is the issue that i have already written up on the problem: https://github.com/karmaradio/karma/issues/440
Docusign is creating signHere tabs on the contract, but always at the top left, so it isn't recognising the signature_1 form field.
The object i send to docusign:
{
emailBlurb: "Please sign the document using link provided.",
emailSubject: "Karma document sign",
documents: [
{
documentBase64: "encoded",
documentId: 1,
name: "jackum-mur-PAYE-1.pdf",
transformPdfFields: "true"
}
],
recipients: {
signers: [
{
email: "jmurphy+c#gmail.com",
name: "jackum mur",
recipientId: 1,
routingOrder: 1,
tabs: {
signHereTabs: [
{
documentId: "1",
pageNumber: "1",
tabLabel: "signature_1"
}
]
}
},
{
email: "jmurphy+first#gmail.com",
name: "first signee",
recipientId: 2,
routingOrder: 2,
tabs: {
signHereTabs: [
{
documentId: "1",
pageNumber: "1",
tabLabel: "signature_2"
}
]
}
},
{
email: "jmurphy+second#gmail.com",
name: "second signee",
recipientId: 3,
routingOrder: 3,
tabs: {
signHereTabs: [
{
documentId: "1",
pageNumber: "1",
tabLabel: "signature_3"
}
]
}
},
status: "sent"
}
After examining the document you have shared, the following json should covert the form fields appropriately. Looking at the convention of your Tab labels, it is not clear which tabs apply to a particular recipient. So I have manually mapped each tabLabel to a recipient. From my example you can move the tabs based on the correct recipient.
If you want similar tab types to automatically populate with the same data then see here
Here is the CreateEnvelope request.
POST /v2/accounts/{accountId}/envelopes
{
"emailSubject": "Document with Form fields",
"status": "sent",
"compositeTemplates": [
{
"document": {
"documentBase64": "<Add the bas64 encoded document bytes here>",
"documentId": "1",
"name": "p60-form.pdf",
"transformPdfFields": "true"
},
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"email": "jmurphy+c#gmail.com",
"name": "jackum mur",
"recipientId": "1",
"routingOrder": "1",
"tabs": {
"signHereTabs": [
{
"tabLabel": "signature_1"
},
{
"tabLabel": "signature_1DocuSignSignHere"
}
],
"textTabs": [
{
"tabLabel": "signature_1 Student Loan deductions",
"value" : "<Pre-Fill Tab Value here>"
},
{
"tabLabel": "Student Loan deductions",
"value" : "<Pre-Fill Tab Value here>"
},
{
"tabLabel": "PAYE reference",
"value" : "<Pre-Fill Tab Value here>"
},
{
"tabLabel": "Your employer's full name and address (including postcode",
"value" : "<Pre-Fill Tab Value here>"
}
]
}
},
{
"email": "jmurphy+first#gmail.com",
"name": "first signee",
"recipientId": "2",
"routingOrder": "2",
"tabs": {
"signHereTabs": [
{
"tabLabel": "signature_2"
},
{
"tabLabel": "signature_2 DocuSignSignHere"
}
],
"textTabs": [
{
"tabLabel": "signature_2",
"value" : "<Pre-Fill Tab Value here>"
},
{
"tabLabel": "signature_2 Your employers full name and address including postcode",
"value" : "<Pre-Fill Tab Value here>"
}
]
}
},
{
"email": "jmurphy+second#gmail.com",
"name": "second signee",
"recipientId": "3",
"routingOrder": "3",
"tabs": {
"signHereTabs": [
{
"tabLabel": "signature_3"
},
{
"tabLabel": "signature_3 DocuSignSignHere"
}
],
"textTabs": [
{
"tabLabel": "signature_3 PAYE reference",
"value" : "<Pre-Fill Tab Value here>"
}
]
}
}
]
}
}
]
}
]
}
Related
Is it possible to transform PDF text field (not signature field) to initialHereTab ?
Note : it works well with signature field but not with text filed
Here is my JSON request:
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"document": {
"documentBase64": "PDFDocumentInBase64",
"documentId": "1",
"fileExtension": "pdf",
"name": "Merge_2020310203633868.pdf",
"transformPdfFields": "true"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"clientUserId": "1",
"email": "myEmail#email.ca",
"name": "Paul J Smith",
"recipientId": "1",
"tabs": {
"initialHereTabs": [
{
"tabLabel": "\\applicant1\\*"
}
]
}
}
]
},
"sequence": "1"
}
]
}
],
"emailSubject": "Please sign this legal form at your convenience",
"status": "created"
}
Yes, per the documentation:
If: Adobe name contains DocuSignInitialHere or eSignInitialHere
Then: a DocuSign Initials tab will be created
Using the below code, everything works except I am only able to fill the Tabs from whatever document I attach second. Tabs from the first don't even show up on the "Form Data" list. I'm sure this is something minor that I am overlooking, but I can not see a differance between what I have and what I have seen elsewhere on this forum, and I can not find another post with this problem. Any help would be appreciated.
{
"emailSubject": "DocuSign API - Composite Test",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "TEMPLATEID"
}
],
"inlineTemplates":[
{
"sequence":"1",
"recipients": {
"inPersonSigner": [
{
"hostEmail": "HOTEMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "Test#Test.com",
"clientUserId": "1001"
}
]
},
"tabs": {
"textTabs": [
{
"tabLabel": "Address",
"value": "221 Cherry St"
}
]
}
}
]
},
{
"serverTemplates":[
{
"sequence": "2",
"templateId": "TEMPLATEID"
}
],
"inlineTemplates":[
{
"sequence":"2",
"recipients": {
"inPersonSigners": [
{
"hostEmail": "HOSTEMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "test#test.com",
"clientUserId": "1001"
}
]
},
"tabs": {
"textTabs": [
{
"tabLabel": "ApplicantPhone",
"value": "123-456-7890"
}
]
}
}
]
}
]
}
A couple of comments about the JSON you've posted:
the property name for the inPersonSigners should be plural (in your JSON, it's singular InPersonSigner in the first composite template object)
tabs should be a property of each inPersonSigner object (in your JSON, it's a property of the inlineTemplate object)
With this feedback in mind, here's how your inPersonSigners section should be structured:
"inPersonSigners": [
{
"hostEmail": "HOSTEMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "Test#Test.com",
"clientUserId": "1001",
"tabs": {
"textTabs": [
{
"tabLabel": "...",
"value": "..."
}
]
}
}
]
And, here's your entire JSON request, modified to reflect the changes I've described above:
{
"emailSubject": "DocuSign API - Composite Test",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "TEMPLATEID"
}
],
"inlineTemplates":[
{
"sequence":"2",
"recipients": {
"inPersonSigners": [
{
"hostEmail": "HOSTMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "Test#Test.com",
"clientUserId": "1001",
"tabs": {
"textTabs": [
{
"tabLabel": "Address",
"value": "221 Cherry St"
}
]
}
}
]
}
}
]
},
{
"serverTemplates":[
{
"sequence": "1",
"templateId": "TEMPLATEID"
}
],
"inlineTemplates":[
{
"sequence":"2",
"recipients": {
"inPersonSigners": [
{
"hostEmail": "HOSTEMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "test#test.com",
"clientUserId": "1001",
"tabs": {
"textTabs": [
{
"tabLabel": "ApplicantPhone",
"value": "123-456-7890"
}
]
}
}
]
}
}
]
}
]
}
Many questions address portions of my request, but I cannot seem to make a complete solution work. I have created a template on my site (it has various text fields, initial fields, and signature block). Single recipient, using anchor tags for the fields. When I take a .docx file, create an envelope via the api, I want to apply the template previously mentioned, and then prefill 4 text fields on the document/template.
Anchor tags are not placing the fields appropriately.
Any advise/suggestions?
Working request call is:
{
"documents":
[
{
"documentBase64":"<BASE64STREAM>",
"documentId":"3",
"fileExtension":"docx",
"name":"10001000_20170803_FILE"
}
],
"emailSubject": "TEST - Group Audit - 10001000",
"templateId": "TEMPLATE_ID",
"templateRoles" :
[
{
"email": "JDOE#email.com",
"name": "JOHN DOE",
"roleName": "signer1",
"tabs":
{
"textTabs":
[
{
"documentId": "3",
"recipientId": "1",
"tabLabel": "groupname",
"value": "TEST GROUP ONE"
},
{
"documentId": "3",
"recipientId": "1",
"tabLabel": "groupnumber",
"value": "10001000"
},
{
"documentId": "3",
"recipientId": "1",
"tabLabel": "txt",
"value": "my#email.com"
},
{
"documentId": "3",
"recipientId": "1",
"tabLabel": "fein",
"value": "870142380"
},
{
"documentId": "3",
"recipientId": "1",
"tabLabel": "physicaladdress",
"value": "1 STREET WAY, , MY CITY, CA, 98001"
}
]
}
}
],
"status":"sent"
}
Based on the information you've provided, I understand your scenario to be as follows:
You've created a template via the DocuSign UI; that template contains a 'placeholder' document (which you will replace at run-time via your Create/Send Envlope API call) and defines the recipient(s) and tabs for that document.
When you create/send the envelope via API, you want to specify the document as part of the API request (i.e., to be used instead of the 'placeholder' document that the DocuSign template contains) and also auto-populate some of the tabs that the template defines.
If that's an accurate description of what you're trying to achieve, then you need to use Composite Templates in the API request structure. Here's an example of a Create/Send Envelope JSON request that uses composite templates (and contains data based upon the information you provided in your question):
{
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "TEMPLATE_ID"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "JOHN DOE",
"email": "JDOE#email.com",
"roleName": "signer1",
"tabs":
{
"textTabs":[
{
"tabLabel" : "groupname",
"value" : "TEST GROUP ONE"
},
{
"tabLabel" : "groupnumber",
"value" : "10001000"
},
{
"tabLabel" : "txt",
"value" : "my#email.com"
},
{
"tabLabel" : "fein",
"value" : "870142380"
},
{
"tabLabel" : "physicaladdress",
"value" : "1 STREET WAY, , MY CITY, CA, 98001"
}
]
}
}
]
}
}
],
"document": {
"documentId": "3",
"name": "10001000_20170803_FILE.docx",
"fileExtension": "docx",
"documentBase64": "BASE64STREAM"
}
}
],
"status": "sent",
"emailSubject": "TEST - Group Audit - 10001000"
}
I am trying to develop the following workflow in DocuSign:
There are two documents to be signed. The first is a template with 4 signatures required by 4 roles. The second document is uploaded, docx or pdf, and will be signed after the first document is complete.In the first document the first two signers need to be provided to the template and I could make this work when all I had in the envelope was the template document. After converting this to a compositeTemplate I don't see a place to add the roles to the template document. I am also unsure how to add the signature to the second document to the workflow for the template document.
The following is the json I am generating:
{
"templateRoles": [
{
"email": "EMAIL1",
"roleName": "ROLE1",
"name": "NAME1"
},
{
"email": "EMAIL2",
"roleName": "ROLE2",
"name": "NAME2"
}
],
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "TEMPLATE-ID"
}
]
},
{
"inlineTemplates": [
{
"sequence": "2",
"documents": [
{
"documentId": "1",
"name": "Contract",
"documentBase64": <DOC DATA>
}
]
}
]
}
],
"emailSubject": "[DocuSign C# SDK] - Sample Signature Request"
}
The template roles aren't picked up by the servertemplate and the documents are sent to the third person in the workflow.
Any help with this will be much appreciated.
You will have to use multiple composite templates to add a new document.
The templateRoles specified at the root level are ignored when your envelope definition contains composite templates. The templateRoles have to be spcified within the inlineTemplate.
The tabs can be added in the second composite template.
{
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "<Specify the serverTemplateId here>"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"name": "NAME1",
"email": "EMAIL1",
"roleName": "ROLE1",
"recipientId": "1"
},
{
"name": "NAME2",
"email": "EMAIL2",
"roleName": "ROLE2",
"recipientId": "2"
}
]
}
}
]
},
{
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "NAME1",
"email": "EMAIL1",
"roleName": "ROLE1",
"recipientId": "1",
"tabs": {
"signHereTabs": [
{
"documentId": "2",
"pageNumber": "1",
"xPosition": "50",
"yPosition": "50"
}
]
}
}
]
}
}
],
"document": {
"documentId": "2",
"name": "DocumentName",
"fileExtension": "docx",
"documentBase64": "<Specify document bytes here>"
}
}
],
"emailSubject": "[DocuSign C# SDK] - Sample Signature Request",
"status": "sent"
}
I am creating an envelope using the RES API and have a tag on the document to capture a date (not the date signed, another recipient-supplied date). I can successfully pre-fill the value of this when the mask on the field is Text, but when I switch it to be Date it's blank. "DOBField" is the label of the tag below. Anyone know what I'm doing wrong here?
{
"accountId": "xxxxxx",
"emailSubject": "DocuSign API - Embedded Signing Example",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": 1,
"templateId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
}
],
"inlineTemplates": [
{
"sequence": 1,
"recipients": {
"signers": [
{
"email": "123#456.com",
"name": "Rick James",
"clientUserId": "3",
"recipientId": 0,
"roleName": "Signer"
}
]
}
}
]
},
{
"serverTemplates": [
{
"sequence": 1,
"templateId": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
],
"inlineTemplates": [
{
"sequence": 1,
"recipients": {
"signers": [
{
"email": "123#456.com",
"name": "Rick James",
"clientUserId": "3",
"recipientId": 0,
"roleName": "Signer",
"tabs": {
"textTabs": [
{
"tabLabel": "DOBField",
"value": "12/24/1976"
}
]
}
}
]
}
}
]
}
],
"enableWetSign": false,
"status": "sent"
}
If you've specified mask of "Date" for the field, then it's no longer a textTab -- it's now a dateTab. So, try changing textTabs to dateTabs in your API request. i.e., the tabs portion of the request will look like this:
"tabs": {
"dateTabs": [
{
"tabLabel": "DOBField",
"value": "12/24/1976"
}
]
}