0

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"
                        }
                    ]
                }
            }
        ]
    }
]
}
  • Can you verify if Address is a correct tab on your first template? and it is better if you also put compositeTemplateId for each composite template. – Amit K Bist Nov 20 '17 at 15:27
  • Yes, it is named Address, and should compositeTemplateId be in place of templateId with the value being the same? – C. Trombatore Nov 20 '17 at 15:51
  • CompositeTemplateId should be in parallel with "serverTemplates" and "inlineTemplates", you can find structure at https://docs.docusign.com/esign/restapi/Envelopes/Envelopes/create/#/definitions/compositeTemplate. Since you are putting two composite template, so first one should be compositeTemplateId - 1 and another one should be compositeTemplateId - 2 – Amit K Bist Nov 20 '17 at 15:57

1 Answers1

0

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"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ]
}
Kim Brandl
  • 13,125
  • 2
  • 16
  • 21