I'll appreciate your help,

  1. We have already established MC connect to our client's CRM (SF Sales).

  2. In the CRM, we have an Object that is connected to a second object.

  3. We want that a certain change in one of the second object's fields (let's say a date for an appointment is set) will act as a trigger for a certain contact (which is connected only to the first object) to be added to a journey in SFMC.

  4. We can do that using query of course, but when trying to achieve it using journey builder interface and "salesforce data entry source" we cannot "reach/see" that contact.

are we missing something, or must there be adaptations from the CRM side otherwise query are the only option?



1 Answer 1


You can also use the API entry for the Journey in Marketing cloud. But NOTE that you may need to write custom APEX code in Sales cloud to trigger as below.

Sales/Service cloud:

By using Future class, pass the parameters to the Marketing cloud's Landing page. Make sure to include the 18-digit Contact/Lead ID.

Marketing cloud Fire Entry to Journey


Example cloudpage code:

<!-- Processing page : START -->
SET @subkey = QueryParameter('subkey')
SET @FirstName = QueryParameter('FirstName')
SET @email = QueryParameter('email')
   /*Generating the AccessToken using client id and secret key*/
   VAR @callstatus, @response
   SET @payload = '{"client_id": "xxxxxx", "client_secret": "xxxxxxx", "grant_type": "client_credentials"}'
   SET @accessToken = HTTPPost2("https://xxxxxxxxxxxx.auth.marketingcloudapis.com/v2/token", "application/json", @payload, True, @callstatus, @response)
   <script runat="server">
   /*Framing the API content and extracting only access token from the above response*/
   Platform.Load("core", "1");
   var subkey = Variable.GetValue("@subkey");
   var FirstName = Variable.GetValue("@FirstName");
   var email = Variable.GetValue("@email");
   var accessTok = Variable.GetValue("@callstatus");
   var response_ = Platform.Function.ParseJSON(accessTok);
   var accessToken_ = response_.access_token;
   var content = { "ContactKey": subkey, 
       "EstablishContactKey": true, 
       "Data": { 
          "email address": email,
          "Contact Key":subkey }}
   var strContent = Platform.Function.Stringify(content);
   Variable.SetValue("@token_",'Bearer '+accessToken_); 
   /*Invoking the journey API*/
   var @statusCode
   var @response
   SET @post = HTTPPost2("https://xxxxxxxxxx.rest.marketingcloudapis.com/interaction/v1/events","application/json",@content,false,@statusCode, @response, "Authorization", @token_)
 %%=v(@token_)=%% <br/>
 %%=v(@statusCode)=%% <br/>
<!-- LIVE:: Processing page : END -->

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .