Automating Record Approval with Approval Processes
After workflow rules, another important member of the process automation family is approval processes. They are a way to define criteria to decide whether Salesforce users can submit a record for approval to managers and automatically apply the required actions depending on whether the record is approved or rejected. Think of a sales VP who needs to explicitly approve discounts applied to opportunities if they exceed 10%, or an HR manager who needs to approve employees’ expense logs. This can all be done through approval processes.
In this chapter, we’ll learn about the following:
- Setting up approvals
- Using approvals
- Limits and considerations when using approvals
Understanding approvals
Approvals are the standard way to allow record approval in our company hierarchy. If a record meets some specific criteria, the current user’s manager must evaluate it so that the business process can keep going according to business rules.
Let’s look at an example.
Opportunity creation has a two-tier approval process, based on the opportunity’s amount:
- Lower than $ 100,000: The opportunity is automatically approved.
- Between $ 100,000 and $ 1,000,000: The opportunity must be approved by the record owner’s manager.
- Higher than $ 1,000,000: The opportunity must be approved by the manager and CEO.
After the approval process is completed, the opportunity custom field Approval Status must be set to Approved or Rejected, depending on the outcome. In the meantime, the record must be kept locked so that no one can edit it until the approval evaluation is completed by the managers.
Before you start to build a new approval process, go through the following checklist (an example response for our previous use case). I have answered each question for your reference (the text in italics is the answers).
- Who should be allowed to submit the approval?
- Any user related to the record (the creator, owner, or whoever makes sense).
- How many approval steps do we need and who are the required actors?
- There are two steps, and the required actors are the manager and CEO.
- What are the conditions on the target record and related records that should trigger approval?
- The opportunity amount; the opportunity amount must be filled in and greater than $0.
- What should happen when a record is submitted, approved, or rejected?
- The approval status field needs to be updated and the record should be locked until it is approved or rejected.
- Which email templates are needed to notify managers of upcoming approval requests? Do you need Chatter posts to start approvals?
- Use an email template and Chatter posts to notify managers about approval requests and to notify approval requesters whether their opportunity has been approved/rejected.
- Can the approving user edit the locked record before the record is approved/rejected?
- The approving user cannot edit the record: the requesting user will be able to update the record based on their manager suggestions, which will be added along with the rejection (if it occurs).
After answering these questions, you should be able to start creating a new approval process.