Ashwin Jacob
Ashwin Jacob

Reputation: 35

Populate docusign company tab

In docusign, we created a template with two fields: Full Name and Company. For the company field, there is a unique data label id that was filled in. You can see a screenshot below

Docusign Company Id

Now, I am using the docusign api to create an envelope, populate the fields, then open a signing console. When I am creating the envelope, I send the following JSON payload to restapi/v2/accounts/UNIQUE ID/envelopes

{
   "emailSubject": "Some Subject",
   "status": "sent",
   "compositeTemplates": [
      {
         "serverTemplates": [
            {
               "sequence": "1",
               "templateId": "SOME ID"
            }
         ],
         "inlineTemplates": [
            {
               "recipients": {
                  "signers": [
                     {
                        "name": "Ashwin Jacob",
                        "email": "[email protected]",
                        "recipientId": "1",
                        "clientUserId": "1",
                        "status": "sent",
                        "embeddedRecipientStartURL": "SIGN_AT_DOCUSIGN",
                        "roleName": "Advisor",
                        "tabs": {
                           "companyTabs": [
                              {
                                 "tabLabel": "Company 33ff014b-79a4-464f-b6c0-c4846861f3df",
                                 "value": "ashwinjacob1"
                              }
                           ]
                        }
                     }
                  ],
                  "carbonCopies": null
               },
               "sequence": "1"
            }
         ]
      }
   ]
}

The full name will appear on the docusign console. However, the company name will not appear. As you can see I am using the same datalabel as indicated in the screenshot(sorry it is cut off).

I also noticed that envelope form data has no value. So clearly it is not being sent along, but I am not sure what I am doing wrong in the JSON contract.

Docusign Form Data

Any suggestions on what I am doing wrong here?

Updates I took the suggestion about using text label and I am still getting no luck.

Text Label

Here is the new JSON payload

{
   "emailSubject": "Some Subject",
   "status": "sent",
   "compositeTemplates": [
      {
         "serverTemplates": [
            {
               "sequence": "1",
               "templateId": "SOME ID"
            }
         ],
         "inlineTemplates": [
            {
               "recipients": {
                  "signers": [
                     {
                        "name": "Ashwin Jacob",
                        "email": "[email protected]",
                        "recipientId": "1",
                        "clientUserId": "1",
                        "status": "sent",
                        "embeddedRecipientStartURL": "SIGN_AT_DOCUSIGN",
                        "roleName": "Advisor",
                        "tabs": {
                           "textTabs": [
                              {
                                 "tabLabel": "Company Label",
                                 "value": "ashwinjacob1"
                              }
                           ]
                        }
                     }
                  ],
                  "carbonCopies": null
               },
               "sequence": "1"
            }
         ]
      }
   ]
}

Upvotes: 1

Views: 528

Answers (2)

Ashwin Jacob
Ashwin Jacob

Reputation: 35

After some playing around, if you want to insert your own custom text tab from the API then you need to insert it through the API. You can't edit an existing custom text tab that is on the docusign template.

Upvotes: 0

Amit K Bist
Amit K Bist

Reputation: 6818

You cannot prepopulate Company Tab from your envelope creation request. DocuSign automatically populates this value if the signer has a DocuSign account and has Company value available in his/her My Preferences. As an alternative, if you want to prepopulate some text for Company using API, then you should use a Text Tab instead of Company Tab, and make it read only.

Upvotes: 1

Related Questions