Skip to main content
Level 1
July 23, 2026
Question

Is there possibility of querying TAGS?

  • July 23, 2026
  • 3 replies
  • 49 views

Im using the following query to consult ClientIDs that entered a specific action (Email action):

 

SELECT

DISTINCT identityMap['clientId'] [0] ['id'] AS node_enter_profiles

FROM

journey_step_events

WHERE

_experience.journeyOrchestration.stepEvents.journeyVersionID = 'd67b3772-71a9-4d4c-b78f-a7c5373f8034'

AND _experience.journeyOrchestration.stepEvents.actionID = 'b5a8420a-899b-437b-97fd-4a425f7a4e71'

AND COALESCE(

_experience.journeyOrchestration.stepEvents.journeyNodeProcessed,

false

) = true

AND (

_experience.journeyOrchestration.stepEvents.dryRunID IS NULL

OR _experience.journeyOrchestration.stepEvents.dryRunID = ''

)

AND COALESCE(

_experience.journeyOrchestration.stepEvents.inTest,

false

) = false

 

Is there a way to include in this query, the date of the start of the journey as well as tags related to the journey?

3 replies

SatheeskannaK
Community Advisor
Community Advisor
July 23, 2026

Hi ​@matiasgutman98 You can’t add tags related to the journey to the query because they aren’t exposed at the dataset level. If you want to add a start date, you can try along these lines:

-- ============================================================
-- the "entrance" event for each profile in this
-- journey version — i.e. the timestamp they actually started
-- the journey (not when they hit the email action).
-- ============================================================
WITH entries AS (
SELECT
identityMap['clientId'][0]['id'] AS node_enter_profiles, -- the profile's clientId
_experience.journeyOrchestration.stepEvents.instanceID AS instanceID,
-- instanceID = unique GUID Adobe assigns per profile, per journey run.
-- This is what we'll use to join back to the action event later,
-- since clientId alone can be ambiguous if the profile re-enters
-- the journey more than once.
timestamp AS journey_start_date
-- the event timestamp itself IS the entry/start date, because
-- we're filtering to only the entrance step below.
FROM journey_step_events
WHERE
_experience.journeyOrchestration.stepEvents.journeyVersionID = 'd67b3772-71a9-4d4c-b78f-a7c5373f8034'
-- same journey version as your original query, so we're
-- looking at entries into THIS specific journey.

AND COALESCE(_experience.journeyOrchestration.stepEvents.entrance, false) = true
-- `entrance` is a boolean field: true only on the step event
-- that represents the profile's first entry into this journey
-- instance. This is the field that gives us "journey start date."
-- COALESCE handles rows where the field is null (defaults to false).

AND (
_experience.journeyOrchestration.stepEvents.dryRunID IS NULL
OR _experience.journeyOrchestration.stepEvents.dryRunID = ''
)
-- exclude dry-run/test-send executions of the journey, same as
-- your original filter — dryRunID is only populated on those.

AND COALESCE(_experience.journeyOrchestration.stepEvents.inTest, false) = false
-- exclude journey steps executed while the journey was in
-- Test Mode in the AJO canvas.
),

-- ============================================================
-- Your original query — profiles that hit the specific
-- email action node, with journeyNodeProcessed = true meaning
-- the node fully completed execution for that profile.
-- ============================================================
actions AS (
SELECT DISTINCT
identityMap['clientId'][0]['id'] AS node_enter_profiles,
_experience.journeyOrchestration.stepEvents.instanceID AS instanceID
-- carry instanceID through so we can join it to `entries`
FROM journey_step_events
WHERE
_experience.journeyOrchestration.stepEvents.journeyVersionID = 'd67b3772-71a9-4d4c-b78f-a7c5373f8034'

AND _experience.journeyOrchestration.stepEvents.actionID = 'b5a8420a-899b-437b-97fd-4a425f7a4e71'
-- the specific action node (your Email action) we're tracking

AND COALESCE(_experience.journeyOrchestration.stepEvents.journeyNodeProcessed, false) = true
-- true once ALL runtime steps behind that canvas node have
-- finished processing for this profile

AND (
_experience.journeyOrchestration.stepEvents.dryRunID IS NULL
OR _experience.journeyOrchestration.stepEvents.dryRunID = ''
)

AND COALESCE(_experience.journeyOrchestration.stepEvents.inTest, false) = false
)

-- ============================================================
-- Final output: one row per profile that hit the action,
-- enriched with the date they entered the journey.
-- ============================================================
SELECT
a.node_enter_profiles,
e.journey_start_date
FROM actions a
LEFT JOIN entries e
ON a.instanceID = e.instanceID
-- LEFT JOIN (not INNER) so a profile still shows up even if,
-- for some reason, its entrance row isn't found (e.g. purged
-- by data retention) — journey_start_date would just be NULL.

 

Thanks, Sathees
Level 1
July 24, 2026

Thank you for your response!

Level 1
September 4, 2026

Is it possible to put in a Feature Request to expose Tags reliably in the AJO Entity Dataset?

I have found that Tags are exposed in the Entity Dataset where only 1 Tag is attached. Ideally, all Tags placed on an AJO Entity would be available in the Entity Dataset to assist in external reporting systems.

This would also assist with troubleshooting Production journeys where you need to leverage Tags to organize journeys in a certain way.