Skip to main content

Conditions

A condition is a rule that is true or false about one participant right now. One shape is used wherever VOS tests a participant: a journey transition's If (may it be taken), an action (does it run), a sequence's page and an atom (are they shown: each is shown while its condition holds), and a Home action, settings link or device card (who sees it).

A rule is a clause or a group (all, any, none) of rules, which nest:

{ "all": [
{ "source": "tags.ENROLLED", "operator": "exists" },
{ "source": "sequenceResponses.SLEEP_CHECK.latest.scores.TOTAL", "operator": "at_least", "value": 10 } ] }

A clause's source is a path naming the one thing it reads, down to its code: an assigned tag is tags.<tag>, never a value. What a place can read is in Referencing a participant's data; a path the place can't read is a problem at save. A value is only the source's own content: a score, a band, an answer, a status.

A transition's When is the same clause with an event operator (answered, created, reached, …). A condition takes state operators, below; an event operator in a condition is a problem at save.

Operators​

operatorTrue when
isThe two are equal; 7 matches "7".
is_notThey differ and the source is present.
at_least, at_most, greater_than, less_thanBoth sides are numbers, or text that reads as one, and compare so. A word on either side makes it false.
containsThe source is a list (a multi-select answer) with a member equal to the value. List membership only: never a text search.
not_containsThe source is a list, no member equals the value, and the source is present.
exists, not_existsThe source resolves to something, or to nothing. No value. A tag, group, relationship type or cohort exists while its assignment to the person does ("assignment exists").

Absence decides most surprises. A source that resolves to nothing makes every clause false except not_exists; is_not and not_contains included. "They have none" is not_exists.

Which answer a rule reads​

sequenceResponses.<sequence>.latest is the newest response saved, whichever way it arrived. In a journey, the answer that started a run is the newest for the whole of that run: the transition it moves, the actions of the node it reaches and every transition after read the same answer, and nothing saved later than it. Inside a sequence being filled in, page and atom conditions read the answers given so far as sequenceResponses.current and atomResponses.<atom>.current.