I note that in the Data Binding documentation you can use data binding either in a Custom Activity, or in a Journey Builder Activity (created with an Interaction API method).
I'm trying to figure out how to implement this. I note that it's used in conjunction with the InArguments and OutArguments for the Execute method.
What I would like to do is to use a value from my serialized Event data for a Contact record and use it in a subject line for a Send Email Activity.
I'm taking a wild stab in the dark here, but I'm assuming that I include the following in the arguments of the Send Email Activity:
"arguments":{
"execute":{
"inArguments":{
"myCustomSubject":"{{Contact.Attribute.[Member Preferences].[Preference]}}"
}
}
This will make myCustomSubject
available for use in the Activity. Note that I am binding to Event data stored in a 'Member Preferences' Attribute Set and use the 'Preference' Atrribute for the Contact.
I'm trying to figure out how I can then use this Argument Activity. I would assume that my Activity might look something like this:
{
"id":"89d8e972-648e-45d9-88ce-ac1b63ef9490",
"key":"EMAIL-1",
"name":"Welcome-2015-02-13T042729.094",
"description":"87D0B809-C04A-458E-A40A-E6259ADAB293",
"type":"EMAIL",
"outcomes":[
{
"key":"17399107-9f68-411e-bcfb-dda3fb2fc88f",
"next":"WAIT-3",
"arguments":{},
"metaData":{}
}
],
"arguments":{
"execute":{
"inArguments":{
"myCustomSubject":"{{Contact.Attribute.[Member Preferences].[Preference]}}"
}
},
"emailSubjectDataBound":"{{myCustomSubject}}",
"contactId":"{{Contact.Id}}",
"contactKey":"{{Contact.Key}}",
"emailAddress":"{{Contact.Default.Email}}",
"sourceCustomObjectId":"{{Contact.AddressInfo.Email.SourceCustomObjectId}}",
"sourceCustomObjectKey":"{{Contact.AddressInfo.Email.SourceCustomObjectKey}}",
"fieldType":"{{Contact.AddressInfo.Email.FieldType}}",
"customObjectKey":"{{Event.CONTACT-EVENT-58f14aa9-6316-abfe-7666-f325b8785674._CustomObjectKey}}"
},
"configurationArguments":{
"emailId":"3629",
"emailSubject":"{{myCustomSubject}}",
"sendClassificationId":"E269D976-155B-E411-AEA6-38EAA71427A1",
"senderProfileId":"",
"isMultipartMime":true,
"preheader":""
},
"metaData":{}
}
This doesn't work though. Please can someone point me in the right direction?