Flow Data Collections Optimization Superbadge Unit
Demonstrate your ability to troubleshoot and optimize data collections.
Flow Data Collections Optimization Superbadge Unit
What You'll Be Doing to Earn This Superbadge
- Optimize a loop and create a collection.
- Eliminate an unnecessary loop from existing flow.
- Automate an email send based on the number of related records.
Concepts Tested in This Superbadge
- Flow collections
- Flow loops
Prework and Notes
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.
Tips
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.
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.
Use Case
Main Stage Analytics is consolidating business practices across several different business units. Each team has historically managed their sales processes in different ways. Review the work in their Salesforce instance and identify ways to enhance their business processes.
Business Requirements
Optimize a Loop and Update Operation
Your review starts with some of the organization’s older flows. Your goal is to update flows not configured according to best practices. Many of the automations were developed long before some of the new Flow Builder functionality was available. The first flow up is the Suspended Account - Opportunity Updater flow. Your first step is to update the Suspended Account - Opportunity Updater flow to correct a glaring issue that could cause issues with governor limits.
Next you review automations with similar functionality. Currently two different flows handle opportunity owner updates, both the Suspended Account - Opportunity Updater (“Updater”) flow and the Negotiation/Review - Opps subflow. When an account enters suspended status, the Updater flow updates the owner based on the opportunity’s stage depending on the opportunity’s stage. If an opportunity is in the Negotiation/Review stage, the requirement is to update the owner; for opportunities in any other stage the requirement is to set the stage to Needs Analysis.
After your review of the way the two flows handle the opportunities, you decide to make some changes. First, you notice that the Updater flow is set to update the record owner to a hard coded value for Zarna Malik’s user ID from a sandbox on the Negation/Review opportunities. Instead of handling opportunity owner assignment inside of the Updater flow, call the Negotiation/Review - Opps subflow for processing opportunities. The opportunities not in Negotiation/Review stage will continue to follow their current logic. Be sure to activate the new version of the flow before checking the challenge.
Eliminate an Unnecessary Loop from an Existing Flow
Next up for review is a flow to review cases created in the last 30 days. Review the flow called 30 Day Case Review. Using your knowledge of how certain flow elements can replace loops, optimize the flow for efficiency. Name the element: Filter for Status
(API Name Filter_for_Status
). The streamlined flow should still filter cases based on Status and offer the same way for end users to interact with the flow. As with the current version of the flow, the final element should be an Assignment element.
Make Decisions Based on Collection Count
Your next step is to create a new record-triggered flow on Account that will update all opportunities related to an account when the account’s industry changes. Name this flow Account Industry Change
. The flow should update opportunities that are not Closed Won or Closed Lost and only when the account’s Industry value (API name Account.Industry
) changes.
Account managers want to be able to make decisions based on the number of open opportunities for accounts with industry changes. Create an Assignment element to count the number of records found in the initial Get Records element. Use a Decision element to check how many records exist for evaluation.
If an account has more than three open opportunities, send an email to the account owner as a notification. Note: The flow should send an email if there are more than three open opportunities to update, but we won’t check any email functionality. Be sure to activate the flow for this challenge check to pass.
If an account has three or fewer opportunities, the flow should loop through any such records and update the opportunity’s Stage to Needs Analysis for account managers to review. Make sure an element commits these changes to the database.