Flow: How To Use Fault Connectors In Two Ways
At the end of How To Debug A Flow And Understand Error Messages, I briefly introduced how to customize the error messages with the fault connectors. Fault connector is our good friend because it adds a human touch to your flows and prevents people from panicking when errors show up. So to help you utilize fault connectors to the fullest, I want to show you two different ways to use the fault connectors and the examples!
1. Show Customized Error Message On A Screen
If you are using a Screen Flow, then setting up a screen for showing the errors is the best idea, especially if you are launching the flow with quick actions. By default, the error details won’t show on the quick action windows, so it might confuse your users and thus give people the impression that the solution might be buggy. By having a custom message, you can store all the input from the previous screen. It can also reassure your users that everything is under control and their admin (you!) can fix everything. Job security, yay!
Flow Chart
Example Message
Oops, something just went wrong. Please review the error message: Error: {!$Flow.FaultMessage} Error Time: {!$Flow.CurrentDateTime} Or reach out to your admin with this information: Update Account Flow {!$Flow.CurrentDateTime} - {!recordId.Name} ------------------------------------- The Input From Previous Screen: Name: {!Input_Name.firstName} Phone: {!Input_Phone.value}
BEFORE
AFTER
Furthermore, you can include the interview label that you configured in the flow’s properties to the error message, and ask your users to reach out using the same label. You as admin can then find the error email in your inbox quickly. Highly recommended if you have a huge org to maintain.
2. Send Customized Error Message In An Email
If you are not using a Screen Flow, you can use a Text Template and send the error message to the designated people. In the Process Automation Settings, you can only send the error emails to two types of recipients. By using the fault connectors, you can add additional email addresses. This would be very helpful if you have several admins managing your org.
Flow Chart
Example Message Template
An error occurred for Update Account Flow {!$Flow.CurrentDateTime} - {!recordId.Name} Running User: {!$User.FirstName} Error: {!$Flow.FaultMessage} Error Time: {!$Flow.CurrentDateTime} ------------------------------------- The Input From Previous Screen: Name: {!Input_Name.firstName} Phone: {!Input_Phone.value}
RESULT
(Check out another example on the Official Help Guide)
Note: How To Get The Fault Connector
You can only create fault connectors for Data and Action elements. Basically, you are telling the system: Go with the gray arrows, but if anything goes wrong, go with the red-dotted arrow. To get the fault connector, simply drag twice from an element.