|
| 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 | +- Journey 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 using Segment's [Real-Time Compute System](/docs/personas/audiences/#real-time-compute-vs-batch). |
| 29 | +- Segment doesn't 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 can't 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. |
| 41 | + |
| 42 | +To enter each subsequent step, three conditions must be true: |
| 43 | + |
| 44 | + |
| 45 | +1. The user previously joined the parent step. |
| 46 | +2. The user meets the next step's conditions. |
| 47 | +3. The users satisfies wait conditions. |
| 48 | + |
| 49 | +### Evaluating Prior Step Membership |
| 50 | + |
| 51 | +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 step's defined conditions. |
| 52 | + |
| 53 | +### Condition Steps |
| 54 | + |
| 55 | +“Add a condition” steps operate like [Personas Audiences](/docs/personas/audiences/). The defined conditions provide criteria for each step’s membership. |
| 56 | + |
| 57 | +### Wait Times |
| 58 | + |
| 59 | +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. |
| 60 | + |
| 61 | +The following table summarizes the three step membership conditions and their equivalents in written logic: |
| 62 | + |
| 63 | +| Semantic Logic | Written Logic Condition | |
| 64 | +|----------------------------------------------------|------------------------------------------------------| |
| 65 | +| Has the user ever joined the previous step? | Does `preceding_step_audience_member` trait exist? | |
| 66 | +| Does the user meet the specified step conditions? | Defined conditions in "Add a condition" step | |
| 67 | +| Has the user met preceding N wait time conditions? | Trait `preceding_step_joined_time` at least N time ago | |
| 68 | + |
| 69 | +## Real-Time Step Membership |
| 70 | + |
| 71 | +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). |
| 72 | + |
| 73 | +When a user's traits change or they exceed time-based conditions (for example, "within 7 days"), they may no longer fulfill the conditions of a previously joined step. If a user joins a step but no longer meets its conditions, Journeys removes them from that step’s preview and analytics. The user does, however, continue to progress through the Journey. |
| 74 | + |
| 75 | +Consider the following example of Journey conditions for a cart abandonment campaign: |
| 76 | + |
| 77 | + |
| 78 | +1. Entry Condition: User has clicked `add to cart` and `purchases = 0` within the last 7 days. |
| 79 | +2. Wait Time Condition: 5 days. |
| 80 | +3. Step Condition: User is member of `Example Audience A` |
| 81 | +4. Send to Destination |
| 82 | + |
| 83 | +If a user makes a purchase during the wait time of 5 days, the system would automatically update membership to `false` for the audience created from the entry condition, Step 1. However, the user could still satisfy Step Condition 3 based on the three step membership conditions: |
| 84 | + |
| 85 | + |
| 86 | +| Semantic Logic | Written Logic Condition | |
| 87 | +|----------------------------------------------------|-------------------------------------------------------| |
| 88 | +| Has the user ever joined the previous step? | True; `preceding_step_audience_member` remains true. | |
| 89 | +| Does the user meet the specified step conditions? | True; assuming user is member of `Example Audience A`. | |
| 90 | +| Has the user met preceding N wait time conditions? | True; once 5 days has passed from initial entry. | |
| 91 | + |
| 92 | + |
| 93 | +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: |
| 94 | + |
| 95 | +1. Entry Condition: User has clicked `add to cart` and `purchases = 0` in the last 7 days |
| 96 | +2. Wait Time Condition: 5 days |
| 97 | +3. Step Condition: User is member of `Example Audience A` and `purchases = 0` in the last 7 days. |
| 98 | +4. Send to Destination |
| 99 | + |
| 100 | +### Send to Destination steps |
| 101 | + |
| 102 | +Because Journey members permanently remain in Destination sync stpes, 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. |
| 103 | + |
| 104 | + |
| 105 | +## FAQs |
| 106 | + |
| 107 | +### What happens when a user reaches a single or Multi-Split Condition step and the conditions evaluates to `false`? |
| 108 | + |
| 109 | +Each step’s membership conditions evaluate in real time, which means that users remain in a step until the immediate next step’s conditions becomes true. |
| 110 | + |
| 111 | +### Can users exit and re-enter a Journey? |
| 112 | + |
| 113 | +No. Users move down the Journey’s branches in sequential order and can't re-enter. Journeys appends a profile trait for each step a user enters. Because the system neither assigns `Audience Exit` events nor removes traits from profiles, users who meet the Journey's entry criteria stay in the Journey permanently. |
| 114 | + |
| 115 | +### What happens to traits and audiences when I delete a Journey? |
| 116 | + |
| 117 | +Deleting a Journey removes its underlying audiences from profile views in Personas Explorer. However, the Journey’s True/False traits remain in the user’s last recorded state. |
| 118 | + |
| 119 | +> info "Note" |
| 120 | +> Cloning a Journey generates new, unique traits and sync keys. Deleting the original Journey won’t impact any cloned Journeys. |
| 121 | +
|
| 122 | +### Are splits mutually exclusive? |
| 123 | + |
| 124 | +True/false splits enforce mutual exclusivity by ensuring that once users enter either side of a split, they can't enter the other. |
| 125 | + |
| 126 | +Multi-branch splits don't enforce mutual exclusivity. Users can enter multiple branches of a split if they satisfy the split conditions. |
| 127 | + |
| 128 | +### How does “Use Historical Data” backfill work? |
| 129 | + |
| 130 | +Use Historical Data backfills the entry condition to “prime” the Journey. Future events and existing trait memberships trigger all Journey conditions, except for entry. As a result, event-based conditions only evaluate events that occurred after you published the Journey. |
| 131 | + |
| 132 | +If you want to check for events that occurred before you published your Journey, base your conditions on computed traits instead. |
| 133 | + |
| 134 | +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`. |
| 135 | + |
| 136 | +### How do time windows within step conditions work? |
| 137 | + |
| 138 | +With time windows within step conditions, 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