Sub topic 1
What an approval process is and when to use one
Prerequisites
This chapter assumes you can:
- Move around Setup and open an object's configuration.
- Describe objects, fields, and records.
- Explain users, profiles, roles, and queues.
- Read validation rules and formula fields.
The Apex sections later in the tutorial also assume basic Apex and SOQL. This chapter has no code.
What an approval process does
An approval process is a Salesforce feature that routes a record to one or more people who must approve or reject it. The process defines which records qualify, who reviews them, in what order, and what happens after each decision.
Typical uses:
- A discount above 20% on an opportunity needs a sales director's sign-off.
- An expense record over a set amount needs a manager and then finance.
- A contract needs legal review before it becomes active.
A process works on one object. Each time a user submits a record, Salesforce creates a new approval request for it. The request moves through the steps until someone rejects it, every step approves it, or the submitter recalls it.
The life of one request
The diagram shows the states a record passes through.
While a request is pending, the record is usually locked. Only approvers and administrators can edit it. Locking is covered in a later chapter.
What makes it different from other automation
Salesforce offers several tools that react to record changes. An approval process is the one built for human decisions with a recorded outcome.
| Need | Better fit |
|---|---|
| A person must say yes or no, and the decision must be recorded | Approval process |
| Update fields or send email automatically when data changes | Flow |
| Block a save when data is invalid | Validation rule |
| Complex custom routing that a configured process cannot express | Flow or Apex, possibly with the approval API |
Three features set approval processes apart:
- Waiting on people. The process pauses until a user responds. Approvers get a work item they can act on from the record, email, or the Approval Requests related list.
- Built-in history. Every step records the actor, the decision, the date, and the comments.
- Record locking. The record cannot change under the approver while they review it.
When to choose one
Choose an approval process when all of these hold:
- The decision belongs to specific people or groups, not to a rule.
- The decision is yes or no, possibly across several ordered steps.
- You need an audit trail of who decided what and when.
- You want the record protected while it is under review.
Look elsewhere when the routing logic is highly dynamic, for example when approvers depend on data in other objects. A flow can often handle that, and Salesforce also offers Flow Orchestration and Flow-based approvals as alternatives. A later chapter compares these options and the limits that apply.
Common mistakes
- Using an approval process when a validation rule would do. If no human judgment is needed, automate the check.
- Forgetting that locked records block users and automation that edit them.
- Designing the process before listing who approves what. Write the steps on paper first.
Exercises
Exercise
A sales rep wants a discount over 20% reviewed by a sales director, and the company needs a record of who approved it and when. Should you use an approval process or a validation rule, and why?
Show answer
Use an approval process. A validation rule only blocks a save based on data. It cannot wait for a person's decision or record the approver, date, and comments. An approval process routes the record to the director and stores each step in the approval history.
Exercise
Name the three ways a pending approval request can end, other than being approved. What can happen to the record afterward?
Show answer
It can be rejected by an approver or recalled by the submitter or an administrator. In either case the record can be resubmitted, which starts a new approval request.