I want to get all external keys from email triggers in a journey for stopping/publishing/restarting.
So far, I can get their JourneyActivityObjectID (TriggeredSendDefinitionObjectID) through the SQL below.
How do I use these IDs to get the corresponding External IDs (CustomerKey)? Also, I wonder if these IDs have a corresponding property in TriggeredSendDefinition?
SELECT a.VersionID as VersionID, a.JourneyID as JourneyID, a.JourneyName as JourneyName, a.VersionNumber as VersionNumber, a.JourneyStatus as JourneyStatus, b.JourneyActivityObjectID as JourneyActivityObjectID, b.ActivityName as ActivityName, b.ActivityType as ActivityType FROM _Journey as a INNER JOIN _JourneyActivity as b ON a.VersionID = b.VersionID WHERE a.JourneyName = 'Journey Name' /* my journey name */ AND a.JourneyStatus = 'Running' AND b.ActivityType = 'EMAILV2'
Please let me know If I went for a wrong approach. Thanks.