How to Troubleshoot Visual Flow & Process Builder with Fault Emails

Visual Flow is a fun tool that I really enjoy.  What I don’t enjoy, is attempting to debug issues within Visual Flow (or Process Builder).  It is not the easiest thing to work with, and there are a number of areas that you need to watch out for as you build your Flow (see The 6 Most Common Visual Flow Errors to Avoid).  Try as you might, you’re going to run into some sort of error as you work with Flow that is going to give you a headache trying to debug.  In this series I will go over some of the different tricks I use when I am debugging a complex Visual Flow.

When I’m looking to fix a Flow there are typically three routes that I use:

  1. Fault Email
  2. Debug Logs (covered in an upcoming post)
  3. Screen Elements & an Assignment Element (I’ll be covering this in its own post after I present on it for my Salesforce Automation Hour Presentation — so register now and see it first!!)

I think overall Fault Emails and Debug Logs are the most common ways that people will troubleshoot their Visual Flow and Process Builder.  In this post we’re going to just cover our Fault Emails.

The Dreaded PB/Flow Error Message – Ooops! What went wrong?  I have no clue, lets check the email Salesforce just sent us.

Error.png

The Unhandled Fault Email

The Email solves 90% of the Flow errors that I encounter.  The vast majority of your errors are going to be quick fixes that you can spot easily from your email.  Let’s take a look at the email message we get:

Fault Email.png

What is highlighted in yellow is the key to the whole Email.  The rest of the email is there to help you understand what steps the Flow took on its way to the error.  This lets you walk through and see each element or criteria that your Process Builder/Visual Flow is hitting.  This can be important depending on your Email’s error, you can quickly check an ID or other value that is being used.

In the above email we’re just working with a Process Builder that is failing.  We get this error: (FIELD_CUSTOM_VALIDATION_EXCEPTION) Only Hobbits can change the Account Type

Let’s break this Error Message into two separate parts:

  1. What Caused the Issue 
    • (FIELD_CUSTOM_VALIDATION_EXCEPTION)
  2. The Error Message 
    • Only Hobbits can change the Account Type

Based on this message I can quickly tell that we hit a Validation Rule error and it was because I was attempting to change the Account Type, but I’m not a Hobbit.  So, we now know that we need to either change our Process Builder or Validation Rule to fix this error that we hit.

So we solved the first one, that wasn’t too bad.  Let’s take a look at another Error Message that we might run into.

Error2.png

Once Again, let’s break the Error Message into two separate parts:

  1. What Caused the Issue 
    • (INVALID_CROSS_REFERENCE_KEY)
  2. The Error Message 
    • Owner ID: owner cannot be blank

Based on this message it looks like I didn’t assign a value to the Owner Id variable that I created.  Rookie mistake, but something easily fixable.  My next step would be to make sure the correct ID is being passed into that field and then give it another go.  This is a good example of how you can walk your error message all the way to the actual Element you failed at to see what the values were.  I highlighted the specific part of my Flow that is causing the error.

error2b

If you get an email where the Error Message doesn’t make sense, Google is your friend!  Seriously, when I searched our first Error and I found over 1,700 results!

google.png

RECAP: A quick understanding of what you’re getting with the Fault Email will save you lots of time when you’re troubleshooting an issues you’re having with Process Builder or Visual Flow.  If you don’t recognize an error message, simply Google it!  Don’t get too caught up with all the details that Salesforce sends you, focus on the error message and then look to see how you can resolve that error.

 

One thought on “How to Troubleshoot Visual Flow & Process Builder with Fault Emails

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s