Flow Error Handling Superbadge Unit
Show your capabilities building error management into flow automations.
Flow Error Handling Superbadge Unit
What You'll Be Doing to Earn This Superbadge
- Enhance flows to support valid data inputs.
- Add a fault path and error handling to a flow.
Concepts Tested in This Superbadge
- Flow error management
- Flow fault paths
Prework and Notes
Enter all labels exactly as described in the instructions. Labels are case-sensitive and spelling counts.
When possible, copy and paste the label names from superbadge instructions instead of typing them.
If label or API names are not specified, you can use any name you choose; this applies to some screen components.
Superbadge units focus on very specific objectives; some best practices or typical approaches might not be required in the challenges. For example, activating a flow is an important step; activation is specifically included in the Flow Administration Superbadge Unit. It may not be required to pass the challenge unless specified.
Make sure you save your work before running the challenge check.
Build your solution according to the requirements; adding more actions or steps can cause challenge checks to fail.
We recommend following best practices and always including descriptions for flow elements. However, we’re not checking for element descriptions in this superbadge unit.
Sign Up for a Developer Edition Org with Special Configuration
To complete this superbadge unit, you need a special Developer Edition org that contains special configuration and sample data. Note that this Developer Edition org is designed to work with the challenges in this superbadge unit.
-
Sign up for a free Developer Edition org with special configuration.
Fill out the form. For Email address, enter an active email address.
- After you fill out the form, click Sign me up.
When you receive the activation email (this might take a few minutes), open it and click Verify Account.
Complete your registration by setting your password and challenge question. Tip: Save your username, password, and login URL in a secure place—such as a password manager—for easy access later.
You are logged in to your superbadge Developer Edition org.
Now, connect your new Developer Edition org to Trailhead.
Make sure you’re logged in to your Trailhead account.
In the Challenge section at the bottom of this page, select Connect Org from the picklist.
On the login screen, enter the username and password for the Developer Edition org you just set up.
On the Allow Access? page, click Allow.
On the Want to connect this org for hands-on challenges? page, click Yes! Save it. You are redirected back to the Challenge page and ready to use your new Developer Edition org to earn this superbadge.
Now that you have a Salesforce org with special configuration for this superbadge unit, you’re good to go.
Use Case
As the Salesforce admin for Main Stage Analytics, you’ve reviewed and improved several flows already. Continue reviewing user requests for assistance and enhancing existing flows to support better user experience.
Business Requirements
Enhance a Flow to Support Valid Data Inputs
Case 4014: A manager on the sales team has reported that several new opportunities have been created with close dates in the past. This seems to be an ongoing issue and interferes with reporting and forecasting. Review the Opportunities for Main Stage Analytics flow and update the flow so that close dates must be in the future. Use the formula Today() < {!ops_Close_Date}
. Add a message to the user who is creating the opportunity to advise them when the issue occurs (you can add any message text you’d like). Don’t forget to activate the newly updated version. Note: Complete this challenge without creating validation rules or adding elements to the flow.
Manage Fault Handling and Notifications
Case 4021: Several users have reported that the flow Consent Capture for Main Stage Analytics sometimes doesn’t seem to run correctly. As you investigate the issue, you decide to improve the flow’s overall functionality by adding a fault path to the flow. Add fault handling related to the final Create Records element named Create Contact Point Type Consent. In case of fault, use the already available Flow Pro Error Messaging flow to alert the “flow pro” (the user with the Flow Pro profile) with the email address of the running user and system fault message. Then, display a screen to the user letting them know an error occurred. Use a DisplayText component with API Name Error_Display
in the screen. Save and then activate the flow.
Roll Back and Track Errors with Flows
Case 4036: This case relates to a flow used to register new accounts and contacts. Sometimes the flow executes as expected and creates an account with a primary contact. But sometimes the flow fails and users aren’t sure why. You’ve identified that the issue is related to the flow’s design and its interaction with other automations. An account can have only one primary contact. However, the New Account Contact flow attempts to create an additional primary contact even if an account already exists.
The flow can’t create another primary contact but is still creating a new related opportunity, causing confusion for users. For the purposes of this challenge, don’t reorder the existing elements in the flow.
Add fault handling so that no records are created if the contact creation fails. Use the existing Error Log object to create a record of the incident. You can include the appropriate fields while creating the Error Log record, but we won’t be checking for it. Also, add a fault screen that uses a Display Text component with API Name User_Error_Display
indicating an error occurred and redirects the user to the New Account Contact screen. Be sure to activate the flow.