Example Queries
Journeys History queries you can copy and tweak to your purposes
Warnings and Considerations
When querying journey history across versions:
step_id
is not stable across journey versions. All step_id’s will change between versions.step_name
is always unique within a journey version (whether it changes or not between versions depends on whether the user modifies it).
Joining journey history data to other data sources:
operation_id
is available in personalization (using simon.operation_id
in Jinja). This makes it useful to join to other data sources, such as engagement events.
Query for metadata
// Querying for metadata
select metadata:promo_id, count(*)
from contact_journey_history
where metadata:promo_id is not null
group by metadata:promo_id;
All history for a specific Journey
select *
from contact_journey_history
where frontend_journey_id = 'ID appearing in the URL for your journey'
order by entry_id, timestamp asc; // ordered by the time
Updated 3 months ago