Skip to main content

Targeting rules

Set targeting rules

After creating a flow, click on the start block to open the details pane. In the details pane you can set the expression for which users should qualify for this flow.

You can read more about start blocks here.

Targeting rules expression language

This is the expression language you can use to craft entry conditions:

Type of user propertyOperatorsRulesExample
Number==
>
>=
<
<=
!=
projects_created <= 3
Boolean==
!=
Allowed values are only true and false (not T, F, etc.)activated == true
String==
!=
Strings must be surrounded by double quotes ". You can escape any double quote characters with \. These are case sensitive: they must exactly match the property value.SKU == "Free"
company == "World’s \"Best\" Coffee"
Logical groupAND
OR
These are case insensitive: you can use OR, Or , or orrole == "marketing" OR role == "sales"
Reserved wordsThe expression can’t contain:
'DROP'
'TRUNCATE'
'DELETE'
'COMMIT'
'GRANT ALL'
'CREATE OR REPLACE'
info

Property names are case sensitive and the property name in the expression must match the case of the user property. Projects is different than projects.

Example targeting rules

Let’s say a user has the following properties:

user = {
email: "oneill@acme.com",
name: "O'Neil",
company: "Acme Co",
projects: 2,
SKU: "Pro",
activated: false,
role: "Marketing",
}

Here are some example targeting rules and the result for this user:

Targeting rulesResult
projects < 10✅ User qualifies
projects < 10 AND SKU == "Pro"✅ User qualifies
role == "Marketing" OR role == "Sales"✅ User qualifies
activated == true❌ User does not qualify
role != "Marketing"❌ User does not qualify

Flow qualification

A user’s qualification for a flow is evaluated in real-time. If the user hasn’t started the Flow and the user’s properties are updated where the user no longer matches the targeting rules, then they will no longer qualify for that flow and will not start it.

Once a user starts a flow the flow is in progress and the user will remain in that flow until the flow is finished or exited, even if the user’s properties are updated and no longer match the targeting rules.