Latest Update : 

Before-Save vs After-Save Flows: What You Need to Know

July 03, 2025
1339 Views
Before-Save vs After-Save Flows: What You Need to Know
Summarize this blog post with:

Salesforce Flow has become the low-code automation powerhouse in the platform, giving admins and developers the ability to automate business logic efficiently. But when you’re designing a Record-Triggered Flow, one of the first critical choices is:

Before-Save vs After-Save flows – which one should I use?

Choosing the wrong one can lead to performance issues, errors, or unexpected results. Let’s explore the difference and when to use each.

Before-Save Flow: What It Is & When to Use

Introduced in Spring ’20, Before-Save flows (also called Fast Field Updates) run before the record is committed to the database, similar to a “before trigger” in Apex.

Best for: Fast field updates on the same record.

  • Super-fast execution
  • Only allows field updates to the triggering record
  • Cannot create related records
  • Cannot invoke actions (e.g., email alerts, Apex, DML)
  • No access to the record after it’s saved

When to Use Before-Save Flow

Use Before-Save Flow when you need to update fields on the same record that triggered the flow.

Examples:

  • Auto-fill a field based on another value (e.g., set Status = ‘New’ if Priority = ‘High’)
  • Calculate a discount based on a picklist value
  • Set a record owner based on region
  • Default values before save
Why use Before-Save Flow
  • 10x faster than after-save flows for field updates
  • Reduces need for Apex code
  • No additional DML operations required
Also Read

Don’t forget to checkout: WhatsApp Salesforce Integration: Top Use Cases for 2025.

After-Save Flow: What It Is & When to Use

After-Save flows run after the record is committed to the database. Think of them as equivalent to “after triggers” in Apex.

Best for: Complex logic, DML, and external operations.

  • Can access the record after save
  • Can create/update/delete related records
  • Can call Apex, send emails, and submit for approval
  • Can access related record values using Get Records or $Record > Relationship.Field

When to Use After-Save Flow

Use After-Save Flow when you need to perform actions that require access to related records or other objects.

Examples:

  • Create a related Contact when an Account is created
  • Send a welcome email when a user signs up
  • Create a task when an Opportunity is moved to “Closed Won”
  • Update a parent record based on child changes.
  • Can’t update the same record that triggered the flow directly (you’ll need another DML).
  • Adds extra overhead if used incorrectly
Why use After-Save Flow
  • Allows creation or update of related records
  • Can send email alerts, post to Chatter, or call Apex
  • Supports access to the record ID and related objects
  • Enables complex automation and multi-record processing
  • Ideal for actions that require data to be committed first

Design Tips & Best Practices

  • Use Before-Save whenever possible for basic field updates.
  • For related object changes or external calls, use After-Save.
  • Avoid updating the same record in an After-Save flow to prevent recursion.
  • Keep your flows modular — split complex logic across multiple flows if needed.
  • Use Decision elements wisely — unnecessary checks slow down the flow.

Before-Save vs After-Save Flows: Practical Use Cases

Use Case 1: Auto-assign Priority

  • Object: Case
  • Logic: If Type = High, set Priority = P1
  • Before-Save (Simple field update)

Use Case 2: Create Task on Opportunity Closed

  • Object: Opportunity
  • Logic: When Stage = Closed Won, create follow-up Task
  • Best Flow: After-Save (Related record creation)

Before-Save vs After-Save: Comparison Table

Feature Before-Save Flow After-Save Flow
Runs Before Commit Yes No
Runs After Commit No Yes
Update triggering record Yes (Only this record) No (Needs DML)
Create/Update related records No Yes
Send Emails / Apex / Approvals No Yes
Performance Fast Slower
Ideal Use Case Same record updates Complex logic, DML, side-effects
Before-Save vs. After-Save

Salesforce recommends using Before-Save flows over After-Save flows for field updates wherever possible, especially in high-volume environments. This reduces unnecessary DML and improves transaction speed.

How to Choose the Right Flow Type

Ask yourself these key questions:

  • Just updating the current record? → Use a Before-Save Flow
  • Need to create/update other records or send emails? → Use an After-Save Flow
  • Need performance and want to avoid extra DML? → Use Before-Save
  • Need full access to record context or Salesforce ID? → Go with After-Save

Conclusion

Your choice between before-save and after-save flows should be based on what your flow needs to do and when it needs to do it.

  • Use before-save for fast, in-memory field updates on the triggering record
  • Use after-save for complex logic involving related objects, record creation, or notifications

By understanding their capabilities, limitations, and the order of execution, you’ll be able to design efficient and scalable flows that align perfectly with your Salesforce automation goals.

FAQ’S

No. Before-save flows cannot create new records. Use after-save for that.

Only after-save flows can send email alerts, post to Chatter, or call external systems.

No. They perform field updates without DML, which helps avoid hitting governor limits.

  • Before-Save: Auto-set Case Priority to “High” when Type = “Urgent”
  • After-Save: Create a follow-up Task and notify Owner after Opportunity is Closed Won

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Written by

Khumed Khatib

8x Salesforce certified || Senior Engineering Lead Salesforce at Persistent Systems || 2x Ranger || Blogger || LWC || Aura||integration

Get the latest tips, news, updates, advice, inspiration, and more….

Contributor of the month
contributor
Pradnya Desai

Senior Technical Architect at Salesforce

...
Categories
...
Boost Your Brand's Visibility

Want to promote your products/services in front of more customers?

...

Leave a Reply

Your email address will not be published. Required fields are marked *