Skip to main content

Configure Email Alerts for Approvers and Approval Requests

Learning Objectives

After completing this unit, you’ll be able to:

  • Configure email templates for different types of approval actions.
  • Configure your Advanced Approvals package to recognize approval responses from approvers.

Email Template Types

The Advanced Approvals package sends Visualforce emails in response to sales rep and approver actions. Define templates for each type of email and associate them with an approval rule.

An approval template is a Salesforce email template that’s been configured with custom logic for the Advanced Approvals package. Approval rules let you configure template lookups for approval requests, recall requests, approval responses, and rejection responses. Define them in the Email Notifications section of your approval rule.

The Email Notifications related list on an approval rule. A user has populated the Quote Request Template, Approval Template, and Rejection Template fields.

To ensure that approvers receive an approval request email, the approval process requires an approval request template associated with your approval rule. For example, when a sales submits an approval, Advanced Approvals looks for the template associated with the rule’s Request Template field, and sends an email based on that template to the rule’s approver.

A flowchart showing the steps that Advanced Approvals follows after a sales rep clicks the Submit for Approval button.

Here’s an example of what an approver might see in an approval request email.

A sample approval request email. It is styled so that the approver sees the name of the user who submitted the request, and the ID of the object sent for approval. A table shows important fields and values pulled from the object. A link at the bottom of the email allows the approver to open the object in Salesforce.

Advanced Approvals also supports email templates for approval responses, rejection responses, and approval recalls.

  • Approval Response: An approver approves one of their approval requests. This action changes the record’s Approval Status field value to Approved at the end of the approval cycle. Advanced Approvals then sends an approval email to the Approval Recipients.
  • Rejection Response: An approver rejects an approval request. This action changes the record’s Approval Status field value to Rejected at the end of the approval cycle. Advanced Approvals then sends a rejection email to the Rejection Recipients.
  • Approval Recall: A sales rep recalls an approval so they can revise a record before it’s approved. This action changes the object’s Approval Status field value to Recalled at the end of the approval cycle. Advanced Approvals then sends a recall email to the sales reps and other approvers in the approval chain.

The Approval Recipients and Rejection Recipients fields control which users receive the approval accepted emails and approval rejection emails. We recommend at least including the record owner (of the record out for approval) and the initial submitter (the user who made the approval request).

An approval rule record contains lookups to all four types of templates. That way, you can associate different types of a certain template with different rules. For example, you might want different language in a rejection email for a discount-based approval rule than for a markup-based approval rule.

Set Up an Advanced Approvals Email Template

To create an approval email template, make a basic Salesforce email request template and then link it to an email template record. Note that these steps will only work if your org has the Advanced Approvals package installed.

Create the Salesforce Email Template

  1. From Setup, in the Quick Find box, enter Classic Email, then select Classic Email Templates.
  2. Select New Template.
  3. Select Visualforce as the email template type, and then click Next.
  4. Enter your email template information. For this example, enter a name of Request Template.
  5. Choose the folder where you want to store your email template.
  6. Make sure that the folder is publicly accessible if you want your email template to be publicly accessible.
  7. Select Available For Use.
  8. Enter your email template name and template unique name.
  9. Choose your encoding, description, and email subject, and then set User as your recipient type.
  10. Set Related To Type to sbaa__Approval__c, and then save your changes.
  11. 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.
  12. Users don’t have to see this code, so add style tags to keep the text from appearing 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>

In Step 11, we recommend using markup to create a simple and easy-to-read layout so that sales reps or approvers can review information about their request. For example, if your approval rule tests the quote’s net amount and partner discounts, include a table that pulls in the value of those fields so that approvers and customers can quickly reference the values without opening the quote in Salesforce.

We’ve provided a few samples here customized for approval actions related to a quote. You would use these in the Edit Template section of the Salesforce template creation process. Each template begins with a header informing the email recipient of the action. They also contain a Deal Information table showing the customer account, the date the action was requested, the opportunity stage, quote amount, quote discount percentage, payment terms, and approval status.

Create the Advanced Approvals Email Template Record

  1. In your email templates object, click New.
  2. Because you’re connecting this approval template to the template you made in Step 1, name the template “Approval Request Template.”
  3. In the Template ID field, enter the ID of the Salesforce request template you made in Step 1.
  4. 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/. For example:
    1. https://testorg.salesforce.com/00Y38000000QLe5?setupid=CommunicationTemplatesEmail
  5. Click Save.

Approval Response Comments and Keywords

When an approver gets an approval request email, their email response controls whether Advanced Approvals sends an approval email or rejection email to the requester. Advanced Approvals considers everything above a predefined area to be a comment, where the approver can explain why they accepted or rejected the approval. The Advanced Approvals package setting Approval Email Comments End Indicator controls which area of the response email constitutes a comment.

  • Line Break: Everything between the first and second line break is considered a comment.
  • Blank Line: Everything between the first line break and first blank line is considered a comment.

You can also use the Approved Keywords and Rejected Keywords so that Advanced Approvals automatically sends the requester an approval or rejection email based on whether the comment contains a certain keyword. Here are some recommendations.

Approved Keywords: Approved,Approve,Yes

Rejected Keywords: Rejected,Reject,Decline,No

For example, an approver could write the following in their email response: 

Thank you for your submission. Unfortunately, I have to reject this approval request as our budget doesn't have the room for a 20% partner discount.

When they send the email, the requester receives a rejection-template email with the approver’s comment. Advanced Approvals then changes the approval record’s status to Rejected and updates any related objects (such as tracked fields) as necessary.

Approver Reminder Emails

We recommend configuring reminder emails to send out reminders if approvers haven’t responded to a request within a certain timeframe. For more information, review Schedule Approver Reminder Emails.

Inbound Approval Email Relays

The Advanced Approvals package requires the name of an email relay service that it can use to send the automated approval emails. Enter the service name in the Inbound Approval Email (Long) field in Advanced Approvals package settings. 

Email templates provide a convenient way to show important approval information or change the status of an approval without accessing your Salesforce account. In the next unit, we look at configuring the Advanced Approvals package so that approvers don’t have to reevaluate approval requests for unchanged conditions.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities