Journeys

A real-time journey is an always-on program that customers move through as their behavior changes. Travelers enter a real-time journey when they join a real-time segment or when an event of a given type arrives for them, move through the journey’s stages–activations, waits, and splits–and leave when they meet one of the journey’s exit conditions or reach the end of their path. Every traveler’s path is recorded in a travel log.

Real-time journeys and batch journeys

Real-time journeys and batch journeys have the same building blocks–activation, wait, conditional-split, percent-split, and merge nodes–but differ in when and how they run:

  • A real-time journey runs continuously. Travelers enter and advance in real time as inbound events change their profiles.

  • A batch journey runs on a schedule or recurrence.

Real-time journeys add a quiet-hours node, which holds travelers until a quiet window–such as overnight in the customer’s local time zone–ends, so that messages are not sent at inconvenient times. A profile collection supports up to 50 real-time journeys.

Real-time journeys deliberately do not include the batch journey’s measurement features. Goals, milestones, and conversion-rate metrics are batch-only; a real-time journey does not track them. To analyze a real-time journey, use its travel log.

How travelers enter

A real-time journey enters travelers in one of two ways. A journey uses one of them, never both:

  • Segment membership. A customer enters the moment they become a member of a real-time segment that gates the journey. Use segment membership when entry depends on a customer’s state, such as a cart that has gone 30 minutes without changing, or a loyalty tier they just reached. Because a real-time segment re-evaluates whenever a profile changes–on each event, and shortly after a time-based computed attribute changes–a segment can start a journey when a condition becomes true even though no single event marks that moment.

  • Event arrival. A customer enters the moment an event of the journey’s trigger event type arrives on its event stream and is resolved to their profile in the journey’s profile collection. No segment is involved. Use event arrival when the moment is the event itself, such as a form submission, a booking, or a flight delay.

Either way, a journey’s exclusion segments keep their members from entering.

Event keys and instances

A segment-membership journey has one instance per customer: a customer is either in the journey or not. A trigger-event journey has an event key that decides what an instance is:

  • With the event key amperity_id, an instance is the customer, as it is for a segment-membership journey.

  • With an event property as the event key, such as a cart ID or an order ID, an instance is one value of that property for one customer. A customer with three open carts travels the journey three times, and each instance moves through its own waits, splits, and activations. The exception is a percent split, which picks a path for the customer rather than for the instance: all three carts take the same percent-split path.

An event that has no value for the event key property does not start an instance.

Trigger event data

Each instance carries the event that started it. Conditional-split criteria can test the event’s properties alongside the profile’s attributes, and activations can send the event’s properties to the destination alongside profile attributes. The event is kept for the life of the instance, so a split or activation after a wait uses the event that started it.

How travelers leave

A traveler leaves a real-time journey in one of two ways:

  • They meet an exit condition. A real-time journey’s exit conditions remove a traveler immediately when they receive an event of a given event type, join a real-time segment, or enter another real-time journey. On a trigger-event journey keyed by an event property, an exit event has its own event key and removes only the instance whose key value matches: an order for one cart ends that cart’s instance, and the customer’s other carts continue. An exit segment applies to the customer instead: when a customer joins an exit segment, every one of their instances in the journey exits.

  • They reach the end of their path. A traveler who completes the last node on their path leaves the journey.

Leaving the segment that let a traveler in does not remove them from the journey. A customer who abandons a cart and then purchases is still a traveler until an exit condition removes them, so add an exit condition for every reason a traveler should stop receiving the journey’s messages.

Re-entry and testing

A real-time journey controls whether, and how soon, a traveler can enter again:

  • Re-entry allows a customer who has left the journey to enter it again the next time they join its segment or send its trigger event.

  • A cooldown–from minutes to months–sets how long after leaving a traveler must wait before re-entering.

  • On a trigger-event journey keyed by an event property, re-entry and cooldown apply to each key value. Without re-entry, each value travels the journey once, and an event whose value is already traveling does not start it again.

  • Linked journeys extend the re-entry check to other journeys you name, so that a customer’s recent path through a related journey is considered when deciding whether they can enter this one.

Use test mode to validate a real-time journey before it sends. In test mode, travelers move through the journey as they would in production, but activations are not sent to the destination and the journey does not write to its travel log.

The travel log

As travelers move through a real-time journey, Amperity records their paths in a travel log. The travel log holds one row for each stage a traveler enters–the start of the journey, each node, and how they left, by meeting an exit or by completing the journey. Each row records when the traveler entered the stage, so the rows for a traveler, in time order, reconstruct their path. A node’s row also records the node before it on the journey canvas; start, completion, and exit rows have none. When a traveler exits, the row captures why: the segment, journey, or event that caused the exit. On a trigger-event journey keyed by an event property, event_id holds the instance’s key value, so the rows for one cart or order reconstruct that instance’s path. A row for any exit other than an exit event holds the customer’s Amperity ID instead.

The travel log is data, not a screen in Amperity. To analyze it–who entered, how they moved, and where they left–export it to a downstream system.

Holdout and A/B testing

When a real-time journey splits travelers with a percent-split node, each traveler’s travel log rows record the percent-split node’s name as test_group_name, the path the traveler took as stage_name, and whether that path is the control as is_control. Include a control path with Include control, then compare the travelers on each path with the control path to measure the journey’s effect against the holdout.

Exporting the travel log

A real-time journey’s scheduled work is exporting its travel log. On its schedule, the journey sends new travel-log records to a configured destination, so that the data can land in a downstream system for analysis. Each run picks up the records added since the previous export.

Real-time journeys in segments

A segment’s Journey clause selects customers by their path through a journey: whether they passed through a node (Node Passed Through), when they first or last entered a node, and how many times they entered the journey (Entry Count).

Segment clauses that test whether a customer reached a goal or reached an exit do not apply to real-time journeys: real-time journeys do not track goals and exits the way batch journeys do, so those clauses return no results for a real-time journey.

A real-time journey’s travelers can’t be opened as a segment.