Getting Started with Process Builder – Part 88 (Learn How to Designate a Recipient to Receive Error Emails – for Flow And Process!)

Getting Started with Process Builder – Part 88 (Learn How to Designate a Recipient to Receive Error Emails – for Flow And Process!)

Last Updated on April 15, 2019 by Rakesh Gupta

Process Builder is one of the most powerful tools provided by Salesforce to implement business requirements declaratively. Process Builder helps businesses to save time, as well as money, by implementing solutions quickly. In theory, implementation of Process Builder is straightforward – you create a Process; test it; and then, use Change Set to deploy it to Production. Seems simple, right? But, not so fast!

Just like most things in life, however, Process Builder is not immune to bugs :(; and, neither is it any easier to debug it :(. Salesforce, however, does offer a handful of debugging tools – such as a user can use Error Email sent by Salesforce; or, a user can leverage standard Debug Log. Each option, however, has its pros and cons. This article is focused on (1) What is a Flow and Process Error Email and, how does it work?; and,  (2) How to control who receives Flow and Process Error Emails. 

By default, when a Process or Flow interview (Running version of a Flow) fails, Salesforce sends a detailed Error email to the admin who last modified the Process or Flow, as shown in the following screenshot: 

The email includes (1) error message from the failure; and, (2) details about how each flow element, in the interview, executed. In most cases, these emails are very helpful in solving the problem. In the preceding screenshot, the error message stated that the error occurred due to a particular Validation Rule. And, therefore, by default, the error email went to an admin that last modified the Process or Flow. 

Before Summer’18 release, there was no way to change those settings. But now, it is possible to customize it. Let us work through this via a business use case.

Business Use Case

Edward Backhouse is working as System administrator at GurukulOnCloudHe has created many Processes to streamline sales and services lifecycle at GurukulOnCloud. As he created all Processes and Flows, by default, he receives all error emails for Flows and Processes. Last week, Edward onboarded a new Salesforce Administrator Annie Ingersoll. Now, Edward is looking for a way to channel error emails to Annie Ingersoll for all the Flows and Processes that he created. 

A solution for the above business requirement

There are few possible solutions for the above business scenario – for instance, Edward Backhouse can create a Rule on his mail client to forward these types of emails either to Annie Ingersoll or someone else. This solution may work as long as Edward Backhouse is with the Organization. But, what happens when Edward Backhouse leaves the organization? As a Super Admin, you must put in place safeguards to ensure that the system remains functional under varied circumstances! So, now, let us think through this again – What happens when Edward Backhouse leaves the organization? How are you going to make sure that despite changes in staff, or other unforeseen circumstances, the system continues to function as expected? 

Let’s take create an effective solution by leveraging new features introduced in Summer’18 release. As a result of the Summer’18 release, now you can send Flow and Process error emails to the Apex exception email recipients that you specify in Setup. 

  1. To change where Flow and Process error emails are sent, navigate to Setup (Gear Icon) | Setup | Process Automation | Process Automation Settings
  2. Then locate the field Send Process or Flow Error Email to, update it to Apex Execption Email Recipients.
  3. Once done, click on the Save button. 
  4. The next step is to specify users and email addresses as Apex exception email recipients. Navigate to Setup (Gear Icon) | Setup | Email | Apex Exception Email
  5. Click on the Add Salesforce User button to add a Salesforce user. 
  6. It is also possible to include an email address which doesn’t belong to any user. For example, you may want to forward these emails to your IT team.

Wasn’t that a great journey? Now you know how to control who receives Flow And Process Error Emails! 

Yes, go ahead! Show off your newly acquired skills to your friends, colleagues, and families!

Please feel free to add constructive comments, insights – and yes, challenges too! – to the blog. Good Luck in your Journey towards becoming a Salesforce Ninja!

Note: – I am grateful to Resco.net and Smartcloud.io for sponsoring my blog.

Technical Editor and Proofreader: - Munira Majmundar
Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

3 thoughts on “Getting Started with Process Builder – Part 88 (Learn How to Designate a Recipient to Receive Error Emails – for Flow And Process!)

  1. New reader here! Thanks for these tips, they are very helpful!

    Have you seen any workarounds for helping end users troubleshoot these process builder errors since they just see the general Flow Error message instead of the original Validation Rule Error Message?

    1. Thanks, Angela 🙂

      The runtime error messages are now friendlier (after Summer’18 release) and include the process name and error ID. If the error occurs when creating or updating a record, the message also includes technical details for the user to give you to help with troubleshooting. You can use the error ID to find the detailed error email that was sent when the process failed.

      Read the complete article here https://releasenotes.docs.salesforce.com/en-us/summer18/release-notes/rn_forcecom_flow_run_error_ui.htm

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.