Journey Builder includes a Data Binding feature to bind data in the context of a Contact, Interaction or Event. This is feature is primarily used for developing Custom Activities or programatically creating Interactions. However, Data Binding can also be used with the Update Contact Data Activity. What this means is that instead of setting a static value in an Update Contact Data Activity, you can retrieve a specific value from an Attribute Set in your Contact Model, or insert data related to the Interaction, or Event.

I'm using this feature to update a field in a Data Extension by retrieving a value from a different Data Extension. I'm using the following string as a value in the Update Contact Data Activity:

{{#if Contact.Attribute.MemberData.Title}}SALUTATION1 {{#else}}NO VALUE{{/if}}

This is working properly covering the case when Title is null from the DE including NO VALUE. I need now to extend the logic to include 3 different potential values. If Title = "Mr" THEN Salutation 1 If Title = "Ms" THEN Salutation 2 IF Title ="Mrs" THEN Salutation3.

I have been trying to use #unless tag in conjunction with #elseif tags but is not working. According with the official documentation, we should be able to use mustache + handlebars tags also in the Update Contact activity. is that really possible ?

1 Answer 1


Give this one a shot:

{{.when Contact.Attribute.MemberData.Title == "Ms"}} Ms {{lName}}
{{.when Contact.Attribute.MemberData.Title == "Mr"}} Mr {{lName}}
{{.when Contact.Attribute.MemberData.Title == ""}} Yo homie

Hopefully it'll fit.

Source: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/gtlSwitch.html

  • Thanks a lot @Eduardo for your suggestion. In fact, I had already opened a ticket with support and they also suggested me to use switch tag but I tested with the exact syntax you are using here but still failing. Not sure if in Journey Builder Update Contact activity perhaps is not supported. Best Jan 20, 2022 at 11:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .