You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/engage/journeys/contextual-journeys.md
+37-12Lines changed: 37 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,20 +100,45 @@ The send to destination step allows journey context data to be included in paylo
100
100
101
101
For example, a payload sent to a messaging platform might include `Order ID` and `Cart Contents` to personalize the message. Users can select which parts of journey context to include in the payload.
102
102
103
+
## Context structure
104
+
105
+
The structure of journey context ensures that event-specific data gets organized and is 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.
106
+
107
+
### How Journey context is structured
108
+
109
+
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.
110
+
111
+
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.
112
+
113
+
### Example of journey context payload
114
+
115
+
The following example shows how journey context might look during a workflow. In this case, the user scheduled an appointment, and the workflow added related event data to the context:
116
+
117
+
```json
118
+
{
119
+
"appointment_scheduled": {
120
+
"appointment_id": "12345",
121
+
"start_time": "2024-12-06T10:00:00Z",
122
+
"end_time": "2024-12-06T11:00:00Z",
123
+
"provider_name": "Dr. Smith"
124
+
},
125
+
"split_decision": {
126
+
"split_name": "appointment_type_split",
127
+
"branch_chosen": "existing_patient"
128
+
},
129
+
"function_output": {
130
+
"discount_percentage": 15
131
+
}
132
+
}
133
+
134
+
This payload contains:
135
+
136
+
- **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.
139
+
103
140
<!--
104
141
105
-
3. Using Journey Context
106
-
Overview of how context supports orchestration and personalization.
107
-
Examples of event data and their role in customer journeys.
108
-
4. Journey Step Features
109
-
Subsections for:
110
-
Wait for Event Split
111
-
Context Split
112
-
Profile Data Split
113
-
Contextual Delay
114
-
Function Steps
115
-
Send to Destination
116
-
Explain how each step uses or modifies journey context.
117
142
5. Context Structure
118
143
Explanation of context organization and data flow.
0 commit comments