Huzaifa Shakir
Huzaifa Shakir

Reputation: 5

DocuSign: Is there a way to set custom fields in the document in a template and then later replace with unique values while creating the envelope?

What I want is to place the custom fields at document level while creating the template so that later I can have unique values for every envelope that is created. These values should be visible to all the recipients.

These are the steps that I currently follow:

  1. Create Document Custom Fields/Tab Definitions at the Account level.
  2. Create the template from our app and navigate to DocuSign to place the above created custom fields on the document (it is signer specific).
  3. Save the template.

At a later stage, choose the template in our app and create an envelope with the template ID, templateRoles (with custom fields' values for signer), status etc. like below:

{
    "templateId": "1e6c1118-1234-1244-1244-c4a11111775b",
    "templateRoles": [
            {
                "roleName": "Signer1",
                "name": "Signer1",
                "email": "[email protected]",
                "tabs": {
                    "textTabs": [
                        {
                            "tabLabel": "Account.Name",
                            "value": "account-name777"
                        },
                        {
                            "tabLabel": "Candidate.FullName",
                            "value": "candidate-name1234"
                        },
                        {
                            "tabLabel": "Candidate.Mobile",
                            "value": "0412347777"
                        }
                    ]
                }
            },
            {
                "roleName": "Signer2",
                "name": "Signer2",
                "email": "[email protected]",
                "tabs": {
                    "textTabs": [
                        {
                            "tabLabel": "Account.Name",
                            "value": "account-name777"
                        },
                        {
                            "tabLabel": "Candidate.FullName",
                            "value": "candidate-name1234"
                        },
                        {
                            "tabLabel": "Candidate.Mobile",
                            "value": "0412347777"
                        }
                    ]
                }
            }
    ],
    "status": "sent"
}

The above works for Signer1 but does not show the custom fields' values to Signer2. The custom fields need to be exactly the same for all recipients. Is there a way to achieve this?

Also what I noticed was after Signer1 signs the document then the custom fields' values show to Signer2.

Upvotes: 0

Views: 1393

Answers (1)

Inbar Gazit
Inbar Gazit

Reputation: 14005

Change the tabLabels so they are not the same, here is the code:

{
    "templateId": "1e6c1118-1234-1244-1244-c4a11111775b",
    "templateRoles": [
            {
                "roleName": "Signer1",
                "name": "Signer1",
                "email": "[email protected]",
                "tabs": {
                    "textTabs": [
                        {
                            "tabLabel": "Account.Name1",
                            "value": "account-name777"
                        },
                        {
                            "tabLabel": "Candidate.FullName1",
                            "value": "candidate-name1234"
                        },
                        {
                            "tabLabel": "Candidate.Mobile1",
                            "value": "0412347777"
                        }
                    ]
                }
            },
            {
                "roleName": "Signer2",
                "name": "Signer2",
                "email": "[email protected]",
                "tabs": {
                    "textTabs": [
                        {
                            "tabLabel": "Account.Name2",
                            "value": "account-name777"
                        },
                        {
                            "tabLabel": "Candidate.FullName2",
                            "value": "candidate-name1234"
                        },
                        {
                            "tabLabel": "Candidate.Mobile2",
                            "value": "0412347777"
                        }
                    ]
                }
            }
    ],
    "status": "sent"
}

Upvotes: 0

Related Questions