Ranjit Ravindranath
Ranjit Ravindranath

Reputation: 1

how to Bring pre-created custom field from docusign Sandbox to envelope using REST api?

I have created some custom fields in my Docusign Sandbox, but I'm unable to bring them onto my envelope while sending it for eSignature.

I want Docusign custom fields to write back data to Salesforce fields when signer has entered some value and signed the document

I have tried it with the below JSON. The envelope is created but I can't find the custom fields

{
 "emailBlurb": "String content",
 "emailSubject": "String content",
 "enableWetSign": "true",
 "recipientsLock": "false",
 "status": "sent",
 "customFields": {
  "listCustomFields": [{
   "name": "String content",
   "required": "false",
   "show": "true",
   "value": "String content",
   "listItems": [
    "String content"
   ]
  }],
  "textCustomFields": [{
   "name": "Insurance Expiration",
   "required": "false",
   "show": "true",
   "value": "012/02/2111"
  }]
 },
 "templateId": "152bacc1-9d5d-4243-9fe4-9dafe0785164",
 "templateRoles": [{
  "email": "[email protected]",
  "name": "ranjit",
  "roleName": "CFO",
  "emailNotification": {
   "emailSubject": "String content",
   "emailBody": "String content"
  },
  "tabs": {
   "textTabs": [{
    "tabLabel": "String content111",
    "name": "String content1",
    "value": "String content"
   }]
  }
 }],

 "emailSettings": {
  "bccEmailAddresses": [{
   "email": "[email protected]"
  }]
 },

"compositeTemplates": [{
    "inlineTemplates": [{
        "sequence": "1",
        "customFields": {
            "textCustomFields": [{
                "name": "Insurance Expiration",
                "required": "true",
                "show": "true",
                "value": "06/06/2010"
            }]
        },
        "recipients": {
            "signers": [{
                "name": "Millard Fillmore",
                "email": "[email protected]",
                "recipientId": "1",
                "routingOrder": "1"
            }]
        }
    }]
}]

} 

Upvotes: 0

Views: 315

Answers (1)

Rickey S
Rickey S

Reputation: 1244

When you send from Salesforce, there is information passed to document (such as the SourceID and Source Object Type), that DocuSign Connect will attempt to match to a record to process a request to push the data back into Salesforce.

When you send from the API you need to provide this data in order for Salesforce to know where you want information published back.

DocuSign API how to sync tags in template with Salesforce fields

https://salesforce.stackexchange.com/questions/92069/how-to-set-docusign-envelope-external-source-id-field-via-docusign-api

Those should help.

Upvotes: 0

Related Questions