Skip to main content

Flow Fault Paths

Explore practical guides and implementation patterns for this topic.

Posts

Salesforce Basics

Mastering Salesforce Flow Fault Paths, Subflows & Invocable Apex: The Complete Guide

πŸ’¬ In plain words: A Flow Fault Path functions as a built-in try/catch block. Without it, end users hit cryptic unhandled error screens and developers lose critical troubleshooting context. Subflows serve as modular, reusable functions. When declarative capabilities hit architectural boundaries, hand execution off to Apex using an @InvocableMethod . πŸ“Œ Example: Consider a refund Screen Flow that triggers an external payment gateway. Without a Fault Path, a gateway timeout presents an unformatted red error screen. With a configured Fault Path, the flow gracefully captures {!$Flow.FaultMessage} , logs the event to an Integration_Log__c record, notifies the user that the refund is queued, and routes the transaction for automated retry. Architectural Concept Production-grade flows require defensive architecture. Add a Fault Path to any declarative step prone to failure, including Get Records , Create Records , Update Records , Delete Records , and Core Acti...