FlowFest is a competition that lasts for 50 minutes and is held online, where participants compete to build flows. FlowFest V4, the fourth version of this event, was held on February 22nd, 2023, and was hosted by Salesforce Ben and Ohanaly, just like the previous events. This time, the competition had a different format where four finalists were chosen after completing the first three challenges, and 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 2.
FlowFest V4 - Challenge 2 - Question
Universal Containers is approaching their fiscal year end and have asked their sales reps to follow up on any outstanding Opportunities. To ensure a good customer service experience remains their highest priority, we want to exclude any Accounts that have Open Cases. Once you have that list of Accounts, get all Open Opportunities for those accounts. Once you have that information, make sure to submit the values requested below.
Submission Variables:
NumberAnswer1= {!countOpenOpportunitiesNoCases}
NumberAnswer2= {!countOpenCases}
FlowFest V4 - Challenge 2 - Answer
1- Add a get records element to get all the open cases.
2- Add a loop element to loop through the open case records. Create a text collection variable and add an assignment element to prepare a text collection of account ids.
3- txtAccCollection variable stores the ids of the accounts that have open cases. These are the accounts that you don't want. Add a get records element to find the open opportunities that are not related to those accounts. Use the not in operator for this purpose.
4- Create a number variable and add an assignment element to store the opportunity count.
At the end, your flow should look like this. The last subflow submits your answers, it is not a part of the challenge.
Submission Variables:
NumberAnswer1= 36
NumberAnswer2= 65
FlowFest V4 Challenges
Here are the answers of all the FlowFest V4 challenges.
1st Challenge
2nd Challenge
3rd Challenge
4th Challenge
I would like to suggest a correction regarding the decision element. I think there should be a decision element after the 'get cases' and 'get opportunity' step for null check. This will help us ensure that we have a valid product before proceeding further. What do you think about this suggestion?
There can be many improvements for these flows. You can add decisions, fault paths etc.
Thanks for the suggestion.
However in this specific challenge, if there are no case/opportunity records found, flow won't fail. The result will be 0.
Totally align with you znd many thanks for talking time and clarifying my doubts!!
You are welcome!