+ Start a Discussion
goravsethgoravseth 

Any way to know which user triggered an unhandled fault in flow

Occasionally users do things they should not when using flows, such as entering multiple email addresses into an email field.

This triggers an unhandled proces fault, and I get the notification.

The notification, however, does not include the User ID of the user that triggered the issue, so I cannot reach out to the user to let them know what the issue was.  The notification only inserts my Organization ID.  Notification copied below.

Encountered unhandled fault when running process Quick_Create_Contact/30140000000TNMG exception by user/organization: 00D400000007YpG/{4}

Is there any way to figure out which user triggered the fault?  Else, please update the notification template!!!
Best Answer chosen by goravseth
SilkcutzSilkcutz
Once an element (such as data lookup) is connected draw another connector from it. This will be listed as 'fault'. You can then build a flow to 'handle' that fault. i.e. it will follow the normal process unless there is a fault at which point it follows the fault line.

We then run the fault line to our fault handling sub-flow (which we use on all flows). The fault handling sub-flow creates the case and provides fault message and any other information we want. 

All Answers

girbot56girbot56
Are you error handling in the flow? You could provide a screen to the user showing the error using {!$Flow.FaultMessage} by dragging to this new screen from the create/update action. The user could then go back without being dumped out of the flow rather ungracefully.
SilkcutzSilkcutz
We created a sub-flow that handles the fault for all flows and creates a support case. Within this we can reference any flow variables including user id. 
goravsethgoravseth
Thanks @girbot56 and @silkcutz.  Both are very helpful.

I was not aware I could do error handling in the flow - do you know where I can find any documentation on how that is done?  

Do I need to setup some kind of decision element to determine whether there was an error and then either show them a screen, a la girbot56, or run through a sub-flow to create a case?

More details are very much appreciated!

Cheers
SilkcutzSilkcutz
Once an element (such as data lookup) is connected draw another connector from it. This will be listed as 'fault'. You can then build a flow to 'handle' that fault. i.e. it will follow the normal process unless there is a fault at which point it follows the fault line.

We then run the fault line to our fault handling sub-flow (which we use on all flows). The fault handling sub-flow creates the case and provides fault message and any other information we want. 
This was selected as the best answer
goravsethgoravseth
Thanks much to both of you!  That is just what I needed. 
goravsethgoravseth
One follow up - best way to get the User ID?  Is it possible to pull that from with the flow / subflow itself, or di I need to set it via the button that launches the flow

thx again.
SilkcutzSilkcutz
We pull from the button.