0

I need to get the journey ID from SMS send so I created a code that should get the SendJobId

set @jobid = AttributeValue('SendJobID')

However I cannot retrieve any values. I was hoping to get the SendJobID to use it to get the journeyID using the code below:

IF NOT (empty(@jobid)) THEN
set @tsdid = Lookup("_Job", "TriggererSendDefinitionObjectID", "JobID", @jobid)
set @version_id = Lookup("_JourneyActivity", "VersionID", "JourneyActivityObjectID", @tsdid)
set @journey_id = Lookup("_Journey", "JourneyID", "VersionID", @version_id)
set @journeyName = Lookup("_Journey", "JourneyName", "VersionID", @version_id)
set @campaignID = @journey_id
ENDIF

My question is can I get the SendJobId using AttributeValue syntax? If yes, what might be the cause that I only get a null value.

  • _job data view is for email and not sms – EazyE Jun 15 at 16:30
  • @EazyE thanks for pointing that out, would you know what approach can I use to get the journey Id from journey SMS send? – MC Learner Jun 17 at 0:55
0

Try to query _smsmessagetracking data view, some of the available fields are: CampaignID, ConversationID, CodeID.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.