How a journey runs
A journey decides what a participant is given next from what they did. It is a graph: nodes the participant can be at, each with actions that run when they arrive, joined by transitions whose When and If decide whether the way out is open. A journey never draws anything itself: it assigns sequences, and the surface each lands on decides how it looks.
The server runs it; the apps predict it
The server runs every journey, and its record is the official one. It runs a participant's journeys on each input, in the order inputs arrive and one at a time per person: an assignment, an answer, a change to their tags, groups, cohort, extras, relationships or consent, a health reading, and a wait coming due (the server wakes waits itself; the app needn't be open). Only the server does what reaches anyone else: tasks, emails, texts, chat messages, pushes, and the journeys a chain starts.
The apps run the same rules on what the participant does, so what the next node assigns shows at once, offline too. At each sync the phone takes the server's record and predicts again from it anything the server hasn't heard yet. Entering a node is dated from what caused it (an answer at the time it was given, a wait at the moment it matured), so the two agree whenever anyone looks.
A pass
When something happens, the runner starts at the participant's node and checks its transitions
in order. The first open transition is taken, the new node's actions run, and the check
repeats from there. The pass stops when nothing is open or an end node is reached, which
completes the user journey.
- A pass can move several nodes.
alwaystransitions in a row are walked in one go, and every node on the way runs its actions. One pass enters at most as many nodes as the journey has, so a loop ofcheckedWhens can't spin. - One answer moves a participant across one transition. The answer is spent by the transition it moved:
the next node's
answeredWhen doesn't take it again, so a node pointing back at itself settles. It stays readable: that node's actions and the transitions after it read it as the newest response, and nothing saved after it. - Nothing open, nothing happens. A participant stays at a node until something opens a way
out, which is how a wait is built (an
afterWhen). Give a branching node a way out that can always be taken, or someone whose score never arrives waits for ever. - A chain (
createUserJourney) starts another journey in the same pass, up to eight journeys deep.
Assigning, ending, assigning again
- Assigning a journey starts the participant at its start node on the version chosen, and that user journey keeps that version. Assigning it again starts them over. A chain into a journey they are already enrolled in leaves them where they are.
- Ending a journey stops it (no more nodes, waits or chains) and leaves everything it already assigned on the participant's home screen, answered or not.
- Editing a node changes what future arrivals get, never anything for people already past it.
A failing action never stops a pass: an action whose tag was deleted, or whose participant has no email address, is recorded and skipped, and the participant still moves.