Skip to content

Commit 12413a6

Browse files
authored
update journey context for features not yet built
1 parent b2aa094 commit 12413a6

File tree

1 file changed

+55
-34
lines changed

1 file changed

+55
-34
lines changed

src/engage/journeys/journey-context.md

Lines changed: 55 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,37 @@ hidden: true
88

99
This page explains Journey context, which can help you dynamically adapt each journey to individual user interactions, creating highly relevant, real-time workflows.
1010

11-
> info "Private Beta"
12-
> Event-Triggered Journeys is in private beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available. During private beta, Event-Triggered Journeys is not HIPAA eligible.
11+
> info "Public Beta"
12+
> Event-Triggered Journeys is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available. Event-Triggered Journeys is not currently HIPAA eligible.
1313
1414
## Overview
1515

1616
Unlike traditional audience-based journeys, which rely solely on user progress through predefined steps, event-triggered journeys capture and store the details of user-triggered events. This shift allows you to access the data that caused users to reach a specific step and use it to make more precise decisions throughout the journey.
1717

1818
With journey context, you can:
1919

20-
- Split journeys based on event attributes or outcomes.
20+
// - Split journeys based on event attributes or outcomes.
2121
- Personalize customer experiences using real-time event data.
2222
- Enable advanced use cases like abandonment recovery, dynamic delays, and more.
2323

24+
For example:
25+
26+
- When a user cancels an appointment, send a message that includes the time and location of the appointment they just canceled.
27+
- When a user abandons a cart, send a message that includes the current contents of their cart.
28+
2429
## What is Journey context?
2530

2631
Journey context is a flexible data structure that captures key details about the events and conditions that shape a customer’s journey. Journey context provides a point-in-time snapshot of event properties, making accurate and reliable data available throughout the journey.
2732

28-
Journey context stores:
29-
- **Event properties**: Information tied to specific user actions, like `Appointment ID` or `Order ID`.
30-
- **Split evaluations**: Results of branch decisions made during the journey, enabling future steps to reference these outcomes.
33+
Journey context stores event property information tied to specific user actions, like `Appointment ID` or `Order ID`.
34+
// - **Split evaluations**: Results of branch decisions made during the journey, enabling future steps to reference these outcomes.
3135

3236
Journey context doesn't store:
3337
- **Profile traits**, which may change over time.
3438
- **Audience memberships**, which can evolve dynamically.
3539

40+
However, the up-to-date values of profile traits and audience membership can be added in a payload sent to a destination.
41+
3642
This focused approach ensures journey decisions are always based on static, reliable data points.
3743

3844
### Examples of stored context
@@ -49,7 +55,9 @@ Event properties are the foundation of Journey context. Examples of event proper
4955
- `Order ID`
5056
- An array of cart contents
5157

52-
Segment captures each event’s properties as a point-in-time snapshot when the event occurs, ensuring that the data remains consistent for use in personalization, branching, and other advanced workflow steps.
58+
Segment captures each event’s properties as a point-in-time snapshot when the event occurs, ensuring that the data remains consistent for use in personalization.
59+
60+
// branching, and other advanced workflow steps.
5361

5462
## Using Journey context in Event-Triggered Journeys
5563

@@ -59,43 +67,47 @@ This is useful for scenarios like:
5967

6068
- **Abandonment recovery:** Checking whether a user completed a follow-up action, like a purchase.
6169
- **Customizing messages:** Using event properties to include relevant details in communications.
62-
- **Scheduling workflows:** Triggering actions based on contextual data, like the time of a scheduled appointment.
70+
// - **Scheduling workflows:** Triggering actions based on contextual data, like the time of a scheduled appointment.
6371

6472
By incorporating event-specific data at each step, journey context helps workflows remain relevant and adaptable to user actions.
6573

6674
### Journey steps that use context
6775

6876
Journey context gets referenced and updated at various steps in an event-triggered journey. Each step plays a specific role in adapting the journey to user behavior or conditions.
6977

70-
#### Wait for event split
78+
#### Hold Until split
7179

7280
This step checks whether a user performs a specific event within a given time window. If the event occurs, Segment adds its details to journey context for use in later steps.
7381

74-
For example, a journey may wait to see if a `checkout_completed` event occurs within two hours of a user starting checkout. If the event happens, the workflow can proceed; otherwise, it may take an alternate path. The data captured includes event properties (like `Order ID`) and the results of the split evaluation.
82+
For example, a journey may wait to see if a `checkout_completed` event occurs within two hours of a user starting checkout. If the event happens, its properties are added to context and the workflow can proceed; otherwise, it may take an alternate path. The data captured includes event properties (like `Order ID`).
7583

76-
#### Context split
84+
// and the results of the split evaluation.
7785

78-
This step evaluates conditions using data already stored in journey context. Based on the conditions, users are routed to different branches of the journey.
86+
If a Hold Until branch is set to send profiles back to the beginning of the step when the event is performed, those events are also captured in context. Because they may or may not be performed during a journey, they will show as available in future steps but will not be guaranteed for every user's progression through the journey.
7987

80-
For example, a user who triggers an event with a property like `order_value > 100` might be routed to one branch, while other users follow a different path. The split uses attributes from journey context, like event properties or prior split outcomes, to determine the appropriate branch.
88+
// #### Context split
8189

82-
#### Profile data split
90+
// This step evaluates conditions using data already stored in journey context. Based on the conditions, users are routed to different branches of the journey.
8391

84-
This step evaluates user traits or audience memberships to determine branching. While Segment doesn't store profile data in journey context, it complements the static data available in the journey.
92+
// For example, a user who triggers an event with a property like `order_value > 100` might be routed to one branch, while other users follow a different path. The split uses attributes from journey context, like event properties or prior split outcomes, to determine the appropriate branch.
8593

86-
For example, users in a premium audience can be directed to a tailored experience, while others follow the standard flow. Segment stores the results of this split in journey context for reference in later steps.
94+
// #### Profile data split
8795

88-
#### Contextual delay
96+
// This step evaluates user traits or audience memberships to determine branching. While Segment doesn't store profile data in journey context, it complements the static data available in the journey.
8997

90-
A contextual delay introduces a wait period based on time-related data in journey context. This keeps workflows aligned with real-world events.
98+
// For example, users in a premium audience can be directed to a tailored experience, while others follow the standard flow. Segment stores the results of this split in journey context for reference in later steps.
9199

92-
For example, a journey can wait until one hour before an `Appointment Start Time` to send a reminder email. The delay reads from journey context but doesn't add any new data to it.
100+
// #### Contextual delay
93101

94-
#### Function steps
102+
// A contextual delay introduces a wait period based on time-related data in journey context. This keeps workflows aligned with real-world events.
95103

96-
Function steps process data from journey context through custom logic. The output of the function gets written back to context for use in later steps.
104+
// For example, a journey can wait until one hour before an `Appointment Start Time` to send a reminder email. The delay reads from journey context but doesn't add any new data to it.
97105

98-
For example, a function might calculate a discount percentage based on an event property, then store that value in journey context for later use. The output gets scoped to a dedicated object (`function_output`) to keep the context structured and reliable.
106+
// #### Function steps
107+
108+
// Function steps process data from journey context through custom logic. The output of the function gets written back to context for use in later steps.
109+
110+
// For example, a function might calculate a discount percentage based on an event property, then store that value in journey context for later use. The output gets scoped to a dedicated object (`function_output`) to keep the context structured and reliable.
99111

100112
#### Send to destination
101113

@@ -107,7 +119,8 @@ For example, a payload sent to a messaging platform might include `Order ID` and
107119

108120
The structure of journey context organizes event-specific data gets and makes it accessible throughout the journey workflow. By standardizing how data is stored, Segment makes it easier to reference, use, and send this information at different stages of a journey.
109121

110-
Journey context is organized as a collection of key-value pairs, where each key represents a data point or category, and its value holds the associated data. This structure supports various types of information, like event properties, split outcomes, and function outputs.
122+
Journey context is organized as a collection of key-value pairs, where each key represents a data point or category, and its value holds the associated data.
123+
// This structure supports various types of information, like event properties, split outcomes, and function outputs.
111124

112125
For example, when a user triggers an event like `Appointment Scheduled`, Segment stores its properties (like `Appointment ID`, `Appointment Start Time`) as key-value pairs. You can then reference these values in later journey steps or include them in external payloads.
113126

@@ -116,31 +129,39 @@ The following example shows how journey context might look during a workflow. In
116129
```json
117130
{
118131
"appointment_scheduled": {
119-
"appointment_id": "12345",
132+
"appointment_id": 12345,
120133
"start_time": "2024-12-06T10:00:00Z",
121134
"end_time": "2024-12-06T11:00:00Z",
122135
"provider_name": "Dr. Smith"
123136
},
124-
"split_decision": {
125-
"split_name": "appointment_type_split",
126-
"branch_chosen": "existing_patient"
127-
},
128-
"function_output": {
129-
"discount_percentage": 15
137+
"appointment_rescheduled": {
138+
"appointment_id": 12345,
139+
"start_time": "2024-12-07T10:00:00Z",
140+
"end_time": "2024-12-07T11:00:00Z",
141+
"provider_name": "Dr. Jameson"
130142
}
143+
// "split_decision": {
144+
// "split_name": "appointment_type_split",
145+
// "branch_chosen": "existing_patient"
146+
// },
147+
// "function_output": {
148+
// "discount_percentage": 15
149+
// }
131150
}
132151
```
133152

134153
This payload contains:
135154

136155
- **Event properties**: Captured under the `appointment_scheduled` key.
137-
- **Split outcomes**: Documented in the `split_decision` object.
138-
- **Function results**: Stored in the `function_output` object for use in later steps.
156+
// - **Split outcomes**: Documented in the `split_decision` object.
157+
// - **Function results**: Stored in the `function_output` object for use in later steps.
139158

140159
## Journey context and Event-Triggered Journeys
141160

142161
Journey context underpins the flexibility and precision of Event-Triggered Journeys. By capturing key details about events and decisions as they happen, journey context lets workflows respond dynamically to user actions and conditions.
143162

144-
Whether you're orchestrating real-time abandonment recovery, scheduling contextual delays, or personalizing messages with event-specific data, journey context provides the tools to make your workflows more relevant and effective.
163+
Whether you're orchestrating real-time abandonment recovery,
164+
// scheduling contextual delays,
165+
or personalizing messages with event-specific data, journey context provides the tools to make your workflows more relevant and effective.
145166

146-
To learn more about how Event-Triggered Journeys work, visit the [Event-Triggered Journeys documentation](/docs/engage/journeys/event-triggered-journeys/).
167+
To learn more about how Event-Triggered Journeys work, visit the [Event-Triggered Journeys documentation](/docs/engage/journeys/event-triggered-journeys/).

0 commit comments

Comments
 (0)