Scheduled Flow and Subflow Superbadge Unit
Show your strength with subflows, autolaunched flows, and scheduled flows.
Scheduled Flow and Subflow Superbadge Unit
Für diesen Superbadge zu erfüllende Voraussetzungen
- Configure a flow to run on a schedule instead of a record trigger.
- Create a flow that is called by other flows as a subflow.
- Configure multiple flows to call a single subflow.
Für diesen Superbadge abgefragte Konzepte
- Scheduled flows
- Subflows
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.
Use Case
The Hive Foundation provides a variety of programs and services to support flourishing communities. Two aspects of its program operations would benefit from automation. Review the requirements to deliver efficiencies in appointment follow-up and program management.
Business Requirements
Configure automation for daily appointment checks
Hive’s services are offered on an appointment basis. Appointments are recorded in a custom object called Provider Appointment. A draft flow called Appointment Follow Up is supposed to check for missed due appointments and create follow-up tasks for the care coordinators to follow up on them. The flow is currently configured as a record-triggered flow, which isn’t optimal. Save Appointment Follow Up flow as a new flow to include the functionality and name it Daily Appointment Check
. Set the flow to run daily at 12:00 AM. Configure the new flow to select appointments that are past due, following the configuration in the existing flow. The result of the active flow is that the assigned care coordinator will receive a task to follow up.
Streamline program participation management
In addition to individual services, the foundation runs periodic programs for educational purposes. Participants can sign up for a program in its entirety or participate in just a few sessions they choose. Program managers want to have an accurate count of the number of people who have chosen to participate in each session.
A current schedule-triggered flow, Weekly Program Participant Check, runs weekly to update the Number of Active Participants (API Name Number_of_Active_Participants__c
) field on the Program object.
The weekly updates can result in some confusion when staff are planning sessions. To streamline program management and provide managers with up-to-date information, the team would like a record-triggered flow. Both the Weekly Program Participant Check and the new record-triggered flow would feature similar functionality. To avoid duplication, create a subflow called Program Count and Participant Status - Subflow
for use in both flows.
Duplicate the applicable logic of the Weekly Program Participant Check flow in this new subflow. Make sure that the value for the variable Current_Participant
can be set by the parent flow calling this subflow. Update the Weekly Program Participant Check flow by replacing the original configuration with the subflow. Make sure to set the input values so that the current participant record is passed to the subflow.
When a participant signs up for a program, their Program Participant record includes a start date and end date relating to the sessions they have chosen. Now that you’ve created the subflow, replace the relevant configuration in the Weekly Program Participant Check flow with the new subflow and activate it.
Use the subflow in a new record-triggered flow
Finally, create a record-triggered flow with the name Program Participant Updated
and set it to run when the Program Participant field End Date (API Name End_Date__c
) is changed. The Program Participant Updated flow should call the subflow Program Count and Participant Status - Subflow and pass in relevant data for the Participant record. Make sure the flow is active.
After implementing these automations, you check back in with the team to see how they’re working. The care coordinators and program managers are grateful for the improvements. Automation for the win!