Approval Process in Salesforce

by | Nov 26, 2022 | Salesforce, Salesforce Admin

Introduction

As the name suggests, an Approval Process lets us specify a sequence of steps required to approve a record. The Approval Process automates how records are approved, and this includes:

  • Whom to request approval from?
  • What’s to be done at each step of the process?

Salesforce allows us to specify the following in an approval process:

1. Approval Actions

  • Initial Submission Actions
    These include the actions executed when a user submits a record for approval. By default, the action, Record Lock, is invoked. This action locks the record from being edited. Additionally, we can create the following approval actions: Task, Email Alert, Field Update, and Outbound Message.
  • Final Approval Actions
    These include the actions executed when a record is approved after the final approval (an approval can consist of multiple steps with multiple user approval required). This action can also lock or unlock a record, as indicated. Additionally, we can create the following final approval actions: Task, Email Alert, Field Update, and Outbound Message.
  • Final Rejection Actions
    These include the actions executed when a record is rejected at any point in the approval steps. This action can also lock or unlock a record, as indicated. Additionally, we can create the following final rejection actions: Task, Email Alert, Field Update, and Outbound Message.
  • Recall Actions
    These include the actions that are executed when a record is recalled during the approval steps. We can create the following recall actions: Task, Email Alert, Field Update, and Outbound Message.

2. Approval Steps

An Approval Process can include one or more steps. Each step can consist of a separate approver as specified.

Let’s understand Approval Steps with the help of an example:

A User submits a request for an Opportunity record Approval. When an Opportunity is given a discount above 30%, the Opportunity must be approved by both the User’s manager and the CEO.

Diagram Description automatically generated

Let’s break down this approval process:

  1. The User submits an Opportunity record for approval as the discount percentage exceeds 30%. When the User submits the request, the default initial submission action locks the record (only the admin and approvers can update it while it’s pending approval).
  2. Approval Step #1 – The User’s direct manager receives the approval request. The manager has two options here:
    1. If the request is Rejected, the final rejection actions are executed, and the approval status is updated to Rejected.
    2. If the request is Approved, the record moves to Approval Step #2.
      1. The CEO (Approver #2) can take one of these decisions:
        1. If the request is Rejected, the final rejection actions are executed, and the approval status is updated to Rejected.
        2. Suppose the request is Approved by the CEO. In that case, the record status is updated to Approved, the final approval actions are executed, and the record is unlocked.

Build an Approval Process

Let’s build an approval process in our orgs. The management requires an Opportunity to be approved by the direct manager of the submitter if the Opportunity Discount is greater than 30%.

1. Create an Email Template

Let’s start by creating an email template to notify the submitter’s manager when an opportunity has been discounted by more than 30%.

  1. In Setup, type Templates in the Quick Find Box, and then click Classic Email Templates.
  2. Click New Template.
  3. Select Text for template type and click Next.
  4. Enter the following:
    • Folder: Unified Public Classic Email Templates
    • Available for Use: Selected
    • Email Template Name: Opportunity Record Approval
    • Encoding: General US & Western Europe
    • Subject: Please Approve this Discounted Opportunity
    • Email Body: ({!User. Manager} is a merge field and can be added to the email body from the available merge fields section) :
      {! User.Manager},
      The {!Opportunity.Name} has been discounted. Please approve this discount.
      Thank you.

Graphical user interface, text, application Description automatically generated

5. Click Save.

2. Add Custom Fields

Let’s create two custom fields → discount percent and approval status.

  1. From Setup, open Object Manager and select Opportunity.
  2. Open Fields & Relationships and click New.
  3. For Field Type, select Percent, and click Next.
  4. Enter the following:
    • Field Label: Discount Percent
    • Required: Selected
  5. Click Next, Next, and Save & New.
  6. For Field Type, select Picklist, and click Next.
  7. Enter the following:
    • Field Label: Opportunity Status
    • Values: Enter values, one value per line
    • Picklist Values:
      Approved
      Rejected
  8. Click Next, Next, and Save.

3. Create an Approval Process

We’re onto the final piece of the puzzle. Let’s go ahead and create the Approval Process!

  1. From Setup, type Approval Processes in the Quick Find Box, and click Approval Processes.
  2. In Manage Approval Process For, choose Opportunity.
  3. Click New Approval Process and select Use Jump Start Wizard.
  4. Enter the following:
  • Name: Discounted Opportunity Approval
  • Approval Assignment Email Template: Opportunity Record Approval
  • Specify Entry Criteria:
    • Field: Opportunity: Discount Percent
    • Operator: greater than
    • Value: 0.3
  • Select Approver: Let the submitter choose the Approver manually

5. Click Save and Close.

6. Click View Approval Process Detail Page.

7. Under Final Approval Actions, click Add New and select Field Update.

  • Name: Approved
  • Field to Update: Opportunity Status
  • Picklist Option: A specific value | Approved
  • Click Save.

8. Under Final Rejection Actions, click Add New and select Field Update.

  • Name: Rejected
  • Field to Update: Opportunity Status
  • Picklist Option: A specific value | Rejected
  • Click Save.

Text Description automatically generated

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.