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. The key can come from one of three 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.

Event name

The name of the event the user just triggered. Use this to fire a flow off a specific event rather than one of its properties: for example, show a rating prompt when order_delivered is tracked. In the condition builder, pick the event source and match the event name.

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

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

  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. Choose the key type (User Attribute or Event Property).
  6. Enter the key name, select an operator, and set the expected value.
  7. Add more conditions or groups as needed.
  8. Set the top-level operator to AND or OR.

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 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.

On this page