Skip to content
Flows

Flow Triggers

Control when and to whom your flows are displayed.

Flow Triggers

Triggers are the conditions that control when and to whom a flow is displayed. Without triggers, a flow matches all users. With triggers, you can target specific segments, respond to events, and create contextual experiences.

How triggers work

Triggers are configured at the flow level. When your app identifies a user or tracks an event, Setgreet evaluates each published flow's trigger conditions against that user's attributes and event properties on the server, then returns the flow to display. A flow is shown only if its trigger conditions evaluate to true.

If a flow has no trigger conditions, it matches every user -- useful for flows like a universal welcome screen.

Display frequency

Every flow also has a display frequency, which decides whether a matching flow can be shown again:

FrequencyBehavior
justOnceThe flow is shown to each user once, ever. This is the default.
everyTimeThe flow is shown every time its conditions match.

Display frequency defaults to justOnce. A flow with no trigger conditions matches every user, but each user still sees it only once. If you are testing a flow and it stops appearing after the first launch, this is why: set the frequency to everyTime, or reset the user.

Condition sources

Each condition compares a key against an expected value. Conditions come from two sources: the user, and the event they just tracked.

User attributes

Properties you set on the user via Setgreet.identifyUser(). Common examples:

  • plan -- the user's subscription tier.
  • country -- geographic location.
  • signupDate -- when the user created their account.
  • role -- job title or function.
  • Any custom attribute you pass during identification.

Events

Fire a flow off something the user just did. An event condition picks the event name (for example, show a rating prompt when order_delivered is tracked) and can be narrowed with property filters on that event's properties:

  • purchase_completed where amount greaterThan 100 -- only larger purchases.
  • feature_used where featureName equals "export" -- only one feature.

A property filter always belongs to its event. Conditions are checked against the event that was just tracked, so a property on its own would match any event carrying that property. The dashboard nests filters under their event, and the API rejects a property condition that has no event next to it.

A group can match one event. Every tracked event has exactly one name, so two events in the same group can never both match. To react to either of two events, put each one in its own group and match any of the groups.

Operators

Conditions support a range of comparison operators:

OperatorDescriptionExample
equalsExact match.plan equals "pro"
notEqualsDoes not match.country notEquals "US"
containsString contains substring.email contains "@company.com"
notContainsString does not contain substring.email notContains "@test.com"
startsWithString starts with prefix.name startsWith "Dr."
endsWithString ends with suffix.email endsWith ".edu"
greaterThanNumeric greater than.sessionCount greaterThan 5
lessThanNumeric less than.purchaseAmount lessThan 100
greaterThanOrEqualNumeric greater than or equal to.sessionCount greaterThanOrEqual 10
lessThanOrEqualNumeric less than or equal to.purchaseAmount lessThanOrEqual 50
existsIs set: present and not empty.referralCode exists
notExistsIs not set: missing or empty.referralCode notExists

Every operator except notExists fails for a user who doesn't have the attribute at all. So country notEquals "US" doesn't match a user with no country. To include those users, add notExists with OR: country notExists OR country notEquals "US". The dashboard shows these two operators as is set and is not set. They work on user attributes and on an event's property filters, not on the event name itself.

Combining conditions with AND / OR

Triggers support logical grouping to express complex targeting rules.

Top-level operator

At the top level, conditions are joined by an AND or OR operator. In the dashboard this is one setting, "A person enters this flow when all / any of these groups match":

  • all (AND) -- every group must be true for the flow to match.
  • any (OR) -- at least one group must be true.

Condition groups

For more complex logic, you can nest conditions inside groups. A group bundles multiple conditions together with an AND operator internally. Groups at the top level are then joined by the top-level AND or OR.

Example: Show the flow to Pro users in the US, OR to any Enterprise user:

OR
  ├── Group (AND)
  │   ├── plan equals "pro"
  │   └── country equals "US"
  └── Condition
      └── plan equals "enterprise"

This evaluates as: (plan == "pro" AND country == "US") OR (plan == "enterprise").

Setting up triggers in the dashboard

  1. Open your flow in the flow builder.
  2. Click Publish in the top toolbar -- the publish modal opens.
  3. Click Edit Trigger Conditions to open the trigger editor.
  4. Click Add condition or group.
  5. Pick a category: User (a user attribute), Event, or Segment (a saved segment).
  6. For a user attribute, choose the attribute, an operator, and the expected value. For an event, choose the event, then click Add property filter to narrow it. The property list shows the properties tracked with that event, followed by your custom event properties.
  7. Click Add inner condition to add another condition to the same group (all of them must match), or Add condition or group to start a new group.
  8. With more than one group, choose whether a person enters the flow when all or any of the groups match.

Triggers live on the flow's start node, so a trigger change is a change to the flow itself. On a published flow, edit the trigger and then publish again for it to take effect.

Tips for effective targeting

  • Start broad, then narrow -- launch with no triggers to validate your flow works, then add conditions to target specific segments.
  • Use user attributes for stable segments -- attributes like plan, country, and role rarely change and make reliable targeting criteria.
  • Use events for contextual flows -- trigger a feedback survey after purchase_completed, narrowed with a property filter such as amount greaterThan 100, or a feature tip after first use.
  • Test with your own user -- set your own user attributes to match the trigger conditions and verify the flow appears as expected.

If a trigger condition references a key that does not exist on the user, the condition is treated as a non-match. To reliably target users who lack a specific attribute, compare against an explicit sentinel value or use your app to ensure every relevant user has the attribute set via identifyUser.

On this page