Event helper functions
To access event data used in a realtime journey, you should use the following syntax in your realtime messages:
{{journey.steps.[0].[properties.***]}}
0
in journey.steps.[0]
refers to the first event in a user journey defined in your real-time campaign. If you replace 0 with 1, this will refer to the second one.***
is the placeholder which must be replaced with the name of the event attribute that you would like to access. e.g. url
, customProperty
, total
.The easiest way to find out what properties are available to use, you can use CrossEngage's segmentation engine which allows you to easily see all of your events and their properties.
While the
#includeProducts
helper function is primarily used to access product information, it may also be used to access event data from historical events:{{#includeProducts '{
"eventProducts": {
"events": ["Viewed Product"],
"eventTimes": ["-2 weeks","now"],
"operator": "n-th last",
"operand": 1
}
}
'}}
{{[properties.image]}}
{{/includeProducts}}
Last modified 3yr ago