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:

        "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:

            "myCustomSubject":"{{Contact.Attribute.[Member Preferences].[Preference]}}"

This doesn't work though. Please can someone point me in the right direction?

3 Answers 3


What you should do is follow this example and use AMPscript in your subject.

    { "firstName":"{{Contact.Attribute.__your-de-name__.FirstName}}"},
    { "lastName":"{{Contact.Attribute.__your-de-name__.LastName}}"},
    { "emailAddress": "{{Contact.Default.Email}}"}                          

When you fire the event, you can pass data into the DE to be saved. Your custom activity can receive inArgument data to be used within the custom activity. A standard activity like Send Email can pull in DE data via AMPscript.

Also, see this question/answer/comments for more information.

  • do you have an example where you pass an array of values instead of a single value? example list of the last 3 emails names opened stored in a DE that I prepared for this purpose. I'm having a hard time figuring out the correct template structure.
    – Bechir
    Nov 6, 2019 at 13:38

Ran into a similar issue - the documentation is a bit confusing. We shouldn't include square brackets when using databinding, so your inArguments should look like (assuming JSON):

"inArguments": {
  "myCustomSubject": "{{Contact.Attribute.\"Member Preferences\".Preference}}"

(Quotes around "Preference" are optional, since it has no whitespace.)

In the data binding documentation, they write:

Example: Contact.Attribute.["Product Orders"].["Product Name"]

Which is confusing, because they use the square brackets to indicate a variable, but they are supplying actual strings in place of variables. The documentation should probably be changed to:

Example: Contact.Attribute."Product Orders"."Product Name"


try this instead

 "{{Contact.Attribute.\\"Member Preferences\\".Preference}}"

you may need two escapes.

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.