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 the SDK syncs, it evaluates each published flow's trigger conditions against the current user's attributes and event properties. 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.
Condition sources
Each condition compares a key against an expected value. The key can come from one of two sources:
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.
Event properties
Properties attached to tracked events. These let you trigger flows based on something the user just did:
purchaseAmount-- the value of a recent purchase.featureName-- which feature the user just interacted with.sessionCount-- how many times the user has opened the app.
Operators
Conditions support a range of comparison operators:
| Operator | Description | Example |
|---|---|---|
equals | Exact match. | plan equals "pro" |
notEquals | Does not match. | country notEquals "US" |
contains | String contains substring. | email contains "@company.com" |
notContains | String does not contain substring. | email notContains "@test.com" |
startsWith | String starts with prefix. | name startsWith "Dr." |
endsWith | String ends with suffix. | email endsWith ".edu" |
greaterThan | Numeric greater than. | sessionCount greaterThan 5 |
lessThan | Numeric less than. | purchaseAmount lessThan 100 |
greaterThanOrEqual | Numeric greater than or equal to. | sessionCount greaterThanOrEqual 10 |
lessThanOrEqual | Numeric less than or equal to. | purchaseAmount lessThanOrEqual 50 |
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:
- AND -- all conditions must be true for the flow to match.
- OR -- at least one condition 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
- Open your flow in the flow builder.
- Click Publish in the top toolbar -- the publish modal opens.
- Click Edit Trigger Conditions to open the trigger editor.
- Click Add condition or group.
- Choose the key type (User Attribute or Event Property).
- Enter the key name, select an operator, and set the expected value.
- Add more conditions or groups as needed.
- Set the top-level operator to AND or OR.
Triggers are saved independently from the flow graph. You can update triggers without re-publishing the flow's screens and navigation structure.
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 event properties for contextual flows -- trigger a feedback survey after a purchase, 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.