Skip to content Skip to main navigation Skip to footer

Customize Default Email Templates

Document Signed by Recipient

  1. This an email alert sent to the eSign Doc record owner to notify them if someone has signed the document. There is a Flow called Document Signed by Recipient which sends email.
  2. The email template used in this alert is called “Document Signed By Recipient Notification” and is a classic email template under the eSign Templates folder. You may edit this existing template.
  3. The Email Alert in Setup used in the Flow to send the email is called “Email to document owner”. You can edit the Email Alert to change which email template to use if you want to create a new one and to add or change who receives the email.
  4. Optionally you can deactivate the flow if you do not want this email alert or if you want to create your own Flow.

Document Signed Notification

  1. This is the email sent to all people who signed the document. It is not sent to the eSign Doc owner Salesforce user. This email includes a PDF attachment of the final document signed that includes all the eSignature information. So this is their copy of the document signed.
  2. This email is sent using Apex, so there is no Flow or Email Alert to adjust.
  3. The default email template that is sent is a classic email template under the eSign Templates folder and is called “Document Signed Notification”. You may modify this email template directly.
  4. If you wish to create your own classic email template you may do so. Also you may have a use case of needing more than one template to send to the signer depending on what the eSign Doc is related to or is. For example you may have different types of agreements being signed and want to customize the emails sent to the signers depending on that context.
  5. To do this you will first create your email template or templates as a classic email template.
  6. Then copy the Salesforce id of the email template in the url while looking at the email template.
    1. For example in this url of an email template: https://appsisv.lightning.force.com/lightning/setup/CommunicationTemplatesEmail/page?address=%2F00Xi0000000j0W0%3Fsetupid%3DCommunicationTemplatesEmail
    2. The Salesforce id is “00Xi0000000j0W0”. Its after the %2F and before the %3F. Its a 15 character id.
  7. Now create a Flow on the eSign Doc object when it is created to set the field eSign Doc.esign__Document_Signed_Email_Template__c with the salesforce id of the email template you want to send for this record. You can for example create conditional logic in your flow depending on the eSign Doc and what it is related to or any field criteria on that record or a related record to determine which template id to set. Setting this value will use this email template instead of the default one.

How to Merge eSign Fields into an Email Template

You can either merge fields from the eSign Object or from the base object. See details below for each option.

Merge Lookup Fields from the eSign Doc Object

  • Create an email template that is related to the base object and that you have already related to the eSign Doc object via lookup field. Make sure that email template is set to Available for Use.
  • Within the HTML email template builder, select eSign Doc Fields from the Select Field Type drop down list.
  • Find the field you want to merge from the Select Field drop down list.
  • Select the field you want to use. An email merge field will show in the Copy Merge Field Value field.
  • Copy/paste this value into your email template.

Example: The Opportunity Name field may look like this {!Opportunity.Name} when pulled directly from Opportunity field type though when this same field is selected from the eSign Doc Fields in email template builder, it shows as {!esign__Document__c.Opp_Name__c}.

Merge fields from Base Object, then Modify

With this method, you are merging the field from the eSign Doc object and need to have a merge field code that starts from the eSign Doc object through your lookup field to the field name on that related object. Important: Note the double underscore after esign and Opportunity (would be the same double underscore for your merge field format with esign and object name).

  • Create an email template that is related to the base object and that you have already related to the eSign Doc object via lookup field.
  • Add all your merge fields from the base object as you would normally.
  • Replace the base object part of the merge field with esign__Document__c. plus the api name of the lookup field on the eSign Doc object you created that relates it to the base object followed by __r.

Example: Let’s say you have a lookup field on the eSign Doc object called esign_Opportunity__c.  Normally when you merge a field in the email template builder from the Opportunity object it would merge as {!Opportunity.Amount}.  In this case, you would replace Opportunity with esign__Document__c.esign_Opportunity__r. This results in a final merge field of {!esign__Document__c.esign_Opportunity__r.Amount}.

Alternatively, you could create a formula field on the eSign Doc object and use the formula builder to merge the related field you want into that formula/text field.  This would allow you to build your email template from the eSign Doc object to merge the fields you want directly into the email template without needing to update anything in the merge field code since it would be merging directly from the eSign Doc object.  If you don’t want to create the formula fields on the eSign Doc object, then follow the steps above.

How to Add an eSign Button/Link to an Email Template

The eSignature link {!esign__Document__c.esign__eSign_Link__c} must be merged somewhere in the email body so that the recipient can sign the document.  You can create a hyperlinked text that says Click to Sign or an image button that opens the link when it is clicked (HTML templates only).

To create hyperlinked text, you can use this code as example:

<a href=”{!esign__Document__c.esign__eSign_Link__c}”>Click to Sign</a>

To use an image button, you’d first need your image to be uploaded to an externally available source. Then put the image URL in the HTML code in your email template, inside the “” and after scr=.
For example, the image url in the code below is bold:

<a href=”{!esign__Document__c.esign__eSign_Link__c}”><img alt=”Click Here to Sign” src=”https://operosignature.com/wp-content/uploads/2016/04/Email-Button.png” style=”width: 194px; height: 54px;” /></a>.