Salesforce Flow errors happen all the time. However, you can still manage a clean user experience even when these errors occur. When you give users a clear error message, you are letting them know what’s wrong. That is called Salesforce Flow fault handling, or the act of managing, debugging, and avoiding errors in your Salesforce Flows.
Understanding Unhandled Fault
An unhandled fault is something that happens in your Flow when it goes against what Salesforce expects. That could entail something as simple as pushing a record without a required field being populated or something more complex like a governor limit hit.
Flow Error Messages
If you’re a user who’s going about your day and suddenly sees an error without a human-friendly explanation, it can get frustrating. You may find yourself looking for workarounds outside the system just to get rid of the error.
Errors are inevitable, and they are bound to happen at times, especially on complex Flows. What you want, instead, is to let your users know the specific cause of the error. If it can get easily fixed, the more essential it is to provide clear error messages. That way, they can finish their tasks.
Avoiding Flow Errors
To prevent a fault, you may use a decision to check specific criteria before continuing, then loop the user if you need to clean up or collect more information. You can make custom screens to explain an error.
For example, if you want your users to know that the Account they’re referencing no longer has Contacted, you can send a screen explaining this after the Get Contacts. Then, put a Decision element that decides whether the countContacts variable is more significant than or equal to one.
If the Account has less than one Contact, you can let the user go back and select a new Account or simply close the Flow. Whichever of the two, you’ve effectively avoided an error.
Flow Errors by Inactive Users
Flow errors may also happen due to inactive users or when someone leaves the organization. If a user is no longer active, you can cause an error when you try to resume a paused Flow interview.
To solve this issue, you can freeze your users and check that all Flow interviews assigned to that user are complete before deactivating them.
Ignoring Salesforce Flow Errors
You may also choose to ignore a Fault by dragging the Fault line to the success line. While this is not a recommended solution and should only really be executed in niche situations, it does not take away the fact that it solves the error.
An error will be thrown as you try to add a Contact to a Campaign, but your user can continue with the rest of the Flow.
Managing Flow Errors
If your IT Helpdesk runs inside of Salesforce, you can send an email with the details of the Flow error and create a Case to guarantee there is a follow-up. That can help build trust between your users and Salesforce as they learn that the platform constantly changes and improves. At least, they’re guaranteed that they won’t see the same error again and again.