Skip to content

Conditions

When a User is building their Rule for a Segment, they will pick a Function by its Name, and then choose an Operator while adding a Value.

Example:

Function Operator Value
time_since_last_visit > 172800

This will be created and inserted into the database.

segmenter_condition

id has function_id function_operator_id value active created updated
1 1 1 2 '172800' 1 '2020-08-14 14:04:03' '2020-08-14 14:04:03'

A User can now add multiple Conditions and join them together. Each Condition is stored with a unique Id and the Rule is built as a string of Ids with their condition arguments:
(1 and 2) or (1 and 3)
This will return true if either collection of condition evaluates to true.