Use Your Flow
Create Test Contacts, Engagements, and a Cohort
Finally, it’s time to put your flow to work!
Your Trailhead Playground trial of PMM has helpful example data. For this project, though, you’ll create two new test contacts, each with a program engagement, and add them to a new group of people to test your flow.
Enter your email address for both of the test contacts. This way you know that the flow will send an email, but no one will receive it but you.
Create the first test contact.
- From the App Launcher (
), find and select Programs.
- Switch to the All list view and click Remedial Reading Program.
- Click the Add Contact to Program quick action.
- In the Client field, select + New Contact then specify these details:
- First Name:
Brock
- Last Name:
Biagini
- Email: Enter your email address, but add
+pmmflowtest1
before the @ symbol. For example, bbiagani+pmmflowtest1@example.com.
- Save your work.
- In the Role field, select Client.
- In the Stage field, select Active.
- In the Program Cohort field, select + New Program Cohort then specify these details:
- Program Cohort:
PMM Flow Test
- Status: Active
- Program: Remedial Reading Program
- Save your work.
- Save your work.
Now, let’s create your second test contact.
- On the Remedial Reading Program record, click Add Contact to Program again.
- In the Client field, select + New Contact then specify these details:
- First Name:
Aaron
- Last Name:
Yount
- Email: Enter your email address, but add
+pmmflowtest2
before the @ symbol. For example, ayount+pmmflowtest2@example.com.
- Save your work.
- In the Role field, select Client.
- In the Stage field, select Active.
- In the Program Cohort field, select PMM Flow Test.
- Save your work.
Send the Email
It’s time to test the flow! Drum roll, please.
- In Global Search, find and select the PMM Flow Test cohort.
- Check that there are two program engagements listed in the Program Engagements related list and that both have a Stage value of Active.
- Click the Email Program Participants quick action.
- A confirmation message appears. Click Finish.
Each time you press the button in this flow, it sends an email to every active participant in the cohort. Read on for ideas on how to prevent duplicate sends.
Check Your Inbox
Go to the inbox of the email address you used in your test contact records. You should have received two emails, one for Brock Biagini and another for Aaron Yount.
Open your email to make sure that your name and email address appear at the bottom. The merge fields and other settings you selected populate the signature with the information of the user who starts the flow.
Let’s pause and remember the logic of your Get Records element here: It looks for program engagements with a Stage value of Active that are associated with the program cohort where the flow was used. If you go back to one of your new program engagement records and change the Stage to anything but Active, then run the flow again, only one email would be sent. If you’re testing a flow on your own, you can set up a contact in each Stage before your first send to see how every field value works with the flow.
Ideas for Building on This Flow
This flow was a simple example to get you used to using email templates and flow to send a message to your program participants. Using this flow as a base, you can experiment to create amazing flows that help your users better deliver services.
We don’t expect you to build these in this project, but here are some ideas for you to experiment with.
- Change the filter on the Get Records element to look for program engagements with a status of Withdrawn and set up a template email directing program participants to register for another session.
- Create a new field on the program engagement record and use an Update Records element in flow to record when a program participant has been sent a welcome email. Update your filter to exclude any program engagement that has already been welcomed. No more duplicate messages!
- Use Decision and Screen elements in flow to allow your users to choose from several different email templates to send.
- Create a new schedule-triggered flow to send a batch of welcome emails to all new program engagements in a particular program, using much of the logic you used in this project.
What else can you think of? If you’d like help, or to share what you’ve learned, join the Program Management Module (PMM) group in the Trailblazer Community. Check out the link in Resources.
With this foundation in building flows for PMM, you have what you need to start building on your own.
Be sure to click Verify to check your work on this last step.
Good luck and have fun!
Resources
- Trailhead: Build Flows with Flow Builder
- Salesforce Help: Flow Builder
- Salesforce Help: Program Management Module Documentation
- Trailblazer Community: Program Management Module (PMM)