OR-Conditions-Use Case:
If you want to display content only to contacts from Germany, Austria, Switzerland you have to add three times the same content, for each an own if-condition. It would be great, if such a use case can be easier implemented (that was an easy case).
CONTAINS-Use Case:
Currently it is not possible to show dynamic content to multi-option-set values, only if it exactly matches the value and one is ticket. It would be great, therefore when a contains-syntax will be added, cause we do not have access to the custom helper in email source code.
https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content#conditional-statements-and-comparisons
In Handlebars.js, there is no built-in "contains" helper, thus we need to create a custom one.
https://axiacore.com/blog/check-if-item-array-handlebars-547/
https://stackoverflow.com/questions/15497794/handlebars-if-value-contains-x
See the problem described in the forum: https://community.dynamics.com/365/marketing/f/dynamics-365-for-marketing-forum/395868/custom-code-in-marketing-email-for-multi-optionset/1069073#1069073
Comments
I totally agree that the Email Editor should allow more syntax.In addition to OR statement above, I would hope it allows other syntax such as #some, @index as per the documentation page.https://handlebarsjs.com/guide/builtin-helpers.htmlThese are built-in helpers which means there shouldn't be much customisation.If we can have these implemented, this will save us a lot of time in email build - we can run a multi-state events and show only relevant state event confirmation, or even limit the number of "Add to Calendar" button in the confirmation email*.*Currently, the built-in logic is to show the button for each event registration record that matches a particular event. As there's no built-in functionality to limit number of registrations per Contact, this means when there's duplicate registrations, the button shows multiple time.Happy to be in touch on this issue! Thanks!
Category: Personalization
Administrator on 10/7/2022 7:55:20 PM
Thank you for your feedback!
"Conditional content" w/o needing HTML coding that allows multiple OR conditions is released as of Sep'2022 release. In a future release we will support more operators.
Please continue to proviude feedback so we can improve the feature further.
How to use conditional content (Dynamics 365 Marketing) | Microsoft Learn
Sincerely,
PM, Dynamics 365 Marketing