Building and Testing a Flow to Trigger Surveys in AskNicely
This guide explains how to create and test a Salesforce Flow to automatically trigger surveys in AskNicely when an Opportunity reaches a specific stage.
Step 1: Create a New Flow
- Navigate to Flows in Salesforce.
- Click Create New Flow and select Record-Triggered Flow.
- Set the Object to Opportunity.
- Configure the trigger to activate when a record is updated.
Step 2: Define the Trigger Condition
- Set the Flow to trigger when the Stage field equals 'Closed Won'.
- Modify the condition so that it only triggers when the record is updated to meet the condition.
- Save the Flow at this point to ensure the trigger function is correctly set up.
Step 3: Add an Action to Send an Email Alert
- Click the + (Add Element) button and select Action.
- Choose Send Email Alert.
- Locate and select the Opportunity Survey Trigger email alert created in the previous step.
- Set the Record ID Value to Triggering Opportunity → Opportunity ID.
Step 4: Activate and Test the Flow
- Activate the Flow.
- Open an existing Opportunity in Salesforce.
- Change its Stage from another value (e.g., 'Negotiation/Review') to Closed Won.
- Click Save.
Step 5: Verify the Triggered Survey
- Log into AskNicely and navigate to the Activity tab.
- Look for a new Email to Survey request.
- Confirm that the request contains:
- Contact Name
- Email Address
- Account ID
- Opportunity ID
- Opportunity Name
- If the survey was set to delay (e.g., 24 hours), verify that the delay is reflected.
- Check the Contact Record in Salesforce to confirm the latest survey entry.
Summary
This Flow automates survey distribution by triggering an email alert when an Opportunity reaches the 'Closed Won' stage. Testing ensures that data is correctly passed to AskNicely, allowing for accurate and timely survey delivery.
Next Steps
If you need further adjustments or troubleshooting, review the Flow setup and confirm the correct email alert and field mappings.