Data-binding is the mechanism to consume an
outArgument from a previous activity.
For Custom Activity
outArguments, the syntax would be
activityKey can be found manually.
For the manual process, you can get it manually by inspecting the element in devtools of the Journey Data on the settings page in Journey Builder.
For Programmatically you can find by using a
postmonger signal called
requestInteraction which returns information about the journey itself. This will include every activity on the canvas.
There is a repo here (https://github.com/salesforce-marketingcloud/sfmc-example-jb-custom-activity/blob/master/modules/discount-code/config/config-json.js) that shows both the examples of how to build config files and split and pass arguments.
There is an example of this here
In this example, it actually loads a drop-down list to the user of all activities that have
discountCode as an
outArgument. The selected value of that drop down is the
activitykey that it got from the
postmonger signal.So basically it iterates over each activity and inspects the schema specified to find potential
outArguments to use from previous activities
For Update Contact Activity
The Update Contact activity does not support selecting from Journey Data natively, but it is possible to manually type in the mustache data binding expression and get the desired result when the contact executes through the activity.
More on data-binding: https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/how-data-binding-works.htm
The hard part is knowing the
activityKey/outargument field name of previous activities. This can be achieved using some
postmonger signals in a custom activity to get metadata about the journey itself