Skip to main content
+1,500 points
Superbadge

Flow Collections and Loops Superbadge Unit

Configure flow collections and loops to deliver business insights.

~1 hr

Flow Collections and Loops Superbadge Unit

What You'll Be Doing to Earn This Superbadge

  1. Build a flow to collect selected records.
  2. Optimize a flow to receive a collection as an input.

Concepts Tested in This Superbadge

  • Flow collections
  • Flow screen input component: Data Table

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.

  1. Sign up for a free Developer Edition org with special configuration.

  2. Fill out the form. For Email address, enter an active email address.

  3. After you fill out the form, click Sign me up.
  4. When you receive the activation email (this might take a few minutes), open it and click Verify Account.

  5. Complete your registration by setting your password and challenge question. Tip: Write down your username, password, and login URL for easy access later.

  6. You are logged in to your superbadge Developer Edition org.

Now, connect your new Developer Edition org to Trailhead.

  1. Make sure you’re logged in to your Trailhead account.

  2. In the Challenge section at the bottom of this page, select Connect Org from the picklist.

  3. On the login screen, enter the username and password for the Developer Edition org you just set up.

  4. On the Allow Access? page, click Allow.

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

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

Note

Note

Before you begin the challenges, review Flow Data Collections Specialist Superbadge: Trailhead Challenge Help.

This superbadge unit is part of the Flow Data Collections Specialist Superbadge. Complete the capstone assessment and related superbadge units to receive the Flow Data Collections Specialist Superbadge.

If you’ve completed any of the superbadge units in the Flow Data Collections Specialist Superbadge, you can use the same Developer Edition org to complete the challenges in this superbadge unit. If not, make sure you’re using a new Developer Edition org from this sign-up link. If you use an org that’s been used for other work, you won’t pass the challenges in this superbadge unit.

Review Superbadge Challenge Help for information about the Salesforce Certification Program and Superbadge Code of Conduct.

Use Case

Main Stage Analytics is a firm specializing in customized research to help companies meet strategic business needs. The company has new lines of business and different sales teams. 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

Create a Flow to Collect and Display Records for User Interaction

The Main Stage Analytics team wants a way for sales team members to easily review specific opportunities on one screen. The screen should display opportunities created in the last 30 days, along with relevant information about each opportunity. The screen should also offer a way for users to filter the displayed list based on the opportunity’s stage, resulting in an updated set of opportunities.

Create a flow named Opportunity Review (with API Name Opportunity_Review) to collect and display opportunities for sales users to review. The flow should get all opportunities created in the past 30 days. Create a formula resource called Today_Minus_30 using the formula DATETIMEVALUE(Today() - 30).

There are multiple ways to process the records from the Get Records element. One way to proceed is to add an Assignment element called Store Get Records Results (API Name Store_Get_Records_Results) to store the records into a collection for additional processing later in the flow, but we won’t check for that.

Configure an element that will sort the opportunities in ascending alphabetical order by the name of the opportunity. While the initial Get Records element can include a Sort Order definition, this additional step will future-proof your solution in the case of additional functionality that sorts records in a different order. Since the Screen element will allow users to filter opportunities after the initial display, make sure the configuration sorts opportunities in alphabetical order by name every time the subset of records changes.

The screen presented to users should serve two purposes: to display opportunities created in the past 30 days, and to allow users to further filter displayed opportunities.

Add a screen component that allows users to choose from a list of opportunity stage names using a Picklist Choice Set you create. The user should be able to select a picklist value and see a subset of records based on stage. In addition to the Picklist Choice Set allowing users to select a stage, also create a Choice resource with any label (for example, View All) and Choice Value of All (Data Type should be Text). You are welcome to include a Display Text element above the filter element, with text such as “Would you like to select a stage for opportunities you see on this screen? If so, select the stage below.” But we won’t check for this.

Use a Data Table screen component to display records to users. The Source Collection field on this Data Table refers to the collection assigned in the Store Get Records Results Assignment element. The Data Table should display the following values for each opportunity:

  • Name
  • Stage
  • Amount
  • ExpectedRevenue
  • Description

Your solution should look like the following image.

Opportunity Review screen with two customized components. A picklist component is labeled Filter by Stage and is displaying the View All option.A Data Table component lists opportunities sorted by Name, with columns for Name, Stage, Amount, Expected Amount, and Description. The standard  “Next” button allows a user to update the Data Table display if the user selects a particular stage from the Filter by Stage picklist.

Add an element that evaluates whether the user requested to view a subset of opportunities based on stage. In the evaluation, one outcome condition should relate to whether the stage selected does not equal the View All resource you created.

Following the decision path for the outcome you just defined, add an element called Filter for StageName (API Name Filter_for_StageName) that will generate a filtered set of records based on the filter option selected. Use this filtered set of records to update the opportunities the user subsequently sees on the Screen element, using an Assignment element. The Assignment element updates the collection for displaying opportunities with the stage the user selected, but we won’t be checking the connector configuration.

For the outcome where the selection is View All reset the Data Table element with the original list of opportunities but we’re not checking for this. The final configuration in the flow should evaluate whether the user indicated a filter for opportunity by stage, then present that updated list of filtered opportunities each time the stage name is selected.

Configure a Screen Flow to Collect and Save User Changes

The sales team would like to do more with opportunities presented by the Opportunity Review flow. The team would like to be able to update the previously selected opportunities seamlessly. To provide this functionality, your colleague started the Opportunity Updater flow to serve as the second flow.

The flow already contains a Loop element that gathers the relevant opportunities and a Screen element that provides the user with the ability to update the opportunity. Continue configuring the Opportunity Updater flow to provide the requested functionality.

Eventually, the Opportunity Updater flow will use opportunities identified in the Opportunity Review flow, receiving an input collection to update selected opportunities.

The Record Collection variable Selected_Opportunities will present the selected opportunities to the user in the Update Opportunity screen. In the screen, the user can make changes to the opportunity record for the following fields.

  • Name
  • Account
  • Close Date
  • Description

Configure flow elements following the Update Opportunity screen. The flow should store the values from the Screen element and update the opportunity records efficiently.

Configure the flow to store and update changed values. Your goal is to optimize the flow so that it makes the minimum number of DML statements. Note: There are many ways to solve this requirement. For the purpose of this flow collections and loops technical assessment, use the loop variable in Assignment elements to store changes. Don’t use Formula resources or Decision elements to evaluate if the records have changed.

When your colleague returns, they will connect the two automations. The ability to quickly select, edit, and update opportunities will be a big hit with the sales team!

Ready to Tackle This Superbadge?

Please first complete the prerequisites and the challenge for Flow Collections and Loops Superbadge Unit will be unlocked.

~1 hr