Docusign Client Document Data

With docusign there is a way to send user data to a document.

The use case we use is that we have clients who sign the inline form. We fill in all the data from our database.

Thus, the main contract is the same, but we need to send some values, such as the contract number, name, address and price to the document that we signed. What would be the best way to achieve this?

I saw client tags mentioned for this purpose, but it looks like we can only do this in the classic view, which makes it look like this will not be a supported feature in the new version.


Update:

I still stay where I am.

I tried to do what was suggested and set textCustomFields

However, no matter what I pass in the label that I set is not displayed.

For instance.

I have a Name field in my document, and I also have a text field with a data label: contractid

Then I try to transfer the data in my envelope as described in the documentation (I have not found an example of this anywhere yet)

string requestBody = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" + "<status>sent</status>" + "<emailSubject>DocuSign API - Embedded Signing example</emailSubject>" + "<templateId>" + templateId + "</templateId>" + "<templateRoles>" + "<templateRole>" + "<email>" + recipientEmail + "</email>" + "<name>" + recipientName + "</name>" + "<roleName>" + templateRole + "</roleName>" + "<clientUserId>1</clientUserId>" + // user-configurable "</templateRole>" + "</templateRoles>" + "<customFields>" + "<textCustomFields>" + "<fieldId>contractid</fieldId>" + "<name>contractid</name>" + "<required>true</required>" + "<show>true</show>" + "<value>123</value>" + "</textCustomFields>" + "</customFields>" + "</envelopeDefinition>"; 

The name field is displayed correctly in the contract, but it is a custom field predefined by Docusign

However, the contractid field simply shows a space, since no data was sent to it.

I even tried to add information to the call to my view when I show my contract, and that also does nothing.

Maybe I'm wrong, but still can not find good documentation on how to send user data to the contract through the REST API.

Edit:

Here is a screenshot of my setup, and I tried to add text tabs to the envelope and a request to view the document.

I have to say that I worked with the Multiple Rest API, including working with Twilio, Phaxio, Twitter, and this implementation of the Rest API looks the most confusing, every time I come across what does

enter image description here

+4
source share
3 answers

For those who use XML and try to automatically fill in the data

 string requestBody = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" + "<status>sent</status>" + "<emailSubject>DocuSign API - Embedded Signing example</emailSubject>" + "<templateId>" + templateId + "</templateId>" + "<templateRoles>" + "<templateRole>" + "<email>" + recipientEmail + "</email>" + "<name>" + recipientName + "</name>" + "<roleName>" + templateRole + "</roleName>" + "<clientUserId>1</clientUserId>" + // user-configurable "<tabs>" + "<textTabs>" + "<text>" + "<anchorString>follows:</anchorString>" + "<value>Initial Data Goes</value>" + "</text>" + "</textTabs>" + "</tabs>" + "</templateRole>" + "</templateRoles>" + "</envelopeDefinition>"; 

Then, anywhere in your document, there are the following words: you will have the text, and you can change it to display it where you want to use other fields.

0
source

We are working on our implementation of DocuSign and can do what you are looking for with the addition of textTabs to the signers object. I have attached my POC code in PowerShell, which shows formatted tabs.

We create contracts in Word 2013 and use bindings to host everything. The original document will have something like // SIGNATURE // in the text, but before release it will be highlighted and changed to a white font, so the final contract will perfectly display in DocuSign.

enter image description here

The results in this (except that I destroyed the name and title) enter image description here

Put your API key and credentials in the login function and configure the recipient information at the top. The script creates and sends an envelope with a document called "contract.docx"

 [string]$recipientEmail = " mr.mann@bluesbrothers.com " [string]$recipientName = "Mr. Mann" [string]$recipientFirstName = "Mann" [string]$recipientTitle = "CEO, Mann, Inc." function boundry { [System.Guid]::NewGuid().ToString() } function encodeFile { param ([string]$fileName) [System.Convert]::ToBase64String([IO.File]::ReadAllBytes((Resolve-Path $fileName).ProviderPath)) } function logonParams { [string] $userName = 'YOUR USER NAME' [string] $password = 'YOUR PASSWORD' [string] $integratorKey = 'YOUR INTEGRATOR KEY' @" { "Username" : "$userName", "Password" : "$password", "IntegratorKey" : "$integratorKey" } "@ } function logon { [string] $loginURL = 'https://demo.docusign.net/restapi/v2/login_information' $headers = @{ "X-DocuSign-Authentication"=$(logonParams); "accept"="application/json"; "content-type"="application/json"; } $r = Invoke-WebRequest -uri $loginURL -headers $headers -method GET $responseInfo = $r.content | ConvertFrom-Json $baseURL = $responseInfo.loginAccounts.baseURL $baseURL } function createEnvelope { param ([string]$contractFile, [string]$baseURL ) [string]$boundry = boundry $headers = @{ "X-DocuSign-Authentication"=$(logonParams); "accept"="application/json"; "content-type"="multipart/form-data; boundary=$boundry"; } [string]$formData = @" --$boundry Content-Type: application/json { "status":"sent", "emailBlurb":"$recipientFirstName, Here is a test contract that I uploaded to DocuSign and routed through their webservice API.", "emailSubject": "Test Contract $(date)", "authoritativeCopy" : "true", "documents": [ { "name": "$contractFile", "documentId":"1", "order":"1" } ], "recipients": { "signers" : [{ "email" : "$recipientEmail", "name" : "$recipientName", "title" : "$recipientTitle", "recipientId":"1", "tabs" : { "signHereTabs" : [{ "anchorString" : "//SIGNATURE//" }], "fullNameTabs" : [{ "anchorString" : "//SIGNATURE_NAME//", "font" : "Calibri", "fontSize" : "Size11", "anchorYOffset" : -10 }], "titleTabs" : [{ "anchorString" : "//SIGNATURE_TITLE//", "font" : "Calibri", "fontSize" : "Size11", "anchorYOffset" : -10 }], "dateTabs" : [{ "anchorString" : "//SIGNATURE_DATE//", "font" : "Calibri", "fontSize" : "Size11", "anchorYOffset" : -10 }], "textTabs" : [ { "anchorString" : "//INVOICE_NAME//", "font" : "Calibri", "fontSize" : "Size11", "anchorYOffset" : -10, "value" : "My Invoice Name", }, { "anchorString" : "//INVOICE_ADDRESS1//", "font" : "Calibri", "fontSize" : "Size11", "anchorYOffset" : -10, "value" : "My Invoice Address 1", }, { "anchorString" : "//INVOICE_ADDRESS2//", "font" : "Calibri", "fontSize" : "Size11", "anchorYOffset" : -10, "value" : "My Invoice Address 2", }, { "anchorString" : "//INVOICE_ADDRESS3//", "font" : "Calibri", "fontSize" : "Size11", "anchorYOffset" : -10, "value" : "My Invoice Address 3", }, { "anchorString" : "//INVOICE_EMAIL//", "font" : "Calibri", "fontSize" : "Size11", "anchorYOffset" : -10, "value" : " somebody@somewhere.com " } ], } }] } } --$boundry Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Content-Transfer-Encoding: base64 Content-Disposition: file; filename="$mainFile";documentid=1 $(encodeFile $contractFile) --$boundry-- "@ $envelopeURL = "$baseURL/envelopes" Invoke-WebRequest -uri $envelopeURL -headers $headers -body $formData -method POST } $baseURL = logon createEnvelope "contract.docx" $baseURL 
+1
source

This will be done through the DocuSign API. You can create a template based on this contract and add fields that need data. Then, when creating an envelope, you can set the data that is filled in these fields.

More information can be found here.

EDIT:

Sample code can be found here.

Custom fields refer to custom envelope fields, which are elements that can be used to record envelope information, help you find envelopes and track information, not tabs.

You will need textTab:

  <textTabs> <text> <anchorIgnoreIfNotPresent>sample string 35</anchorIgnoreIfNotPresent> <anchorString>sample string 31</anchorString> <anchorUnits>sample string 34</anchorUnits> <anchorXOffset>sample string 32</anchorXOffset> <anchorYOffset>sample string 33</anchorYOffset> <conditionalParentLabel>sample string 39</conditionalParentLabel> <conditionalParentValue>sample string 40</conditionalParentValue> <documentId>sample string 26</documentId> <pageNumber>sample string 28</pageNumber> <recipientId>sample string 27</recipientId> <tabId>sample string 36</tabId> <templateLocked>sample string 37</templateLocked> <templateRequired>sample string 38</templateRequired> <xPosition>sample string 29</xPosition> <yPosition>sample string 30</yPosition> <bold>sample string 21</bold> <font>sample string 20</font> <fontColor>sample string 24</fontColor> <fontSize>sample string 25</fontSize> <italic>sample string 22</italic> <tabLabel>sample string 19</tabLabel> <underline>sample string 23</underline> <concealValueOnDocument>sample string 16</concealValueOnDocument> <disableAutoSize>sample string 17</disableAutoSize> <locked>sample string 15</locked> <maxLength>18</maxLength> <name>sample string 10</name> <originalValue>sample string 12</originalValue> <required>sample string 14</required> <value>sample string 11</value> <width>13</width> <requireAll>sample string 9</requireAll> <requireInitialOnSharedChange>sample string 7</requireInitialOnSharedChange> <senderRequired>sample string 8</senderRequired> <shared>sample string 6</shared> <validationMessage>sample string 5</validationMessage> <validationPattern>sample string 4</validationPattern> <formula>sample string 3</formula> <height>1</height> <isPaymentAmount>sample string 2</isPaymentAmount> </text> </textTabs> 
-one
source

All Articles