Send surveys with a Screen Flow
This guide provides a step-by-step walkthrough for sending surveys to contacts using a Salesforce Screen Flow. This specific flow is designed to send surveys to all campaign members within a Salesforce Campaign, with one call to the Send Surveys (nps.today) action. It works for campaigns of up to about 4,000 members; for larger campaigns, see Troubleshooting.
Watch how it looks

Built this flow from an earlier version of the guide?
Earlier versions called the deprecated Request NPS Ratings action once per campaign member, inside a loop. That flow fails after a few dozen members. Rebuild it with the steps below, or see Request NPS Ratings (deprecated) for a way to keep it working until then.
The finished flow

Prerequisites
- Apex Action: Ensure the
Send Surveys (nps.today)action is available in your org. Update the nps.today package to the latest version to get it. - nps.today CampaignID: Have your specific Survey/Campaign ID ready.
- Permissions: You must have Flow Builder and Object Manager access.
Creating the Flow Foundation
- Navigate: Go to Setup > Flows and click New Flow.
- Select Type: Choose Screen Flow.
- The Record ID Variable:
- Click New Resource in the left sidebar.
- Resource Type:
Variable. - API Name:
recordId(⚠️ Casing is critical: lowercase 'r', uppercase 'I'). - Data Type:
Text. - Availability: Check Available for input.
- Purpose: This "catches" the Salesforce Campaign ID from the button.
Finding the Recipients
- Add 'Get Records' for the campaign: Click the (+) on the canvas.
- Label:
Get Campaign. - Object:
Campaign. - Condition Requirements:
IdEqualsrecordId. - How Many Records: Select Only the first record.
- Purpose: The campaign owner becomes the responsible employee of every survey.
- Label:
-
Add 'Get Records' for the members: Click the (+) after
Get Campaign.- Label:
Get Campaign Members. - Object:
Campaign Member. - Condition Requirements:
CampaignIdEqualsrecordIdContactIdIs NullFalse
- How Many Records: Select All records.
- Storage: Select Automatically store all fields.

- Label:
-
Collect the contact IDs:
- Click New Resource: Resource Type
Variable, API NamecontactIds, Data TypeText, and check Allow multiple values (collection). - Click the (+) after
Get Campaign Membersand add a Loop. Label:Collect Contact Ids. Collection Variable:{!Get_Campaign_Members}. - On the For Each Item path, add an Assignment. Label:
Add Contact Id. Set{!contactIds}Add{!Collect_Contact_Ids.ContactId}. - The loop only collects IDs. Don't add an action inside it.

- Click New Resource: Resource Type
-
Add 'Get Records' for the contacts on the After Last path of the loop.
- Label:
Get Contacts. - Object:
Contact. - Condition Requirements:
IdIn{!contactIds}. - How Many Records: Select All records.
- Storage: Select Automatically store all fields.

- Label:
The Confirmation Screen
- Add 'Screen' Element: Click (+) after
Get Contacts. - Label:
Confirm Survey Send. - Configure Footer:
- In the right sidebar, expand Configure Footer.
- Under Next or Finish Button, select Use a custom label.
- Type:
Send Surveys Now.
- Add 'Data Table' Component:
- Drag Data Table from the left components menu onto the screen.
- Source Collection: Select
{!Get_Contacts}. - Configure Columns: Add your preferred columns, e.g., Full Name and Email.
When the flow runs, the screen lists the contacts that get a survey:

Sending the Surveys
- Add 'Action': Click (+) after the Confirmation Screen. Don't put it inside a loop.
- Search: Search for survey and select Send Surveys (nps.today).
- Label:
Send Surveys. - Who gets the survey:
- Send to: Select
Contacts. - Records: Keep A record collection and select
Records from Get Contactsin the list next to it.
- Send to: Select
- Campaign ID: Keep Fixed value and enter your campaign ID (e.g.,
18134). - Responsible employee: Select User ID from the flow. In the list next to it, select
Get Campaign, thenOwner ID. The setting then showsGet Campaign › Owner ID. -
What-Id: Select From the flow, then
recordId.
The action sends the surveys in the background, at most 250 respondents per request. See Send surveys from a flow for all its settings, and Stay within Salesforce's limits for how long a list can be.
Let the user choose who gets the survey
Set the data table on the confirmation screen to let the user select rows. The list next to Records then also offers Selected Rows from followed by the name of your table. Choose it, and only the ticked contacts get the survey.
The Result Message
- Add 'Screen' Element: Click (+) after
Send Surveys. - Label:
Result. - Configure Footer:
- Under Next or Finish Button, select Use a custom label.
- Type:
Done.
-
Add 'Display Text' Component:
- Drag Display Text onto the screen.
- Insert the resource
{!Send_Surveys.message}. It shows e.g. Queued 3 rating requests.

-
Optional: Add a Decision on
{!Send_Surveys.success}before the screen, to show a warning when some contacts were skipped. The reasons are logged as NPS Error records. - Save and Activate: Click Save, give the flow a name, e.g.
Send NPS Surveys, and click Activate. Only active flows can be chosen for a button.
Deployment (The Button)
- Object Manager: Go to Object Manager > Campaign > Buttons, Links, and Actions.
- New Action: Click New Action.
- Action Type:
Flow. - Flow: Select your new Flow.
- Label:
Send NPS Surveys.
- Action Type:
- Update Page Layout:
- Go to Campaign Page Layouts.
- Click Mobile & Lightning Actions in the top palette.
- Drag Send NPS Surveys into the Salesforce Mobile and Lightning Experience Actions section.
Lightning page with Dynamic Actions?
If the campaign's Lightning page uses Dynamic Actions, add the action in Lightning App Builder instead of the page layout.
Troubleshooting
- Empty Table? Ensure the Campaign Members are added as Contacts and not Leads.
- Some contacts skipped? The result message says how many. The reasons, e.g. a contact without an email address or phone number, are logged as NPS Error records.
- Action Missing? Ensure the
nps.todaypackage is updated to the latest version, properly licensed, and that the Apex class is accessible to the user's profile. - More than about 4,000 members? The loop that collects the contact IDs then needs more memory than Salesforce gives a flow. The flow stops before the confirmation screen with You or your organization has exceeded the maximum limit for this feature. For larger campaigns, use a scheduled flow on Campaign Member instead.