FlowFest V5 Challenges - Challenge 3

FlowFest V5 Challenges - Challenge 3

FlowFest is an online competition where participants have to build flows in Salesforce. Salesforce Ben and Ohanaly hosted the fifth edition, FlowFest V5, on July 11th, 2023. The competition followed the previous format where the top four finalists were chosen after finishing the first two challenges. Then they shared their screens for the final head to head challenge. Let's take a look at the challenges of FlowFest V5. Here is the answer of FlowFest V5 - Challenge 3, which is the final challenge.

FlowFest V5 - Challenge 3 - Question

Cloud Kicks wants a tool that would allow Sales users to easily plan local outreaches to Leads/Contacts nearby when traveling to visit a Customer Account. The Screen Flow requires the following steps:

Requirement #1: Include a Screen Element that captures several fields for the Sales User to be able to specify the Primary Contact for the Customer Account that they are seeking to visit and the date of their visit. Fields are:

  • Date of Visit (Date)
  • Contact (Lookup)
    • The default value should be the Id of an input record variable.

Requirement #2: Use the MailingPostalCode from the selected Contact to find the correct State for the Contact to ensure you have the right information using an API Service. For the HTTP callout, use the Named Credential included in your Unmanaged Package called Zippopotam

Requirement #3: Once you have the State confirmed by the HTTP Callout, run the necessary queries to get all Leads and all Contacts within the matching State (use the Mailing Address of the contacts). With the collection(s) in place, build one (1) Data Table that joins all of the Contacts and Leads within that State. The data must be sorted (ascending) alphabetically by Last Name. Columns for the Data Table should include:

  • First Name
  • Last Name
  • Type (display “Lead” or “Contact”, depending on type of record)
  • Company (or Account Name)
  • State

The Data Table should allow for multiple selections.

Requirement #4: For all selected rows (the Leads and Contacts) in the Data Table, create a Task for each selection and associate it with the Lead or Contact that it corresponds to. Values must include:

  • Subject: Schedule Possible Office Visit to {!FirstName} {!LastName}
  • Date: (The date selected in your first Screen Element)
  • Ensure the Task is related to the Lead/Contact selected

Debug Instructions
Execute the Debug with the Contact Garyl Haynesk. Select all Leads & Contacts possible for Task Creation

Submission Variables
NumberAnswer1= Number of Tasks created

FlowFest V5 - Challenge 3 - Answer

1- Add a Screen element with a date and a lookup field. Lookup field should be for the Contact object.

FlowFest V5 - Challenge 3 - Data Entry

2- Add a Get Records element to get the selected Contact record.

Get Selected Contact

3- Call the flow that you built in the previous challenge. Pass the MailingPostalCode of the selected Contact and store the State output value.

FlowFest V5 - Challenge 3 - Call Subflow

4- Add two different Get Records elements to get Leads and Contacts from the same state.

Get Records According to State

5- Here is the tricky part. You have to display Leads and Contacts in the same Data Table. However, Salesforce gets the object type from the collection that you provide. Therefore, it can be one object only.

Contacts and Leads have many fields in common. You have to assign the Contact records to Lead records, so that you will have a Lead collection that technically stores both Leads and Contacts.

Add a Loop and Assignment element to loop through the Leads and assign values. This challenge asks you to display the object type, so assign "Lead" to a field that you are not using in this flow. For instance, use the Title field.

FlowFest V5 - Challenge 3 - Assign Lead

6- Create a Lead record variable, then add Loop and Assignment elements. Assign the current Contact record's field values to a Lead variable.

Assign Contact to Lead Variable

7- Add a Collection Sort element to sort by Last Name.

Sort Collection

8- Add a Screen element with a Data Table. Display the Lead collection and rename the column titles. For instance, display "Type" instead of the Title field.

FlowFest V5 - Challenge 3 - Data Table

9- Loop through the selected Lead records and use an Assignment element to assign a Task record.

Assign Task Record

Then, use Create Records element to create the Task records.

At the end, your flow should look like this.

FlowFest V5 - Challenge 3 - Result
FlowFest V5 - Challenge 3 - Result

Submission Variables
NumberAnswer1 = 6

FlowFest V5 Challenges

Here are the answers of all the FlowFest V5 challenges.

1st Challenge
2nd Challenge
3rd Challenge

2 Trackbacks / Pingbacks

  1. FlowFest V5 Challenges - Challenge 2 - Salesforce Time
  2. Using Data Table in Screen Flow to Display Non-Object Data - Salesforce Time

Leave a Reply

Your email address will not be published.