Targeting
Frigade’s targeting logic allows you to create complex logic chains that can be used to trigger actions on flows. Targeting logic can be used in the following places:
- Starting a flow for targeted users (controlled in the “Targeting” field on the Flow detail page)
- Showing or hiding a step in a flow (using visibilityCriteria)
- Blocking a step in a flow from starting (using startCriteria)
- Auto-completing a step in a flow when targeting logic becomes true (using completionCriteria)
Boolean logic
Supported operators are:
&&
||
==
!=
>
<
>=
<=
Available fields
All data you’ve made available to Frigade can be used in your targeting logic.
User fields
The following properties are supported on users:
- User properties:
user.property('<property>')
- User properties partial match (not case-sensitive):
user.propertyContains('<property>', '<searchString>')
(returnstrue
orfalse
) - User flow state:
user.flow('<flowId>')
(e.g.COMPLETED_FLOW
,STARTED_FLOW
,NOT_STARTED_FLOW
) - User flow step state:
user.flowStep('<flowId>', '<stepId>')
(e.g.COMPLETED_STEP
) - User event count:
user.event('<eventId>').count
Organization fields
The following properties are supported on organizations:
- Organization properties:
organization.property('<property>')
- Organization event count:
organization.event('<eventId>').count
Examples
Trigger a flow to a user who has connected their bank account:
user.property('bankAccountConnected') == true
Trigger a flow only for users signed up after a certain date:
user.property('accountCreatedDate') > '2023-03-01 00:00:00'
Trigger a flow to a user who has completed a different initial onboarding flow and has connected a bank account
user.flow('flow_i6kH7DjcbE6tiaQd') == 'COMPLETED_FLOW' && user.property('bankAccountConnected') == true`
Trigger a flow when a step in another flow is completed
user.flowStep('flow_i6kH7DjcbE6tiaQd', 'my-step-id') == 'COMPLETED_STEP'
If the event properties do not matter and you simply wish to see if a user has triggered an event, you can use the following expression:
user.event('pageView').count > 0
Automatically trigger when an organization sends a specific event:
organization.event('connectedBankAccount').count > 0