Adding Custom Fields to the Envelope
When you send the documents for eSignature, you add custom DocuSign tags to the document. You can choose to set some initial values to the fields and also fetch the updated values if any from the fields in the template.
Use Case1
Suppose the agreement or proposal is sent to multiple recipients for signature, you can add tags to fields for each specific signer. For signer 1, add tags for Name and email and for signer 2 add tags for the name, email, and phone number.
Using the set Recipient Tabs API. you can set an initial value to a field in the generated document that is sent for signature. If the signer updates the field, you can fetch and update the field information to the account and other relevant objects in Salesforce using the get Recipient Tab APIs.
Use Case2
Suppose the agreement or proposal is to be sent to three recipients for signature, and you want to obtain the information from the signers. You can populate the fields such as Custom Tab1, Custom Tab2, and Custom Tab3 in your Salesforce org. You can add the custom tabs for the user to add their Name, Title, and Email.
You require a template that you want to send to your signers and you have to add tags to fields for each signer.
After signer1 enters his Name and Title and signs the document, it is sent to signer 2. After signer 2 enters his Name and Title and signs the document, it is sent to signer 3. After signer 3 signs the document, it is sent back to the sender. The Name and Title are the custom tabs and are populated in the Salesforce once the batch job is run.
Perform the following steps to achieve this scenario.
To add custom fields
Adding Apex Classes
You can set information to the signer fields using set Tabs for each Recipient and getTabs for each recipient. These APIs enable you to set information in the document and also enable you to fetch the information set in these tags such as name, email, or company name. You can fetch the data the user enters in these fields and update records for an object such as Account, Contact, or Opportunity.
- API to Get Custom Tabs If you want to update the information about the signer in records after the recipient signs and sends the agreement across, use the getCustomTabs APIs
- API to Set Custom Tabs The setTabs API enables you to set initial values for certain fields in the Agreement. The value you set using the setTabs API is displayed on the envelope. Set the initial values using this API before you initiate the eSignature request.
To add apex class
- Go to New. and click
- Paste the appropriate code.
- Click Save.