1

The custom-activity-deskapi-node example application helpfully demonstrates how a Data Binding Interaction context can be used to pass a caseId value from an outArgument in a Custom Activity to an inArgument in another Custom Activity:

inArguments":[
    "caseID":"{{Interaction.__your-activity-customer-key__.caseID}}" }
]

While this is helpful for understanding Data Binding Interaction contexts, it's not practical to update your config.json file with the activity key each time you use it, for example, to {{Interaction.REST-6.caseID}}.

Is there a solution to use Data Bindings in an Activity context? That is, to retrieve an Activity Key using Data Bindings?

2

The idea behind this feature is that an activity can be placed anywhere in a journey. So, while Interaction-1 may have it first, Interaction-2 may place it further downstream, such as fourth. In each scenario, the 'activity customer key' (ie. REST-1), will be different. So this is a design-time, interaction-specific setting. To get information at runtime today, inside your activity, you'll need to know the interactionId. With that id you can call this route within your custom activity:


https://jbinteractions.exacttargetapps.com/fuelapi/interaction/v1/interactions/[guid]?extras=all&mostRecentVersionOnly=true

That route will tell you about the entire journey. Unfortunately, today this interaction id is not provided in the activity payload when your 'execute' is called by JB. However, I'm told this feature will be implemented in either the next release or the one after that.

| 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.