← Back to list

Use Journey or Contact Data in Update Contact Activity

Step 1: Query the _Journey Data View

Bushran Mohammed · 2025-01-28 21:59 · 1 claps · 1.4 min read
#salesforcemarketingcloud #salesforce-marketing #journey-builder #dataview #gtl
Open on Medium ↗
Wiki topics: ECO · Economy · General CRM · Email & CRM

Use Journey or Contact Data in Update Contact Activity

Step 1: Query the _Journey Data View

  1. In Automation Studio (or wherever you run SQL queries in Salesforce Marketing Cloud), create a SQL Query activity.
  2. Run the following query to retrieve the Journey’s internal details (VersionID, JourneyID, etc.) by JourneyName:
SELECT
    _Journey.VersionID,
    _Journey.JourneyID,
    _Journey.JourneyName,
    _Journey.VersionNumber
FROM _Journey
WHERE _Journey.JourneyName = '<Journey Name>'

Note the **JourneyID** returned. You’ll use this to fetch further details via the API.

Step 2: Obtain an Access Token

Authentication Endpoint:

POST /v2/token HTTP/1.1
Host: <authkey>.auth.marketingcloudapis.com
Content-Type: application/json

Body (JSON):

{
  "grant_type": "client_credentials",
  "client_id": "clientid",
  "client_secret": "clientsecret",
  "account_id": "accountid" 
}

Replace ***<authkey>*, `clientid**,clientsecret`, and **accountid** with your actual credentials and BU ID.

In the Response, locate "access_token". You’ll need this for the next step.

Step 2: Retrieve the Journey Configuration

  1. Determine Which ID to Use: In your example, you already have H2489FH9-38RJ-38RJ-98HF-E0FJ0H as the Journey ID.
  2. Make the GET Request: Replace **<accesstoken> with the token you received in Step 2. Use your Journey ID** in place of H2489FH9-38RJ-38RJ-98HF-E0FJ0H.
GET /interaction/v1/interactions/H2489FH9-38RJ-38RJ-98HF-E0FJ0H HTTP/1.1
Host: <restkey>.rest.marketingcloudapis.com
Authorization: Bearer <accesstoken>

Replace ***<restkey>*** with your actual Key.

Look for the **triggers array or `eventDefinitionKey`** fields.

How These Steps Tie Together

  1. Identify the Journey you want to inspect (using the Data View query).
  2. Authenticate to the REST API using your client credentials to obtain a Bearer token.
  3. Fetch the Journey’s detailed JSON configuration via **/interaction/v1/interactions/{journeyId}**.
  4. Extract the eventDefinitionKey (or other needed details) from that JSON.
  5. Use the eventDefinitionKey in Update Contact mappings or AMPscript personalization.

That’s it! With these steps in the correct order, you can confidently retrieve the Journey ID from _Journey, authenticate to Marketing Cloud, and then call the Interaction API to get your data-binding values for use in Journey Builder’s Update Contact activity (or any other activity that references the event data).


메타데이터
post_id
cbfd9fd41e93
slug
use-journey-or-contact-data-in-update-contact-activity-cbfd9fd41e93
url
https://medium.com/@bushranmohammed/use-journey-or-contact-data-in-update-contact-activity-cbfd9fd41e93
canonical_url
https://medium.com/@bushranmohammed/use-journey-or-contact-data-in-update-contact-activity-cbfd9fd41e93
author_url
https://medium.com/@bushranmohammed
status
ok
fetched_at
2026-06-15 20:49:13