How to Use Fault Path in Salesforce Flow

Fault Path in Salesforce Flow

If your Flow includes a DML element such as Create, Update or Delete records, or a Submit for Approval core action, then there is a possibility that it might fail. For example, a create or update may fail if it does not pass the validation rule. And when the flow fails, Salesforce displays a standard message in red text that reads “An unhandled fault has occurred in this flow”. But with an error message like this, users will have no clue of what happened and if they did anything wrong.

A better option is to use something called ‘Fault’ path in Flow. Fault Path is also called Fault Connector or Fault Line. With Fault path, you can display a more meaningful message and guide users on what to do. To create a fault path, create a screen element with useful message and connect it to the DML element. 

Customize the Error Message

For screen element you can use  ‘Display Text’ or ‘Display Image’ components to make the error message visually appealing, pun-intended and in-context. For e.g. you can add an emoji with some stylized text to inform users of the error that happened. 

Taking Error Handling to Next Level

With Fault path, you are not restricted to just displaying a custom error message. You can also add other components of Flow such as

  • Assignment Element – To capture some information in a variable
  • Text Template Resource – To draft a template with variable values to be used in email
  • Send Email Core Action – Use the values from variable to send an email with error details to system administrator
  • Create Records Element – to create a Case and assign it to your IT department

Error handling in Salesforce Flow seems like an interesting feature with multitude of possibilities. In this short guide we will be building on the Flow that we configured in the Step By Step Guide to creating Screen Flow in Salesforce. If you haven’t looked at the screen flow guide, I will recommend that you go through that post first, configure the Flow and then come back here to continue with this guide. In this guide you will learn how to:

  • Add a Static Resource in Salesforce
  • Add Fault Path to Flow Element
  • Test Custom Flow Error Message

and it won’t take more than 10-15 minutes of your time

Not an “All Access” Pass Member Yet?

Get Download Access to this & 150+ More Step-by-Step Guides with “All Access” Pass. A simple and single plan to access our entire library of courses, guides, workshops & masterclasses on Salesforce.

Introducing Mastering Salesforce Flows Training Course

Liked this post? We are now offering a complete self-paced, video-based training course on Mastering Salesforce Flows. The course comes with downloadable step-by-step PDF guides, unlimited access, free upgrades, community discussion area, free preview and more. For more details, please click here.

Need Help with Flows?

Need advice on Flows? I also offer advisory & consulting services on Salesforce Flows. So, whether you want to create new Flows or migrate existing automations (Workflow Rules, Process Builder, Triggers) to Flows, I can help you analyze, design, plan & review. To initiate a discussion, please submit the contact form here stating your requirement or schedule a discussion at this URL.

References & Useful URLs

4 thoughts on “How to Use Fault Path in Salesforce Flow”

  1. How can we add a fault path in a “before save” (fast field update) flow? (and if we can’t, what is best practice for handling errors in “before save” flow?

    1. Hi Aaron, you can add the fault path in before save flow the same way as is shown in the guide on this blog post. in Flow builder, click on the element and select the option “Add Fault Path”.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass