Learn How to Designate a Recipient to Receive Error Emails

Learn How to Designate a Recipient to Receive Error Emails

Last Updated on April 3, 2022 by Rakesh Gupta

Salesforce Flow is one of the most powerful tools provided by Salesforce to implement business requirements declaratively. Salesforce Flow helps businesses to save time, as well as money, by implementing solutions quickly. In theory, implementation of Salesforce Flow is straightforward – you create a Flow; 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, Salesforce Flow 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) an error message from the failure; and, (2) details about how each flow element, in the interview, was 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. 

Business Use Case

Edward Backhouse is working as a System administrator at GurukulOnCloudHe has created many Processes to streamline the 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 a 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? 

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 Exception 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 that 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!

Formative Assessment:

I want to hear from you!  

What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? 

Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.

Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

Preferred Timing(required)

5 thoughts on “Learn How to Designate a Recipient to Receive Error Emails

  1. How do you solve for the fact that in my sandbox, the Apex Exception Email option does not show up when I type Apex Exception Email in the setting quick find box?

  2. 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.