How to Implement Fault Paths in Salesforce Screen Flow

By | July 1, 2025

Salesforce Screen Flows are a powerful automation tool — but what happens when something goes wrong mid-flow? That’s where Fault Paths come into play.

In this blog, we’ll guide you step-by-step through implementing fault paths in a Salesforce Screen Flow, enabling you to display custom error messages, optionally log those errors, and ensure a better experience for both users and admins.

What is a Fault Path in Salesforce Flow ?

A Fault Path is a special connector in Flow Builder that is triggered only when a Flow element fails for example:

  • A record fails to create (due to a validation rule or required field),
  • An Apex action throws an exception,
  • A missing or null field causes an issue.

Instead of showing Salesforce’s generic error messages, you can catch the error and display a friendly custom screen, log the failure, and alert your admin.

Followings are steps to create screen flow using fault paths for giving Contact Creation Example

  1. Creating a New Screen Flow
    • Navigate to Setup → Flow → Click New Flow
    • Select Screen Flow and click Create
  2. Creating an Input Variable
    • Click New Resource → Select Variable
    • API Name: varRecordId
    • Data Type: Text
    • Check Available for Input
Variable Creation
Variable Creation
  1. Get Account Details
    • Add a Get Records element → Label it Get Account Info
    • Select Account as the object
    • Filter: Id Equals {!varRecordId}
    • Store only the first record into a variable named accountRecord
Get Account Info
Get Account Info
  1. Add a Screen for Contact Details
    • Add a Screen element → Label it Enter Contact Info
    • Add the following input fields:
      • Text: First Name
      • Text: Last Name
      • Email: Email
      • Checkbox: Is Primary
    • These fields will let the user input contact details.
Contact Creation Screen
Contact Creation Screen
  1. Create the Contact Record
    • Add a Create Records element → Label it Create Contact
    • Choose Contact as the object
    • Map the fields:
      • First Name → firstName
      • Last Name → lastName
      • Email → email
      • AccountId → varRecordId
      • IsPrimary__c → isPrimary (custom field if used)
Creating Contact Element
Creating Contact Element
  1. Setting up the Fault Path
    • Click the Create Contact element
    • Click the three-dot icon and choose Add Fault Path.
    • A red line (fault connector) will appear.
Adding Fault Path Element
Adding Fault Path Element
  1. Capturing the Error Message
    • Drag the red connector to a new Assignment element
      • Create a new Variable:
        • API Name: varErrorMessage
        • Data Type: Text
        • Check Available for Input
      • In the Assignment element:
        • Assign flow fault Error Message to varErrorMessage.
Error Message Assignment
Error Message Assignment
  1. Adding an Error Screen
    • Add a new Screen → Label it Error Message
    • Add a Display Text component with a friendly message: “We were unable to create the contact. Please check the entered values.”
    • Optionally append the system error: “System Error: {!varErrorMessage}”
Fault Screen Element
Fault Screen Element
  1. Add a Success Screen
    • Add another Screen → Label it Success Message
    • Display text: “Related Account Contact is created”
Success Screen Element
Success Screen Element
  1. Connecting the Elements
    • Connect Start → Enter Contact Info → Create Contact
    • Connect Create Contact → Success Message
    • Connect Create Contact → Assignment → Error Message
Complete Screen Flow
Complete Screen Flow
  1. Save and Activate the Flow
    • Click Save → Give your flow a name like Create Contact with Error Handling
    • Activate the flow
    • Now, add the flow to a Lightning page.
    • Here, we’ve have added the Screen flow in lightning page in Account record page for Contact creation.
Contact Creation
Contact Creation
  • For testing, try leaving a required field empty or entering an invalid email to trigger the fault path and confirm that the error screen appears.
Fault Message
Fault Message
  • If all the inputs are valid, the flow will create the Contact and show the success message.
Success Message
Success Message

By using Fault Paths in your Salesforce Screen Flows, you create a smooth and user-friendly experience even when something goes wrong. It’s an essential feature for every admin or consultant building robust flows in production orgs.

By following the above blog instructions, you will be able to learn “How to Implement Fault Paths in Salesforce Screen Flow”. If you still have queries or any related problems, don’t hesitate to contact us at salesforce@greytrix.com. More details about the Product are available on our website and Salesforce AppExchange.

We hope you may find this blog resourceful and helpful. However, if you still have concerns and need more help, please contact us at salesforce@greytrix.com.

About Us
Greytrix – a globally recognized and one of the oldest Sage Development Partner and a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners and Sage PSG across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.

Greytrix has some unique solutions for Cloud CRM such as Salesforce Sage integration for Sage X3Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data MigrationIntegrated App developmentCustom App development and Technical Support business partners and end users.
Salesforce Cloud CRM integration offered by Greytrix works with Lightning web components and supports standard opportunity workflow. Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star rated app listed on Salesforce AppExchange.

The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more information on our Salesforce products and services, contact us at salesforce@greytrix.com. We will be glad to assist you.

Related Posts