Matching activity attributes in journeys
Ortto’s journeys enable you to match activity attributes so you can track and manage contacts in a journey across different but related activities.
On this page we look at how to match activity attributes in the journey entry and exit criteria, and within condition, filter, and delay shapes.
Matching activity attributes in the journey entry criteria
A contact’s entry to a journey can be set to trigger when x activity occurs, sometimes referred to as a sticky activity.
We call the occurs condition "sticky" because, when used at People enter when, it becomes the primary activity for the journey. This means that the activity’s attribute values can be output in message content, or used to update a field value. For example, you have a journey with the entry criteria "Booked flight occurs". Within the journey you can add an email message that uses merge tags to output the details (attribute values) of the contact’s flight booking.
Conversely, if you were to use x activity has occurred for the entry criteria, it would not be the primary activity throughout the journey. To continue the previous example, if the journey entry criteria was "Booked flight has occurred", when you want to use the activity attributes in the journey (e.g. in an email or to update a field) the values would reflect whatever was the latest occurrence of the "Booked flight" activity. This means that if a contact enters the journey upon booking flight A, then performs a flight booking again with flight B, the values associated with the activity that caused them to enter the journey (from flight A) would no longer be available, they would be replaced by the flight B values. For example, an email message in the journey that uses Liquid to output the flight destination (e.g. {{ activity.custom.booked-flight.destination }}
), would output the destination of flight B, not flight A.
Only sticky activity attributes can be matched for the journey’s entry and exit criteria. This is helpful for handling changing states, such as in a sales pipeline. For example, to track a contact’s deal-related activity, you could use the HubSpot activity "Deal created occurs" as the entry criteria and "Deal updated occurs" as the exit criteria. You can then match the entry and exit criteria via a shared attribute, e.g. "Record ID".
NOTE: Usually, activity data is only stored in Ortto for 90 days (unless you have data retention enabled for the activity).
However, data associated with the sticky activity that caused the contact to enter the journey will be available for the length of time that the contact is in the journey (available for more than 90 days,even if data retention is not enabled). This means that if a contact enters a journey on x activity occurs, the attribute values for that activity will be available to use within the journey (such as in filter and condition shapes, and merge tags) for more than 90 days.
Matching activity attributes in shapes
You can use use activity attribute matching in condition, filter, and delay shapes to better manage a contact’s flow through the journey.
Attribute matching in condition, filter, and delay shapes is designed to be used where the entry criteria for your journey is x activity occurs. In the following examples, we look at how to add condition, filter, and delay shapes for a journey that contacts enter when they book a flight (People enter when: Booked flight occurs).
Condition shape
When building the criteria in a condition shape, once you have selected the activity, you can match activity attributes on each "occurred" type:
- has or has not occurred
- first occurred
- last occurred
- frequency & time.
Condition shapes use x activity occurred criteria for attribute matching, rather than x activity occurs criteria, because the condition captures past events (the activity has to have already occurred (or not occurred) before the contact can pass through the shape).
In the following example, we’ll use a condition shape to determine if the flight booked was domestic or international. To do this, we need to look at the "Booked flight" activity that caused entry into the journey, and look at the attributes of that activity to see the flight details.
To match activity attributes in a condition shape, in your journey flow editor:
- Click an add icon (+) to add a shape and choose Condition > Start from scratch.
- On the Create condition page, click Filter and choose the relevant activity (e.g. "Booked flight has occurred").
- Add a Where clause and select the activity attribute you want to match with the entry criteria (e.g. "Booked flight has occurred where booking reference").
- Click Match with entry activity attribute and choose the entry attribute you want to match to (e.g. "booking reference").
- We recommend using a unique value such as a booking reference, in conjunction with another attribute (e.g. flight type), to ensure the condition matches the activity that caused the journey entry.
- Click Done.
- Click Save to finish setting up the shape.
NOTE: If your journey is turned off or no contacts have yet entered, your condition filter may indicate that you have 0 potential matches. This is expected because the condition is dependent on the journey entry criteria, so until there are people in the journey (the entry activity occurs) we can’t count the potential matches.
Filter shape
In a filter shape, attribute matching is only available for x activity occurs conditions (not for has or has not occurred, first occurred, last occurred, or frequency & time). This is designed with the assumption that you are choosing occurs because you want contacts to wait at the shape until the activity occurs. In this case, if the activity occurred before the contact reached the shape, they will continue to wait at the shape until it occurs again (then they will pass through it).
In the following example, we’ll use a filter shape to look at a different activity which is related to the entry activity. To do this, we’ll look at the "Flight status updated" activity and use one of the activity attributes to link it to the journey entry activity ("Booked flight").
To match activity attributes in a filter shape, in your journey flow editor:
- Click an add icon (+) to add a shape and choose Filter > Start from scratch.
- On the Create filter page, click Filter and choose a relevant activity (e.g. "Flight status updated occurs").
- Add a Where clause and select the activity attribute you want to match with the entry criteria (e.g. "Flight status updated occurs where booking reference").
- Click Match with entry activity attribute and choose the entry attribute to match to (e.g. "booking reference").
- Similar to condition shape, we recommend using a unique value such as a booking reference, in conjunction with another attribute (e.g. status), to ensure the filter activity matches the activity that caused the journey entry.
- Click Done.
- Click Save to finish setting up the shape.
Delay shape
When you add a delay shape and select the Activity option, you can use activity attribute matching when you choose an activity that is different from the journey entry criteria.
In the following example, we’ll use a delay shape to look at a different activity which is related to the entry activity. To do this, we’ll look at the "Booked car hire" activity and use one of the activity attributes to link it to the journey entry activity ("Booked flight").
To match activity attributes in a delay shape, in your journey flow editor:
- Click an add icon (+) to add a shape and choose Delay.
- In the Add delay modal, click Activity and choose a relevant Activity (e.g. "Booked car hire") and Date attribute (e.g. "Return date").
- As with condition and filter shapes, we recommend using a unique value such as a booking reference at the matched attribute to ensure the delay activity (booked car hire) refers to the relevant flight (the exact flight booking that cause the person to enter the journey), rather than another car hire booking the person may have made.
- If required, add an Offset.
- Select a relevant If the date is not set or has already passed option.
- Click OK to finish setting up the shape.