Sub topic 8
Approval processes for sign-off steps
This chapter assumes you know how to create fields and records in Setup, and that you have read the earlier chapters on Flow and the clicks-before-code principle. You do not need to write Apex.
What an approval process does
An approval process is a declarative feature that routes a record to one or more people for a formal decision. Each approver can approve or reject the record. The process records who decided, when, and with what comments. It can also lock the record while it waits.
Use an approval process when the requirement contains words like "needs sign-off", "manager must approve", or "requires an audit trail of decisions."
The parts of an approval process
| Part | Purpose |
|---|---|
| Entry criteria | Decides which records can be submitted, for example Amount greater than 50,000. |
| Approval steps | Define who approves, such as a manager, a queue, or a named user. |
| Initial submission actions | Run when the record is submitted, for example locking the record. |
| Final approval actions | Run when every step is approved, for example updating a status field. |
| Final rejection actions | Run when a step is rejected, for example setting the status back to Draft. |
| Recall actions | Run when the submitter withdraws the request. |
Actions in a process can update a field, send an email alert, create a task, or send an outbound message. You can also start a flow from an approval action.
Example requirement
A sales team says: "Any opportunity over 50,000 needs the sales manager's approval before the Stage can move to Closed Won."
A workable design:
- Add a picklist field
Approval_Status__cwith values Draft, Pending, Approved, Rejected. - Create an approval process on Opportunity with entry criteria
Amount > 50000. - Add one step that routes to the submitter's manager.
- On initial submission, set
Approval_Status__cto Pending. - On final approval, set it to Approved. On final rejection, set it to Rejected.
- Add a validation rule that blocks Closed Won when the amount is over 50,000 and the status is not Approved.
The validation rule is what enforces the policy. Without it, users can skip the approval and move the stage directly.
Common errors
- Using an approval process for automatic logic. If no human decision is needed, a record-triggered flow is simpler.
- Forgetting the lock. A locked record can only be edited by admins and approvers. Users who need to fix data may be blocked, so decide whether locking is right for the process.
- No fallback approver. If the manager field is empty, the submission fails. Define what happens when the approver is missing.
- Overlapping automation. A flow or trigger that edits the record during approval can conflict with the lock or cause unexpected updates. Later chapters on the order of execution cover this.
Approval process or Flow Orchestrator
Approval processes fit one record with a small number of sequential or parallel approvers. If the work spans several users, several stages, and tasks beyond approving, such as legal review followed by finance setup, consider Flow Orchestrator. It is covered in a later chapter.
Exercise
A manager must approve any discount above 20 percent on a quote. Name two additions, besides the approval process itself, that make the policy enforceable and visible to users.
Show answer
First, a status field updated by the approval actions, so users can see whether the discount is Pending, Approved, or Rejected. Second, a validation rule that blocks the next stage, such as sending the quote, unless the status is Approved. Without the validation rule, users can bypass the approval.