Notes
Salesforce Flow Builder is a powerful tool that allows users to build complex business automations without writing code. However, like any automation tool, flows can fail, resulting in errors during execution. When a flow fails, the running user receives an unclear error message. Salesforce sends an email to the user who last modified the flow or to specified email addresses, providing details about the failed execution, including user-entered data.
To handle flow errors, users can utilize the "Fault Connector" feature. This connector helps users understand what went wrong and take appropriate actions. In Screen Flows, the Fault Connector can be used to display friendly error messages to users, making use of rich text and images. Users can also add actions such as creating a record or sending an email to notify about the error.
When a Fault Connector is used, the flow action is considered successful, even though the flow itself encounters an error. This is similar to the behavior of try-catch blocks in Apex classes. As a result, the running user will not see an error message, and the rest of the flow can continue processing other actions.
To enhance the error emails sent by Salesforce, users can create their own custom error email templates. They can use assignments in the flow to store custom information, such as the location where the flow failed, and include this information in the email along with {!$Flow.FaultMessage}, important variable values, running user's name, and the date/time of the failure.
Overall, using Fault Connectors and custom error email templates allows for better error handling and communication in Salesforce Flow Builder.