docusignapidocusigncompositetmplts

DocuSign TextTab values not populating in composite template envelope


We are using the request body below to create a new envelope that includes two templates and a file upload. Everything is working as expected, except the fact that we are not able to populate the TextTab with the value included in the request body.

The envelope gets created, but the value for the tab is just an empty string and the field is empty when it's received by the signer. I've looked at examples in the DocuSign support docs, as well as similar questions on SO, and as far as I can tell, I don't see anything wrong with the request. Any thoughts what we might be missing? Thanks!

{
   "compositeTemplates":[
      {
         "compositeTemplateId":"1",
         "inlineTemplates":[
            {
               "recipients":{
                  "signers":[
                     {
                        "tabs":{
                           
                        },
                        "email":"contractor@example.com",
                        "name":"Contractor Name",
                        "recipientId":"1",
                        "roleName":"Contractor",
                        "routingOrder":"2"
                     }
                  ]
               },
               "sequence":"1"
            }
         ],
         "serverTemplates":[
            {
               "sequence":"1",
               "templateId":"f804d2c8-863b-4f87-a982-762fcc49207d"
            }
         ]
      },
      {
         "compositeTemplateId":"2",
         "inlineTemplates":[
            {
               "recipients":{
                  "signers":[
                     {
                        "tabs":{
                           "textTabs":[
                              {
                                 "tabLabel":"contractor pop",
                                 "value":"John Doe"
                              }
                           ]
                        },
                        "email":"tw@example.com",
                        "name":"Your Name Here",
                        "recipientId":"1",
                        "roleName":"TW"
                     },
                     {
                        "tabs":{
                           
                        },
                        "email":"contractor@example.com",
                        "name":"Contractor Name",
                        "recipientId":"1",
                        "roleName":"Contractor",
                        "routingOrder":"2"
                     },
                     {
                        "tabs":{
                           
                        },
                        "email":"legal@example.com",
                        "name":"Law Yer",
                        "recipientId":"3",
                        "roleName":"Legal"
                     }
                  ]
               },
               "sequence":"2"
            }
         ],
         "serverTemplates":[
            {
               "sequence":"2",
               "templateId":"eb86f21c-3b0f-4cb4-bed9-6b7435e3646a"
            }
         ]
      },
      {
         "compositeTemplateId":"3",
         "inlineTemplates":[
            {
               "recipients":{
                  "signers":[
                     {
                        "tabs":{
                           
                        },
                        "email":"contractor@example.com",
                        "name":"Contractor Name",
                        "recipientId":"1",
                        "roleName":"Contractor",
                        "routingOrder":"2"
                     }
                  ]
               },
               "sequence":"3"
            }
         ],
         "document":{
            "documentId":"3",
            "documentBase64":"UEsDBB.......AAAAAA==",
            "fileExtension":"docx",
            "name":"Additional Documents"
         }
      }
   ]
}


Solution

  • I suspect the sequence numbers are the culprit here. The serverTemplate is providing the document and should get the sequence = 1.

    The inlineTemplates (which includes the tabs) should be overlaid on top of serverTemplate and should get sequence = 2.

    Here is an article that has some great tips and pitfall when it comes to working with compositeTemplats: https://www.docusign.com/blog/dsdev-why-use-composite-templates