How to use equal / not equal conditions under the if condition (personalization) | Community
Skip to main content
Level 2
October 8, 2024
Solved

How to use equal / not equal conditions under the if condition (personalization)

  • October 8, 2024
  • 2 replies
  • 816 views

Hello everyone,

We're currently working on a challenge involving conditions based on both language and first name. Here's the scenario:

  • We support two languages: Arabic and English. If the user's language is set to Arabic, the Arabic version is displayed, and the same applies for English.
  • Additionally, if the user has a first name, it should be displayed.

We need to handle multiple combinations of these conditions to ensure the correct content is shown.

The expression is: 

 

if language = Arabic & firstName != null & firstName != ""

element 1

else if language = Arabic & firstName = null

element 2

else if language = Arabic & firtsName = ""

element 3

else if language = English & firstName != null & firstName != ""

element 4

else if language = English & firstName = null

element 5

else if language = English & firtsName = ""

element 6

else if language = Arabic & firstName = null

element 7

else

element 8

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

riballor
Level 3
October 14, 2024

For this current case @elenagor I have used a split condition inside the journey using this function matchRegExp(<parameters>) to identify if the language is written in Arabic or Latin alphabet (this also validate if the first name exist or not). Then in the Content you added specific personalization for the first name 🙂