After-Save Flow
Learning Content
Last updated: July 21, 2026
After-Save Flow
An After-Save Flow is a Record-Triggered Flow that executes after Salesforce saves the record to the database but before the transaction is committed. Since the record has already been saved, the flow has access to the record's Salesforce Id and can perform actions that depend on the existence of the record.
After-Save Flows are commonly used to create related records, update related objects, send notifications, invoke subflows, call Apex actions, and orchestrate business processes that extend beyond the current record.
💡 LearnFrenzy Insight
Imagine an online shopping website.
After your order is successfully placed, the system sends a confirmation email, creates a shipment request, updates inventory, and notifies the warehouse.
These activities happen after the order has been saved.
An After-Save Flow works in exactly the same way—it performs post-save business processes once the record exists.
Where Does After-Save Flow Execute?
Database Save
│
▼
After Trigger
│
▼
Workflow Rules
│
▼
Process Builder
│
▼
⭐ After-Save Flow
│
▼
Roll-Up Summary
│
▼
Commit Transaction
After-Save Flows execute after the record has been written to the database. Because the record already exists, they can work with related records and perform broader automation than Before-Save Flows.
Why Use an After-Save Flow?
| Capability | Description |
|---|---|
| Create Related Records | Create child or dependent records. |
| Update Related Records | Modify parent, child, or sibling records. |
| Send Notifications | Notify users or external systems. |
| Invoke Subflows | Reuse automation through modular Flow design. |
| Call Apex Actions | Execute complex business logic using invocable Apex. |
| Perform Cross-Object Automation | Coordinate updates across multiple Salesforce objects. |
Common Use Cases
| Business Requirement | After-Save Flow Solution |
|---|---|
| Create Follow-up Task | Create a Task after an Opportunity is won. |
| Create Child Records | Create Contacts, Cases, or custom records. |
| Update Parent Record | Synchronize Account information. |
| Send Notifications | Notify managers or customers. |
| Launch Business Processes | Call subflows or invocable Apex actions. |
Real Business Scenario
🏢 Business Example
When an Opportunity changes to Closed Won:
- Create an implementation Project record.
- Create onboarding Tasks.
- Update the related Account.
- Send a notification to the delivery team.
- Launch a subflow that prepares customer onboarding activities.
These actions require the Opportunity to already exist in the database, making an After-Save Flow the appropriate choice.
Before-Save Flow vs After-Save Flow
| Feature | Before-Save Flow | After-Save Flow |
|---|---|---|
| Runs Before Database Save | ✔ Yes | ❌ No |
| Record Id Available | No (Insert) | ✔ Yes |
| Create Related Records | ❌ No | ✔ Yes |
| Update Same Record | ✔ Best Choice | Possible but not recommended for simple updates |
| Cross-Object Automation | Limited | ✔ Excellent |
| Performance | Faster | Slightly More Processing |
After-Save Flow vs After Trigger
| Feature | After-Save Flow | After Trigger |
|---|---|---|
| Requires Apex | No | Yes |
| Visual Development | ✔ Yes | ❌ No |
| Complex Logic | Good | Excellent |
| External Integrations | Supported via invocable actions | Fully Supported |
| Best For | Declarative business automation. | Complex enterprise logic. |
🔍 Behind the Scenes: What Happens Internally?
Database Save Completed
│
▼
Record Exists
│
▼
After-Save Flow Starts
│
▼
Create Related Records
│
▼
Update Related Objects
│
▼
Launch Subflow / Apex
│
▼
Continue Transaction
│
▼
Commit Happens Later
Although the record has been saved, Salesforce keeps the transaction open until all remaining automation completes successfully. If an unhandled exception occurs later, Salesforce rolls back every change made during the transaction, including actions performed by the After-Save Flow.
Why After-Save Flow Matters
| Benefit | Explanation |
|---|---|
| Low-Code Automation | Build sophisticated automation without Apex. |
| Supports Related Records | Record Id is available. |
| Enterprise Processes | Coordinate actions across multiple objects. |
| Modern Salesforce Development | Recommended automation platform for most declarative solutions. |
✅ Best Practice
Use an After-Save Flow when your automation needs the record Id, creates or updates related records, sends notifications, or orchestrates multiple business processes. Keep the flow modular by using subflows for reusable logic.
⚠️ Common Mistake
Using an After-Save Flow for simple updates to the same record. For straightforward field updates on the triggering record, a Before-Save Flow is typically more efficient because it avoids an additional database update.
🎯 Interview Tip
Question: When should you choose an After-Save Flow instead of a Before-Save Flow?
Answer: Choose an After-Save Flow when the automation requires the record Id, creates or updates related records, sends notifications, launches subflows, or invokes Apex actions. Use a Before-Save Flow for efficient updates to the triggering record before it is saved.
- ✔ Executes after the record is saved.
- ✔ Record Id is available.
- ✔ Best for related-record and cross-object automation.
- ✔ Can invoke subflows and Apex actions.
- ✔ Transaction is still not committed.
- ✔ Rollback remains possible until the final commit.
➡ Next Lesson
In the next lesson, you'll explore Roll-Up Summary Recalculation, how Salesforce recalculates parent records after child record changes, and where this process fits into the overall Order of Execution.
Practice What You've Learned
Test your understanding with these practice exercises