You are here:
Set Up Advanced Approval Email Templates
Create a Salesforce email template and link it with an Advanced Approvals email template record. Your advanced approval process sends this email in response to a request, rejection, recall, or approval. (Salesforce CPQ Managed Package)
Required Editions
| Available in: Salesforce CPQ Summer ’16 and later with Advanced Approvals 3.1 and later |
Your approval rule contains lookup fields for request, approval, rejection, and recall emails. We recommend creating email templates for all four and assigning them to your approval rules. We’ll walk through setting up a request email, but you can follow the same steps for your rejection, recall, and approval. All you have to change are their names and the Salesforce email’s text.
-
Create a Salesforce email request template.
- From Setup, in the Quick Find box, enter Communication Templates, and then select Classic Email Templates.
- Select New Template.
- Select Visualforce as the email template type, and then click Next.
- Enter your email template information. For this example, we’ll use “Request Template.”
-
Choose the folder where you want to store your email template.
Make sure that the folder is publicly accessible if you want your email template to be publicly accessible.
- Select Available For Use.
- Enter your email template name and template unique name.
- Choose your encoding, description, and email subject, and then set User as your recipient type.
- Set Related To Type to sbaa__Approval__c, and then save your changes.
-
In your template, click Edit Template to add the text and any
markup that you want to show in your approval email. The email template must contain a
reference to the ID of your approval record. The reason ID must be at the top of the
template.
Because users don’t have to see this code, you can add style tags so that the text doesn’t appear on the approval email. We recommend styling the code’s text color as white, because most emails have a white background color. Write your code as follows:
<p style="color:white"><apex:outputText value="{!relatedTo.ID}"/></p> - Repeat this process for your rejection, approval, and recall templates.
-
Create an Advanced Approval email template record.
- In your email templates object, click New.
-
Enter your email template name.
Because you’re connecting this approval template to the template you made in Step 1, you can name it “Approval Request Template.”
-
In the Template ID field, enter the ID of the Salesforce request template you made in
Step 1.
You can find the ID by going to your Salesforce approval request template, finding the URL in your browser, and copying the string of numbers and letters after
salesforce.com/. - Click Save.
Did this article solve your issue?
Let us know so we can improve!

