Set up conditional actions in Flows 2.0 and Embeds
Send users down different paths based on a survey answer or a user property.
Table of Contents
Conditional actions let one button or image click do different things for different users, based on how they answered a survey question or on a property from their user profile. Instead of building a separate Flow for each audience, you branch inside one. For example, send admins to a setup step and everyone else to the next step. Also known as branching or if/then actions.
For mobile experiences, see Set up conditional actions in mobile experiences.
Prerequisites
- A Flows 2.0 experience (Modal or Tooltip steps) or an Embed.
- Web SDK 7.32.0 or later on your site. If you pin the Appcues SDK to a version, update it before you publish.
- For survey conditions, survey blocks in the experience. See Create surveys in Flows 2.0 and Embeds.
How conditional actions work
You add one or more conditions to a button or image. Each condition has one rule and its own action.
- When a user clicks, Appcues checks the conditions top to bottom and runs the first one that matches. No other conditions are checked.
- If no condition matches, the click runs the Default action.
- A condition can check:
- A Survey question: an answer to a question on this step or an earlier step of the same experience.
- A User property: a property on the user's profile, such as
planorrole.
- Each condition can also run its own Additional options, such as Track event or Update user properties.
Conditional actions work on Buttons and Images. Text links don't support them yet.

Add conditional actions to a button or image
- Select the button or image. On an image, turn on Action on click first.
- Turn on Conditional action. A first condition and a Default section appear, and the block's current action moves into Default.
- In Condition type, choose Survey question or User property.
- Choose the question or property, then choose an operator and enter a Value. The condition's title updates to show the rule, for example
If "setup_rating" Is greater than or equal 4.

- Under Action, choose what this condition does: Next step, Previous step, Go to step, Go to URL, Trigger Flow, Snooze, Dismiss, or Run JavaScript.
- (Optional) Expand Additional options to track an event, update a user property, or mark the Flow complete when this condition matches.
- Click + Add condition for each other path. A button or image can have up to 10 conditions. Put the most specific rule first, since the first match wins. To change the order, click the up or down arrow next to a condition's title.
- Under Default, set the action that runs when no condition matches.
- To stop using conditions, turn Conditional action off. The Default action becomes the block's normal action again.
Operators
| Operator | Use it for |
|---|---|
| Equals, Doesn't equal | An exact answer or value, such as admin
|
| Contains, Doesn't contain, Starts with, Doesn't start with, Ends with, Doesn't end with | Part of a text answer or value |
| Matches regex | A pattern, such as any email ending in your company's domain |
| Is greater than, Is greater than or equal, Is less than, Is less than or equal | Numbers, such as a Rating answer or a numeric property |
Rules to know
- An answer from an earlier step only counts if that step's survey was submitted with Submit survey responses.
- An unanswered question or a missing user property never matches, even with Doesn't equal or Doesn't contain. Those users get the Default action.
- For a Multi Select question, Equals and Contains match when any of the selected options matches.
- The number operators only match numbers. A blank or non-numeric value never matches.
- A property changed earlier in the same experience with Update user properties counts right away.
- If the button also has Submit survey responses turned on, Appcues checks the survey answers first. If an answer is invalid, no action runs and the user stays on the step.
Example: route users by their survey answer
A Flow asks "How satisfied are you with onboarding?" with a Rating question from 1 to 5, reporting name setup_rating. The step has a Continue button with Submit survey responses turned on. You want happy users to see a step asking for a review, and everyone else to see a step asking what to improve.
On the Continue button, turn on Conditional action and set:
-
Condition: Condition type set to Survey question, question
setup_rating, operator Is greater than or equal, value4. Action: Go to step, then pick the review step (step 3). - Default: Go to step, then pick the feedback step (step 4).
Users who choose 4 or 5 go to the review step. Everyone else, including anyone who skipped the question, goes to the feedback step.

To also ask users who choose 5 for a testimonial, add a second condition: setup_rating Equals 5, with Go to step set to the testimonial step (step 5). Then click the up arrow on that condition so it sits above the Is greater than or equal 4 condition. A 5 matches both conditions, and only the first one runs. If the 4 condition stays on top, users who choose 5 go to the review step and never see the testimonial step.
Example: route users by a user property
An onboarding Flow ends with a Get started button. Admins need to connect their workspace before anything else, while other users should go straight into the product. Your app sends a role user property.
On the Get started button, turn on Conditional action and set:
-
Condition: Condition type set to User property, property
role, operator Equals, valueadmin. Action: Go to step, then pick the admin setup step (step 4). - Default: Dismiss.
Admins move straight into the setup step. Everyone else, including users with no role property, closes the Flow and carries on.

Confirm it worked
- Publish the experience to a test segment.
- Open your app as a test user who matches each condition, and click the button. Check that each path runs the action you set.
- Repeat with a user who matches no condition and check that the Default action runs.
If a branch isn't firing
Every user gets the Default action
- Check the user's SDK version. Conditional actions need web SDK 7.32.0 or later.
- For a User property condition, check that the property exists on the user's profile with the value you expect. Check the spelling of both the property name and the value.
- For a Survey question condition on an earlier step's answer, check that the earlier step has a button with Submit survey responses turned on.
The wrong branch fires
Conditions run top to bottom and the first match wins. Move the more specific condition above the broader one. For example, if Is greater than or equal 4 sits above Equals 5, users who answer 5 match the first condition and never reach the second. To change the order, click the up or down arrow on a condition.
The button doesn't do anything
If the button also submits a survey, an answer is invalid or a required question is empty. Answer every required question and try again.
Still stuck?
Collect the following and contact support:
- The experience URL.
- The affected user's User ID.
- The condition you set up: type, question or property, operator, and value.
- The user's web SDK version.
- A screenshot or screen recording of the click and what happened.