Sub topic 8
Field updates, email alerts, tasks, and outbound messages
This chapter covers the four action types an approval process can run. It assumes you know what an approval process is, how steps and approvers work, and that actions attach to the initial submission, approval, rejection, and recall events. You should also be comfortable with fields, email templates, and basic Setup navigation.
The four action types
Approval actions use the same types as workflow rules. You add them at three levels:
- Initial submission actions run when a record enters the process.
- Step actions run when a step is approved or rejected.
- Final approval, final rejection, and recall actions run when the process ends or is pulled back.
| Action type | What it does | Typical use |
|---|---|---|
| Field update | Changes a field value on the record | Set Status to "Approved" |
| Email alert | Sends an email from a template | Notify the submitter of a rejection |
| Task | Creates a task for a user or role | Ask a rep to follow up |
| Outbound message | Sends a SOAP message to an external endpoint | Tell an ERP system a discount is approved |
Field updates
A field update is the most common action. It sets a field to a fixed value, a blank, or the result of a formula. Pick the object being approved, the field, and the new value.
Use field updates to track state. A typical pattern uses a custom picklist field called Approval Status:
- Initial submission: set Approval Status to "Submitted".
- Final approval: set it to "Approved".
- Final rejection: set it to "Rejected".
- Recall: set it back to "Draft".
Reports and validation rules can then read this field without querying approval history.
A field update on a locked record works. Approval field updates run with system privileges, so they succeed even though the record is locked. The "Re-evaluate workflow rules after field change" option on the field update can start other workflow rules. Leave it off unless you need it, because it can cause surprising chains of automation.
Email alerts
An email alert needs an email template, recipients, and an optional from-address. Recipients can be users, roles, public groups, or related users such as the record owner or creator.
Approvers already get a request email when a work item is assigned. Add email alerts only for other audiences, such as the submitter on final rejection or a manager when a record is recalled.
Tasks
A task action creates a Task record. You set the assignee, subject, status, priority, and a due date. The due date can be relative to the date the action runs, such as 3 days later.
Use a task when someone must do work after the decision. For example, after final approval of a discount, assign a task to the contracts team to prepare the paperwork. The task is related to the approved record through its What ID, so it appears in the record's Activity timeline.
Outbound messages
An outbound message sends a SOAP message with selected fields to an endpoint URL. You choose the fields, the endpoint, and the user the message runs as. Salesforce retries delivery for up to 24 hours if the endpoint does not acknowledge it.
Use outbound messages to notify external systems without writing code. If you need REST or more control, consider a Flow or Apex callout triggered by a field change set by the approval.
Common errors
- The record locks before your field update runs. Lock behavior does not block actions, so check the update's target field and criteria instead.
- Emails do not arrive. Check the template is active, the recipient has a valid address, and email deliverability is set to "All email".
- Outbound messages repeat. The endpoint must return an acknowledgment, or Salesforce resends.
- A field update fails silently. Check that the field is writable and that the new value passes validation rules.
Exercise
A rep recalls a discount request. You want Approval Status to return to "Draft" and the manager to be told. Which actions do you add, and where?
Show answer
Add a field update that sets Approval Status to "Draft" and an email alert to the manager. Both go under the recall actions of the approval process.
Exercise
Why might you choose a task over an email alert after final approval?
Show answer
A task creates trackable work with an owner and due date. An email alert only informs and leaves nothing to track.