Hello!
I'm trying to set up some conditional statements in Real Time marketing and the system gives me this error code:
Dynamic content contains a syntax error (such as a missing curly bracket) in or near the following code:
The conditional statements work fine if I input them into an Outbound Marketing template so there isn't anything wrong with the syntax, is there a difference between the two areas and the code they willa ccept? Or have I missed a setting somewhere?
Thanks,
Charlotte
You dont need to use coding in Real-time anymore - with "Conditional content" preview, you can easily create conditions without writing any code. As to your original question, the syntax in Real-time is different - if you still want to use code, go to Advanced Personalization property pane and then use "Condition" option to define a condition. You can then use "Save and generate code" to get the code you need.
Hi, have you tried the new feature in preview -> Conditional content. Maybe that will work better for you? Mind, it is in preview mode. docs.microsoft.com/.../conditional-content
I actually went back and used the sample code provided by D365 in their training guides as I was using the same field to drive my code. (See below)
{{#if (eq contact.address1_country 'Denmark')}}
Hej
{{else if (eq contact.address1_country 'US')}}
Hi
{{/if}} {{contact.firstname}}!
Thanks!
Hi Charlotte Starkey,
Could you provide your conditional statements for further research?
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156