I'm a Java developper and I'm trying to use docusign composite template but I have some issues. I created 3 template A,B,C on docusign which have one different document each and 1 signature area on each document, the signature of the document A is on the first page, for B it's on the third page.
What I would like to do, is create an envelop with 3 new documents, and apply a template on each document. So I upload document 1 which match with template A, document 2 with template B etc..
But currently when I do that. It seems that the template are merged and the first document have several templates in it, so 2 signatures area, one on the first page (Template A) and one on the third page (Template C).
When I did that, the envelop is created with the 3 documents:
But document A have template A and B,
document B does not have any template.
document C have template C.
I tried to do so with API with this request
{
"status": "created",
"templateId": "TEMPLATE_D",
"templateRoles": [
{
"email": "xx",
"name": "xx",
"roleName": "Signer"
}
],
"compositeTemplates": [
{
"compositeTemplateId": "1",
"document": {
"documentBase64": "x",
"documentId": "1",
"fileExtension": "doc",
"name": "DOC_A'.doc",
"order": "1"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "xx",
"name": "xx",
"recipientId": "1",
"roleName": "Signer"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "TEMPLATE_A"
}
]
},
{
"compositeTemplateId": "2",
"document": {
"documentBase64": "x",
"documentId": "2",
"fileExtension": "doc",
"name": "DOC_B'.doc",
"order": "2"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "xx",
"name": "xx",
"recipientId": "3",
"roleName": "Signer"
}
]
},
"sequence": "4"
}
],
"serverTemplates": [
{
"sequence": "3",
"templateId": "TEMPLATE_B.doc"
}
]
},
{
"compositeTemplateId": "3",
"document": {
"documentBase64": "x",
"documentId": "3",
"fileExtension": "doc",
"name": "DOC_C'.doc",
"order": "3"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "xx",
"name": "xx",
"recipientId": "5",
"roleName": "Signer"
}
]
},
"sequence": "6"
}
],
"serverTemplates": [
{
"sequence": "5",
"templateId": "TEMPLATE_C"
}
]
}
]
}
What I want is use the template D for the envelop. Substitue Doc A in the template A with a new doc A' to Keep only the signature AREA (the documents are quite the same except some wordings). Same with B' and C'
So to put it another way, you have a server template that you want to include in your envelope, but substitute a different document for the one in the template? And you want to do this 3 times (3 different server templates).
Try the following.