简体   繁体   中英

Custom Activity Data Binding with Salesforce Objects

We can't extract data from the incoming Salesforce Object in the Journey Builder to the Custom Activity we made. We have already followed the syntax that was instructed in your documentation -> https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/how-data-binding-works.htm (under Event Context section).

We are primarily using Postmonger for our Custom Activity, and in our config.json under the inArguments , we input something like below to fetch the data from the Salesforce Object:

"fieldKey": "{{Event." + [ eventDefinitionKey ] + ".Task:Field_Name__c}}"

The eventDefinitionKey we get from the data loaded by triggering the requestedTriggerEventDefinition exposed by the Postmonger.

The resulting inArguments from above would be something like this:

"fieldKey": "{{Event.SalesforceObjacf28b016bf83c75b4926e0ec292eda5.Task:SMS_Content__c}}"

And based from the documentation mentioned previously, that syntax should be enough, yet we cannot retrieve it on our Custom Activity.

Another thing to note is that we can fetch information using the same syntax if the entry object is a Data Extension like below:

"fieldKey": "Event.DEAudience-e56d43c3-e2cf-60f1-fecd-ecf4d358d7b4.Field_Name"

The syntax above work which uses Data Extension is okay, but the one with the Salesforce Object does not.

What are we doing incorrectly here or is not possible entirely?

NOTE: the journey gets triggered by creating a task in Service Cloud

We put " around the eventDefinitionKey and the field name as well, and it works from Salesforce Data sources.

Something like:

"fieldKey": '{{Event."SalesforceObjacf28b016bf83c75b4926e0ec292eda5"."Task:SMS_Content__c"}}'

Note the switch to single quotes and how we're explicitly wrapping those inner attributes with double quotes

Update Oct 2020

Please see this post here which allows you to see the full merge fields of the entire Data Extension (no matter what type it is)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM