Activate Your Flow and Add a Quick Action to Your Page Layout
Place a Screen Flow on the Page
Remember that your goal in this project is to create a button that emails every program participant with a program engagement in a cohort.
Screen flows require interaction with a user, so your flow won’t work unless a user can access it. For this example, getting the flow to a user takes three steps.
- Activate the flow
- Create the button
- Place the button on the page layout
Let’s get to work.
Activate Your Flow
Let’s start by activating the flow, which you can do in Flow Builder.
If you left Flow Builder after the last step, you can get back to your flow by following these instructions.
- From Setup, in the Quick Find box, enter
flows
, and then select Flows.
- Click Email Program Participants (Cohort).
Normally at this stage you would test the flow by using the Run or Debug features in Flow Builder. You can learn more about those helpful features in the Resources section.
In this case, you're building the flow in a safe, isolated Playground. We've tested this flow many times at Salesforce. So, you can activate the flow now and test it later.
Click Activate in Flow Builder. That’s it!
Click in Flow Builder to go back to Setup.
Create the Action
Before you can add your flow to the page, you need to create a new button for it to work on the Program Cohort object.
- In Setup, click the Object Manager tab.
- Find and select Program Cohort from the list.
- Click Buttons, Links, and Actions.
- Click New Action.
- In the Action Type field, select Flow.
- In the Flow field, select Email Program Participants (Cohort).
- In the Label field, enter
Email Program Participants
. The Name field should automatically populate withEmail_Program_Participants
.
- In the Description field, enter
Emails all program participants with engagements in this cohort.
- Click Save.
Add the Action to the Page Layout
Now that you have a button, add it to the page as a quick action.
- In Setup, click the Object Manager tab.
- Find and select Program Cohort from the list.
- Click Page Layouts.
- Select Program Cohort Layout.
- In the palette, click Mobile & Lightning Actions.
- Drag Email Program Participants from the palette to the Salesforce Mobile and Lightning Experience Actions area. Place it second in the list after Edit.
- Save your work.
Check the Button on the Layout
Just to make sure, check that the button appears on a program cohort record.
- Find and select Program Cohorts from the App Launcher (
).
- Switch to the All list view and click any cohort, such as Emerging Readers: Primary Grades.
- Check that the Email Program Participants button appears in the quick actions area on the record.
Don’t click that button just yet! In the next step you make sure the email is sent with the details you expect. To do that, you’ll set up two new contacts with your email address, create program engagements for each, and add them to a cohort.
For now, click Verify to check your work and move on to the next step.
Resources
- Salesforce Help: Test a Flow
- Salesforce Help: Activate or Deactivate a Flow
- Salesforce Help: Create an Object-Specific Quick Action That Launches a Flow
- Salesforce Help: Customize Actions with the Enhanced Page Layout Editor