Skip to main content

We need to have a set of dynamic values populate in multiple places across many documents so we’ve chosen to use a template in which the first document is a ‘master sheet’ which contains pre-filled fields which populate across documents.

This work great in the UI but not via the API. I eventually discovered this doc which describes a specific method required to enable data replication from the API but I can’t get this to work with either regular text fields or pre-filled text fields.

I can’t tell if the docs are saying that the field data label needs to have “\*” in the UI or just in the API when updating but I’ve tried every combination I can think of and it only ever populates the first tab.

I’ve made sure the correct setting is enabled as described here and have tried using both the create document tabs and create recipient tabs APIs.

Has anyone else been able to get this working? Or can anyone describe a better strategy for what I’m trying to achieve?

@Daniel Metcalfe 

The process you're describing for data replication across multiple documents via the API can indeed be tricky.

Here are some points to consider:

  • When using the API, the tabLabel for the text fields you want to share should end with *. This is crucial for DocuSign to recognize these as shared fields. For example, if the field's label is ClientName, it should be ClientName*.
  • Make sure the shared fields setting is enabled in your DocuSign account.
  • Create the envelope with the necessary documents and recipients.
  • Make sure that the fields in the documents have the same tabLabel value (ending with 😉.

It seems that you tried to change the value of the prefill tab that was already defined in the template while creating the envelope. However, the prefill tabs are aimed at senders who use the DocuSign Web App. Senders who use the API should continue to use a "regular" tab instead. If you don't want the tabs to be updated by any recipients, you can lock (read-only) it.

To workaround this issue, once you create the template with the regular text tabs that share the same tabLabel value, you can create the envelope like the below payload to populate the same value across the tabs with the same tabLabel.

POST {baseUrl}/v2.1/accounts/{accountId}/envelopes

{
"templateId": "[TEMPLATE_ID]",
"templateRoles": [
{
"email": "[email]",
"name": "[name]",
"roleName": "[ROLE_NAME]",
"tabs": {
"textTabs": [
{
"tabLabel": "SharedTab1",
"value": "Hi1",
"locked": true
},
{
"tabLabel": "SharedTab2",
"value": "Hi2",
"locked": true
}
]
}
}
],
"status": "sent"
}

 


@JohnSantos thank you so much for your reply, I’ll try that. Is there any documentation you know of on this method though? It seems to contradict the documentation I found here.

@Byungjae.Chung thanks for the reply, I’ve heard of this method but it sounds like pre-fill tabs were created to avoid this workaround so would rather avoid if possible but good to know there is a plan B.


@Daniel Metcalfe 

I’m not aware of any specific documentation on this topic.  Perhaps you can explore the REST API Reference | Docusign site.   There is a lot of information there.


Just to report back that we took the advise to switch to regular fields which worked for us. Data replication now works for us even when creating envelopes via the API. Couple of additional points:

  • Confusingly, we didn’t have to add “\\*” to data labels to enable data replication like the developer docs claimed.
  • We had to assign the regular fields to a recipient which felt hacky.
  • We had to enable the setting “When an envelope is sent, write the initial value of the fields for all recipients” otherwise other recipients couldn’t see the values in the regular fields at all.

@Daniel Metcalfe 

Thanks for the feedback! Really appreciate it. Regarding the first point about the data replication documentation, I provided your feedback to the team in charge and it is being tracked by the Jira ticket DEVDOCS-15033. The team will investigate this issue and update it accordingly. 
 


Reply