Docusign - sign here tabs appear multiple times - docusignapi

This is with the Rest api. We trying to use the same anchor text values in all the documents we have in an envelope. We also may have several different server templates being applied to an envelope. We found out, to our dismay, that Docusign applies the anchor tags wherever it sees the anchor text and this means that if we have 3 server templates in the envelope, that the processing will create the anchor tags 3 times for each anchor text that it finds in each document. This means that the user will need to click three times to officially sign a document. What would be the quickest way to alleviate this problem?
-Here is the json
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "61323293-7f78-4e2b-a296-0c084db16f19"
}
],
"inlineTemplates": [
{
"sequence": "2",
"documents": [],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
"emailNotification": {
"emailSubject": "Please sign the document(s) (Lori)",
"emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
}
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "C:\\Temp\\Docusign\\Package\\Canyonlands-ViewOnly.docx",
"fileExtension": ".docx",
"order": "1",
"documentFields": [
{
"name": "DMSID",
"value": "1"
}
],
"documentBase64": "[Document:Base64Array]"
}
},
{
"compositeTemplateId": "2",
"serverTemplates": [
{
"sequence": "2",
"templateId": "14da6be4-c719-47d9-b183-da13295f86d5"
}
],
"inlineTemplates": [
{
"sequence": "2",
"documents": [],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
"emailNotification": {
"emailSubject": "Please sign the document(s) (Lori)",
"emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
}
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "60059128",
"name": "C:\\Temp\\Docusign\\Package\\e AKA.docx",
"fileExtension": ".docx",
"order": "2",
"documentFields": [
{
"name": "DMSID",
"value": "2"
}
],
"documentBase64": "[Document:Base64Array]"
}
},
{
"compositeTemplateId": "3",
"serverTemplates": [
{
"sequence": "3",
"templateId": "6b1a11c6-9719-424b-b983-4b278a467dd6"
}
],
"inlineTemplates": [
{
"sequence": "2",
"documents": [],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
"emailNotification": {
"emailSubject": "Please sign the document(s) (Lori)",
"emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
}
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "85586460",
"name": "C:\\Temp\\Docusign\\Package\\e Equity Disbursement Instructions.docx",
"fileExtension": ".docx",
"order": "3",
"documentFields": [
{
"name": "DMSID",
"value": "3"
}
],
"documentBase64": "[Document:Base64Array]"
}
},
{
"compositeTemplateId": "4",
"serverTemplates": [
{
"sequence": "4",
"templateId": "61323293-7f78-4e2b-a296-0c084db16f19"
}
],
"inlineTemplates": [
{
"sequence": "2",
"documents": [],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
"emailNotification": {
"emailSubject": "Please sign the document(s) (Lori)",
"emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
}
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "4",
"name": "C:\\Temp\\Docusign\\Package\\EightDocument.docx",
"fileExtension": ".docx",
"order": "4",
"documentFields": [
{
"name": "DMSID",
"value": "4"
}
],
"documentBase64": "[Document:Base64Array]"
}
},
{
"compositeTemplateId": "5",
"inlineTemplates": [
{
"sequence": "3",
"documents": [
{
"documentId": "5",
"name": "C:\\Temp\\Docusign\\Package\\FifthDocument.docx",
"fileExtension": ".docx",
"order": "5",
"documentFields": [
{
"name": "DMSID",
"value": "5"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "6",
"name": "C:\\Temp\\Docusign\\Package\\FirstDocument.docx",
"fileExtension": ".docx",
"order": "6",
"documentFields": [
{
"name": "DMSID",
"value": "6"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "7",
"name": "C:\\Temp\\Docusign\\Package\\FourthDocument.docx",
"fileExtension": ".docx",
"order": "7",
"documentFields": [
{
"name": "DMSID",
"value": "7"
}
],
"documentBase64": "[Document:Base64Array]"
}
],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
"emailNotification": {
"emailSubject": "Please sign the document(s) (Lori)",
"emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
}
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
]
}

Create the Envelope with status=created
Use the listRecipients api to retrieve all the tabs.
Use the DeleteRecipientTabs api to delete the tabs in the envelope. You can Delete multiple tabs in a single call.
Use the createRecipientTabs api to create the new Anchor tabs.
Use the UpdateEnvelope api to mark the Envelope status as Sent.

In your JSON request, there is no need to specify the compositeTemplateId=4 You can remove it and just move the document to compositeTemplateId=5. That way there will be no duplicate Anchor Tags.
It would make sense to include it the second time if you are going to reuse the document in the server Template. But it looks like you are anyway replacing the document in the Server Template, so there is no point in using the same server template the second time.
If you don't want to do the above approach, then follow the approach I suggested in my other answer
In the below Json I have removed the duplicate compositeTemplate and moved the document into the final template.
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "61323293-7f78-4e2b-a296-0c084db16f19"
}
],
"inlineTemplates": [
{
"sequence": "2",
"documents": [ ],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [ ],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
"emailNotification": {
"emailSubject": "Please sign the document(s) (Lori)",
"emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
}
}
],
"certifiedDeliveries": [ ]
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "C:\\Temp\\Docusign\\Package\\Canyonlands-ViewOnly.docx",
"fileExtension": ".docx",
"order": "1",
"documentFields": [
{
"name": "DMSID",
"value": "1"
}
],
"documentBase64": "[Document:Base64Array]"
}
},
{
"compositeTemplateId": "2",
"serverTemplates": [
{
"sequence": "2",
"templateId": "14da6be4-c719-47d9-b183-da13295f86d5"
}
],
"inlineTemplates": [
{
"sequence": "2",
"documents": [ ],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [ ],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
"emailNotification": {
"emailSubject": "Please sign the document(s) (Lori)",
"emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
}
}
],
"certifiedDeliveries": [ ]
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "60059128",
"name": "C:\\Temp\\Docusign\\Package\\e AKA.docx",
"fileExtension": ".docx",
"order": "2",
"documentFields": [
{
"name": "DMSID",
"value": "2"
}
],
"documentBase64": "[Document:Base64Array]"
}
},
{
"compositeTemplateId": "3",
"serverTemplates": [
{
"sequence": "3",
"templateId": "6b1a11c6-9719-424b-b983-4b278a467dd6"
}
],
"inlineTemplates": [
{
"sequence": "2",
"documents": [ ],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [ ],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
"emailNotification": {
"emailSubject": "Please sign the document(s) (Lori)",
"emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
}
}
],
"certifiedDeliveries": [ ]
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "85586460",
"name": "C:\\Temp\\Docusign\\Package\\e Equity Disbursement Instructions.docx",
"fileExtension": ".docx",
"order": "3",
"documentFields": [
{
"name": "DMSID",
"value": "3"
}
],
"documentBase64": "[Document:Base64Array]"
}
},
{
"compositeTemplateId": "5",
"inlineTemplates": [
{
"sequence": "3",
"documents": [
{
"documentId": "4",
"name": "C:\\Temp\\Docusign\\Package\\EightDocument.docx",
"fileExtension": ".docx",
"order": "4",
"documentFields": [
{
"name": "DMSID",
"value": "4"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "5",
"name": "C:\\Temp\\Docusign\\Package\\FifthDocument.docx",
"fileExtension": ".docx",
"order": "5",
"documentFields": [
{
"name": "DMSID",
"value": "5"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "6",
"name": "C:\\Temp\\Docusign\\Package\\FirstDocument.docx",
"fileExtension": ".docx",
"order": "6",
"documentFields": [
{
"name": "DMSID",
"value": "6"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "7",
"name": "C:\\Temp\\Docusign\\Package\\FourthDocument.docx",
"fileExtension": ".docx",
"order": "7",
"documentFields": [
{
"name": "DMSID",
"value": "7"
}
],
"documentBase64": "[Document:Base64Array]"
}
],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [ ],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
"emailNotification": {
"emailSubject": "Please sign the document(s) (Lori)",
"emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
}
}
],
"certifiedDeliveries": [ ]
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
]
}
]
}

Related

Docusign document did not appear in the order expected

I have an envelope with 6 documents. The sequence is: Canyonlands-ViewOnly.docx is 1, EightDocument.docx is 2, FifthDocument.docx is 3, FirstDocument.docx is 4, screenshots.docx is 5 and
Obama-ViewOnly.docx is 6. Here is the envelope definition
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "61323293-7f78-4e2b-a296-0c084db16f19"
}
],
"inlineTemplates": [
{
"sequence": "2",
"documents": [],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "4",
"name": "C:\\Temp\\Docusign\\Package\\Canyonlands-ViewOnly.docx",
"fileExtension": ".docx",
"order": "1",
"documentFields": [
{
"name": "DMSID",
"value": "1"
}
],
"documentBase64": "[Document:Base64Array]"
}
},
{
"compositeTemplateId": "2",
"inlineTemplates": [
{
"sequence": "3",
"documents": [
{
"documentId": "5",
"name": "C:\\Temp\\Docusign\\Package\\EightDocument.docx",
"fileExtension": ".docx",
"order": "2",
"documentFields": [
{
"name": "DMSID",
"value": "2"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "6",
"name": "C:\\Temp\\Docusign\\Package\\FifthDocument.docx",
"fileExtension": ".docx",
"order": "3",
"documentFields": [
{
"name": "DMSID",
"value": "3"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "7",
"name": "C:\\Temp\\Docusign\\Package\\FirstDocument.docx",
"fileExtension": ".docx",
"order": "4",
"documentFields": [
{
"name": "DMSID",
"value": "4"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "9",
"name": "C:\\Temp\\Docusign\\Package\\Obama-ViewOnly.docx",
"fileExtension": ".docx",
"order": "6",
"documentFields": [
{
"name": "DMSID",
"value": "6"
}
],
"documentBase64": "[Document:Base64Array]"
}
],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#hotmail.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
]
},
{
"compositeTemplateId": "2",
"serverTemplates": [
{
"sequence": "2",
"templateId": "f0f1832a-9595-40ef-b40d-c5f384f299e3"
}
],
"inlineTemplates": [
{
"sequence": "3",
"documents": [],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "10837977",
"name": "C:\\Temp\\Docusign\\Package\\screenshots.docx",
"fileExtension": ".docx",
"order": "5",
"documentFields": [
{
"name": "DMSID",
"value": "5"
}
],
"documentBase64": "[Document:Base64Array]"
}
}
],
"status": "sent",
"emailSubject": "Here is the subject"
}
The last two documents have appeared out of order. How can this be corrected?
Use the listEnvelopeDocuments to retrieve the exact document ID's in the envelope
Once you have the documentID's use the putEnvelopeDocuments api
to update the order of the documents.
{
"documents": [
{
"documentId": "4567899",
"order": "1",
},
{
"documentId": "3245678",
"order": "2",
}
]
}

Docusign composite template not sending the correct documents

I am trying to use the same server template for 3 different documents. I was assuming that by using 3 different composite templates, I could accomplish this. Instead, what I am seeing is that the first document is repeated 3 times in the envelope. Here is the request:
{
"customFields": {
"textCustomFields": [
{
"name": "Cartus file id",
"value": "1823456"
}
]
},
"eventNotification": {
"url": "http://requestb.in/p2qfvfp2",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "Delivered"
},
{
"envelopeEventStatusCode": "Completed"
},
{
"envelopeEventStatusCode": "Declined"
},
{
"envelopeEventStatusCode": "Voided"
},
{
"envelopeEventStatusCode": "Sent"
}
],
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "false",
"includeEnvelopeVoidReason": "false",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "false"
},
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "4e2f0e2d-9888-xxxx-8da3-bbf70163233f"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"customFields": [
"this is the buyer"
],
"routingOrder": "1",
"roleName": "##Buyer1"
},
{
"name": "Kathy Langdon",
"email": "KathyLangdon1#xxx.com",
"recipientId": "2",
"customFields": [
"this is the seller"
],
"routingOrder": "2",
"roleName": "##Seller1"
}
],
"certifiedDeliveries": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "3",
"accessCode": "12345",
"routingOrder": "3",
"roleName": "##OtherPerson"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "Here is document one of the test.docx",
"fileExtension": "docx",
"documentFields": [
{
"name": "Doc1Info",
"value": "here is doc1 info"
}
]
}
},
{
"compositeTemplateId": "2",
"serverTemplates": [
{
"sequence": "1",
"templateId": "4e2f0e2d-9888-xxxx-8da3-bbf70163233f"
}
],
"inlineTemplates": [
{
"sequence": "3",
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"customFields": [
"this is the buyer"
],
"routingOrder": "1",
"roleName": "##Buyer1"
}
],
"certifiedDeliveries": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "3",
"accessCode": "12345",
"routingOrder": "3",
"roleName": "##OtherPerson"
}
]
}
}
],
"document": {
"documentId": "2",
"name": "Here is document two of the test",
"fileExtension": "docx",
"documentFields": [
{
"name": "Doc2Info",
"value": "here is doc2 info"
}
]
}
},
{
"compositeTemplateId": "3",
"serverTemplates": [
{
"sequence": "1",
"templateId": "4e2f0e2d-9888-xxxx-8da3-bbf70163233f"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"customFields": [
"this is the buyer"
],
"routingOrder": "1",
"roleName": "##Buyer1"
},
{
"name": "Kathy Langdon",
"email": "KathyLangdon1#xxx.com",
"recipientId": "2",
"customFields": [
"this is the seller"
],
"routingOrder": "2",
"roleName": "##Seller1"
}
],
"certifiedDeliveries": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "3",
"accessCode": "12345",
"routingOrder": "3",
"roleName": "##OtherPerson"
}
]
}
}
],
"document": {
"documentId": "3",
"name": "Here is document three of the test",
"fileExtension": "docx",
"documentFields": [
{
"name": "Doc3Info",
"value": "here is doc3 info"
}
]
}
}
],
"status": "sent",
"emailSubject": "Please sign the following document at 9:26 AM"
}
Like I said, document1.docx was repeated 3 times in the envelope ( these documents are only 1 page each ).
You are not specifying the Document bytes in your Composite Template.
Since the Document bytes are not included in your Composite template, the Server templates documents will be used to create the envelope. That's the reason you are seeing the same doc from the server template being repeated three times.
Change your document property in each composite template as below. I have added the documentBase64 property.
"document": {
"documentId": "1",
"name": "Here is document one of the test.docx",
"fileExtension": "docx",
"documentFields": [
{
"name": "Doc1Info",
"value": "here is doc1 info"
}
],
"documentBase64" : "[Include the base64 of the .docx file here]"
}

3 docs in Docusign envelope, only one gets delivered

I can't figure out why the only document that gets delivered here is the first one. The roles on doc 1 are : buyer, seller, doc2 has seller and lawyer, doc3 has buyer and seller. I purposely left off a template role for lawyer. Here is what the envelope definition looks like:
{
"documents": [
{
"documentId": "1",
"name": "Here is document one of the test.docx",
"fileExtension": "docx",
"documentFields": [
{
"name": "Doc1Info",
"value": "here is doc1 info"
}
],
"documentBase64": [bytearray]
},
{
"documentId": "2",
"name": "Here is document two of the test",
"fileExtension": "docx",
"documentFields": [
{
"name": "Doc2Info",
"value": "here is doc2 info"
}
],
"documentBase64": [bytearray]
},
{
"documentId": "3",
"name": "Here is document three of the test",
"fileExtension": "docx",
"documentFields": [
{
"name": "Doc3Info",
"value": "here is doc3 info"
}
],
"documentBase64": [bytearray]
}
],
"customFields": {
"textCustomFields": [
{
"name": "My file id",
"value": "1823456"
}
]
},
"eventNotification": {
"url": "http://requestb.in/opiu2bop",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "Delivered"
},
{
"envelopeEventStatusCode": "Completed"
},
{
"envelopeEventStatusCode": "Declined"
},
{
"envelopeEventStatusCode": "Voided"
},
{
"envelopeEventStatusCode": "Sent"
}
],
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "false",
"includeEnvelopeVoidReason": "false",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "false"
},
"templateId": "xxxx-ad34-4a2e-a375-069ce2df630c",
"templateRoles": [
{
"email": "KathyGilbert11#xxx.com",
"roleName": "##Buyer1",
"name": "Kathy Gilbert",
"routingOrder": "1"
},
{
"email": "KathyLangdon1#xxx.com",
"roleName": "##Seller1",
"name": "Kathy Langdon",
"routingOrder": "2"
}
],
"status": "sent",
"emailSubject": "Please sign the following document at 9:49 AM"
This has nothing to do with roles. Since you are specifying "ServerTemplate" in your request along with some additional documents. This is considered as a compositeTemplate.
In a single Composite Template you can only overlay ONE document. You will have to use multiple CompositeTemplates in your request to overlay all the three documents.
Here is a working code which overlays multiple documents on a server template. I have simplified your example below(removed connect & custom field related info). It should still work if you add that information back.
Tip: If you want to retain the documents in your server Template, you can move the Document(documentId:1) specified in the first Composite Template( ID:1) to the second CompositeTemplate (ID:2). The final envelope will have 3 more documents in addition to the documents on your serverTemplate
{
"emailSubject": "Testing multiple docs",
"status": "sent",
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "XXXXXX-2f8a-4cfc-907b-4c84cb523426"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Byer One",
"email": "buyerone#acme.com",
"roleName": "##Buyer1",
"recipientId": "1",
"routingOrder": "1",
}
]
}
}
],
"document": {
"documentId": "1",
"name": "Here is document one of the test",
"fileExtension": "docx",
"documentBase64": "[Bytes Removed]"
}
},
{
"compositeTemplateId": "2",
"inlineTemplates": [
{
"sequence" : "3",
"documents": [
{
"documentId": "2",
"name": "Here is document two of the test",
"fileExtension": "docx",
"documentBase64": "[Bytes Removed]"
},
{
"documentId": "3",
"name": "Here is document three of the test",
"fileExtension": "docx",
"documentBase64": "[Bytes Removed]"
}
]
}
]
}
]
}

Docusign signer got document that I did not think they would receive

I am using one server template. I have 3 documents. Doc 1 and Doc 3 need to be signed by buyer and seller. Doc 2 needs to be signed by seller and attorney. The envelope definition looks like this:
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Keaton",
"email": "KathyKeaton1#outlook.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
},
{
"name": "Kathy Lori"xxx,
"email": "kathyxxx#outlook.com",
"recipientId": "2",
"routingOrder": "2",
"roleName": "##Seller1"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "Here is document one of the test.docx",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
},
{
"compositeTemplateId": "2",
"serverTemplates": [
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy xxx,
"email": "kathyxxx#outlook.com",
"recipientId": "2",
"routingOrder": "2",
"roleName": "##Seller1"
}
]
}
}
],
"document": {
"documentId": "2",
"name": "Here is document two of the test",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
},
{
"compositeTemplateId": "3",
"serverTemplates": [
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Keaton",
"email": "KathyKeaton1#outlook.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
},
{
"name": "Kathy xxx",
"email": "kathyxxx#outlook.com",
"recipientId": "2",
"routingOrder": "2",
"roleName": "##Seller1"
}
]
}
}
],
"document": {
"documentId": "3",
"name": "Here is document three of the test",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
}
],
"status": "sent",
"emailSubject": "Please sign the following document at 12:47 PM"
}
My question is: Doc 2 went to my first signer, even though they had no signing tabs on that document. Why did that happen?
Take a look at the document visibility feature of DocuSign. If you have doc visibility 'off', then all recipients in an envelope will have visibility to all documents in the envelope. If you have it enabled, then a recipient will need to have at least one DocuSign tab assigned to them to view the document (and all the pages this document contains). If a document has zero tabs, then it should be viewable by all.

Using webhook with Docusign - will I be able to get custom fields?

I created an envelope with one signer, 1 template, 3 different docs. I added a custom field to the envelope. I send off the envelope and get the response back on the url I specified. I look at the response and I don't see the custom envelope field in there. Should it be sent along with the response? Here is what I sent:
{
"customFields": {
"textCustomFields": [
{
"name": "file id",
"value": "1823456"
}
]
},
"eventNotification": {
"url": "http://requestb.in/16avl8c1",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "Delivered"
},
{
"envelopeEventStatusCode": "Completed"
},
{
"envelopeEventStatusCode": "Declined"
},
{
"envelopeEventStatusCode": "Voided"
},
{
"envelopeEventStatusCode": "Sent"
}
],
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "false",
"includeEnvelopeVoidReason": "false",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "false"
},
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "Here is document one of the test.docx",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
},
{
"compositeTemplateId": "2",
"serverTemplates": [
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
}
]
}
}
],
"document": {
"documentId": "2",
"name": "Here is document two of the test",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
},
{
"compositeTemplateId": "3",
"serverTemplates":
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
}
]
}
}
],
"document": {
"documentId": "3",
"name": "Here is document three of the test",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
}
],
"status": "sent",
"emailSubject": "Please sign the following document at 3:20 PM"
}
Connect webhook response will contain the Envelope Custom Fields if they were added to the envelope successfully.
For CompositeTemplates the CustomFields specified at the root level are ignored. You should specify the Custom Fields within the inline template.
Troubleshooting Tip:You can do an additional Check to see if the Custom Fields are created by using listCustomFields api.
Here is an example.
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"customFields": {
"textCustomFields": [
{
"name": "file id",
"value": "1823456"
}
]
},
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
}
]
}
}
]
}

Resources