FlowFest V4 Challenges - Challenge 4

FlowFest V4 Challenges - Challenge 4

FlowFest is an online competition where participants have to create flows within 50 minutes. Salesforce Ben and Ohanaly hosted the fourth edition, FlowFest V4, on February 22nd, 2023, just like they did with the previous events. The competition had a new format where the top four finalists were chosen after finishing the first three challenges. Then they shared their screens for the final challenge. Let's take a look at the challenges of FlowFest V4. Here is the answer of FlowFest V4 - Challenge 4.

FlowFest V4 - Challenge 4 - Question

The leadership at Universal Containers has asked to provide a weekly recap screen flow that details out overall stats about current Opportunities that could be used on the Home Page.

This information will include the following:

  • Total Number of Opportunities
  • How many Open Opportunities
  • How many Closed Won Opportunities
  • Average Deal Size for Closed Won Opportunities
  • Total Number of Opportunities whose Amount is greater than Average Amount of Closed Won Opportunities

Then, leadership wants to see a bit of inspiration for the team: Include a table of the top 5 Opportunities of all time (open or closed), based on Opportunity Amount. The list should have the Opportunity with the highest amount at the top and descend from there. Make sure that Name, Amount, Stage and Close Date are visible.

Finally, leadership wants to see the largest upsell possibilities where we do not have Opportunities open with them. Include one more table that displays the five (5) Accounts with the highest Annual Revenue that are of either Type “Customer - Direct” or “Customer - Channel”. These should only list Accounts with no Open Opportunities. For these, they need to see the columns Name, Annual Revenue and Type.

Submission Variables:
NumberAnswer1= {!averageWonOpps}
NumberAnswer2= {!countOpportunitiesOverAverage}

FlowFest V4 - Challenge 4 - Answer

1- Add a get records element to get all the opportunity records.

Get All Opportunity Records

2- Create a number variable and then add an assignment element to store the total number of opportunities.

Store the Total Number of Opportunities

3- Add a collection filter element to filter the open opportunity records.

Filter Open Opportunities - FlowFest V4 - Challenge 4

4- Add a loop element to iterate over open opportunities. Then, create a text collection variable and use an assignment element to add the account ids to the collection.

Build Account Id Collection - FlowFest V4 - Challenge 4

5- Add a collection filter element to filter the opportunity records that are won.

Filter Won Opportunities - FlowFest V4 - Challenge 4

6- Add a loop element to iterate over won opportunities. Create a number variable and add an assignment element in order to calculate the total amount of these opportunities.

Assignment Element to Calculate the Total Amount

7- Create a number variable and then add an assignment element to store the number of won opportunities.

Store the Number of Won Opportunities

8- Create a formula resource to calculate the average amount of won opportunities. Then, add another collection filter element to filter the opportunities that are greater than the average amount.

Formula to Calculate the Average Amount
Filter the Opportunities

9- Add a collection sort element in order to sort the opportunities by their amounts. Make sure that you keep the top 5 opportunities.

Collection Sort Element to Keep Top 5 Opportunities

10- Create variables and then add an assignment element to store the results.

Assign the Results - FlowFest V4 - Challenge 4

11- Add a get records element in order to get the account records that meet the criteria. These accounts should not have any open opportunities. Therefore, you should use the not in operator.

Get Account Records

12- Add a collection sort element to sort the accounts according to their AnnualRevenue values in descending order. Then, keep top 5 records.

Filter Account Records - FlowFest V4 - Challenge 4

13- Add a screen element with a display text component to display the calculations. Then, add a data table in order to display the top 5 opportunities. Display Name, Amount, and Close Date fields as columns and make sure that the table is view only. Add another data table to display the top 5 accounts. Display Account Name, Annual Revenue, and Account Type fields as columns. Again, make sure that the table is view only.

At the end, your flow should look like this.

FlowFest V4 - Challenge 4 - Final
FlowFest V4 - Challenge 4 Result

Submission Variables:
NumberAnswer1= $52,308.82
NumberAnswer2= 68

FlowFest V4 Challenges

Here are the answers of all the FlowFest V4 challenges.

1st Challenge
2nd Challenge
3rd Challenge
4th Challenge


  1. I would like to suggest a correction regarding the assignment element. Instead of assigning the value after the 'get opportunity' step, we could assign it before the 'get account assignment' step. This will help us save one assignment element and simplify the process. What do you think about this suggestion?

    • Yes, this could be done. However, since it is just an extra assignment element, I personally think that it is not so critical to reduce one assignment. If it was one of the pink elements though, I would strongly agree.

3 Trackbacks / Pingbacks

  1. FlowFest V4 Challenges - Challenge 3 - Salesforce Time
  2. FlowFest V4 Challenges - Challenge 1 - Salesforce Time
  3. FlowFest V4 Challenges - Challenge 2 - Salesforce Time

Leave a Reply

Your email address will not be published.