0

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"
         }
      }
   ]
}

James M
  • 27
  • 4

1 Answers1

1

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

Nima
  • 392
  • 1
  • 4
  • Thanks for the reply! Still no luck after changing the sequence so that the serverTemplate is set to 1 and inlineTemplates set to 2. Still digging through docs for more clues but just wondering if any other issue might come to mind. Thanks either way! – James M Dec 30 '20 at 17:59
  • After some trial and error, looks like the issue was both the sequence as well as the `tabLabel` used. For some reason setting the label to `contractor pop` (with a space) within the DocuSign template didn't allow us to use the same label to add a value via the API. After changing it to `contractorPop` in both the template and the request body, it's now working as expect. – James M Dec 30 '20 at 18:49