[SalesForce] Get a name of an Approver in Approval Assignment Email

BACKGROUND

I have an approval process configured for Opportunities:

enter image description here

I defined the Approval Assignment Email Template as follows:

enter image description here

I am using 3 users in my org for this case:

  1. User Admin – (Profile: System Administrator; Role: n/a) – the user I am using to log into the org. This user is an Opportunity Owner, hence Initial Submitter.
  2. Courtney Brown – (Profile: Standard Platform User; Role: Manager (it's under VP, North American Sales)) – this user is defined as Manager for User Admin
  3. Allison Wheeler – (Profile: Standard Platform User; Role: VP, North American Sales)

PROBLEM

When I submit an opportunity for approval, I expect that user Courtney Brown will receive an email (based on the Discount Approval Request template) and see her name in the Greeting section.

enter image description here

Instead when I check the email, I see the name of the User Admin:

Dear,
User Name: User Admin
Process_Assignee: User Admin
Process_Approver: User Admin

A new discount request approval is pending. Please log in to your org
for details.

Best,
User Admin

I assumed that {!ApprovalRequest.Process_Approver} would give me the desired output, alas it didn't. I don't understand why this happens and if it is possible to achieve at all?

WHAT I GOOGLED (did't help)

How to get the approver name into an HTML email?
How to get name of the approver in Email template?

Best Answer

Create a separate text field like Approver__c (which will capture logged-in User Name) and update that field from Approval Actions via field update.

And, use this field in the Email template.

Related Topic