Skip to content

Commit 5eebb48

Browse files
authored
DOC-298: Understanding Journeys Logic
1 parent e9a7553 commit 5eebb48

File tree

1 file changed

+129
-0
lines changed

1 file changed

+129
-0
lines changed
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
title: Understanding Journeys Logic
3+
---
4+
5+
{% include content/plan-grid.md name="journeys" %}
6+
7+
Journeys are powered by a series of Audiences and Computed Traits. This guide defines the logic used to create sequential campaigns.
8+
9+
By the end of this guide, you'll understand how and why users progress through your Journey. You'll also gain familiarity with the following key Journeys concepts:
10+
11+
- Journeys entry conditions and step behavior
12+
- How Segment evaluates Journeys step membership
13+
- How real-time step membership works
14+
15+
16+
## Entry Conditions and Step Behavior
17+
18+
Journeys begin with an entry condition that computes like standard [Personas Audiences](docs/personas/audiences/). This entry condition queries your customer data in Segment to find users who meet your specified criteria.
19+
20+
After users meet the Journey's entry condition, their progress through the Journey depends on satisfying the criteria of subsequent Journey steps.
21+
22+
Journey steps operate based on the following behaviors:
23+
24+
- Only the entry condition can backfill event data from before Journey publication.
25+
- The entry condition requires no previous step membership.
26+
- Post-entry condition step membership relies on users at some point entering the preceding step.
27+
- When a user first joins a step, Segment adds a `step_joined_time` trait to their profile.
28+
- Membership is calculated by a real-time [Audience](/docs/personas/audiences/).
29+
- Segment does not calculate Waits and Splits in real time.
30+
31+
The combination of these traits, audiences, and business rules allows you to create an enforced funnel with the following implications:
32+
33+
- Users enter the Journey when they fulfill the entry conditions.
34+
- Users cannot re-enter the same Journey at an earlier step.
35+
- Users can only move forward through a Journey.
36+
- Users remain in a step indefinitely until they fulfill the next step’s criteria.
37+
38+
## Step Membership
39+
40+
To enter a Journey, users must satisfy the entry conditions. To enter each subsequent step, three conditions must be true:
41+
42+
43+
1. The user previously joined the parent step.
44+
2. The user meets the next step's conditions.
45+
3. The users satisfies wait conditions.
46+
47+
### Evaluating Prior Step Membership
48+
49+
To evaluate whether a user has ever joined the previous step, Journeys appends the `preceding_step_joined_time` trait to the user’s profile. This trait notes when the user initially joined each step. To enter a step, users must satisfy both the `preceding_step_audience_member = True` condition and the Journey-defined audience conditions.
50+
51+
### Condition Steps
52+
53+
“Add a condition” steps operate like Personas audiences. The defined conditions provide criteria for each step’s audience membership rules.
54+
55+
### Wait Times
56+
57+
When you add a “Wait” step to a Journey, Segment automatically includes wait times in the membership criteria of the next condition step. Journeys represents wait times in relation to the `preceding_step_joined_time trait`, which must be at least N time ago.
58+
59+
The following table summarizes the three step membership conditions and their equivalents in written logic:
60+
61+
| Semantic Logic | Written Logic Condition |
62+
|----------------------------------------------------|------------------------------------------------------|
63+
| Has the user ever joined the previous step? | Does `preceding_step_audience_member` trait exist? |
64+
| Does the user meet the specified step conditions? | Defined conditions in "Add a condition" step |
65+
| Has the user met preceding N wait time conditions? | Trait `preceding_step_joined_time` at least N time ago |
66+
67+
## Real-Time Step Membership
68+
69+
For every step after the entry step, Journeys leverages [the Personas real-time compute system](https://segment.com/docs/personas/audiences/#real-time-compute-vs-batch).
70+
71+
When a user's traits change or they exceed audience time conditions, they may no longer fulfill the conditions of a previously joined step. If a user joins a step but no longer meets its conditions, Segment removes them from that step’s preview and analytics. The user does, however, continue to progress through the Journey.
72+
73+
Consider the following example of Journey conditions for a cart abandonment campaign:
74+
75+
76+
1. Entry Condition: User has clicked `add to cart` and `purchases = 0` in the last 7 days.
77+
2. Wait Time Condition: 5 days.
78+
3. Step Condition: User is member of `Example Audience A`
79+
4. Send to Destination
80+
81+
If a user makes a purchase during the wait time of 5 days, Segment would set the audience membership to `false` for the audience created from the entry condition. However, the `preceding_step_audience_member` trait would remain on the user’s profile as true, so the user would meet the next step’s conditions and continue to progress through the Journey.
82+
83+
To maintain best practices and enforce your funnel, re-check or modify audience conditions that follow wait steps. For example, adding a `purchases = 0` condition to Step 3 results in Segment not advancing users who made a purchase during the wait time:
84+
85+
1. Entry Condition: User has clicked `add to cart` and `purchases = 0` in the last 7 days
86+
2. Wait Time Condition: 5 days
87+
3. Step Condition: User is member of `Audience A` and `purchases = 0` in the last 7 days.
88+
4. Send to Destination
89+
90+
### Send to Destination steps
91+
92+
Segment neither sends `Audience Exit` events to Destinations nor removes users from Destinations lists. As a result, users cannot re-enter or loop within Journeys.
93+
94+
Because Computed Traits from Journeys steps stay appended to user profiles, users permanently remain in a Journey after satisfying its entry conditions.
95+
96+
## FAQs
97+
98+
### What happens when a user reaches a single or Multi-Split Condition step and the conditions evaluates to `false`?
99+
100+
Each step’s membership conditions evaluate in real time, which means that users remain in their current step until the immediate next step’s conditions becomes true.
101+
102+
### Can users exit and re-enter a Journey?
103+
104+
No. Users move down the Journey’s branches in sequential order and cannot re-enter. Journeys use a `true` or `false` profile trait to progress users. Users who meet the Journey’s entrance criteria stay in the Journey permanently.
105+
106+
### What happens to traits and audiences when I delete a Journey?
107+
108+
Deleting a Journey removes its underlying audiences from profile views. However, the Journey’s True/False traits remain in the user’s last recorded state.
109+
110+
> info "Note"
111+
> Cloning a Journey generates new, unique traits and sync keys. Deleting the original Journey won’t impact any cloned Journeys.
112+
113+
### Are splits mutually exclusive?
114+
115+
True/false splits enforce mutual exclusivity by ensuring that once users enter either side of a split, they cannot enter the other.
116+
117+
Multi-branch splits do not enforce mutual exclusivity. Users can enter multiple branches of a split if they satisfy the split conditions.
118+
119+
### How does “Use Historical Data” backfill work?
120+
121+
Use Historical Data backfills the entry condition to “prime” the Journey. Future events and existing trait memberships will trigger all Journey conditions, except for entry. As a result, event-based conditions will only evaluate events that occurred after you published the Journey.
122+
123+
If you want to check for events that occurred before you published your Journey, base your conditions on computed traits instead.
124+
125+
For example, to evaluate if a user already in a Journey has ever used a discount code, create a Computed Trait for `discount_used`, and set it to `true` or `false`.
126+
127+
### How do time windows within step conditions work?
128+
129+
With step condition time windows, you can designate a timeframe for Segment to evaluate whether or not a user has met the condition. Segment calculates the time window from the current point in time, not relative to any other steps in your Journey.

0 commit comments

Comments
 (0)