Expand my Community achievements bar.

Dive in, experiment, and see how our AI Assistant Content Accelerator can transform your workflows with personalized, efficient content solutions through our newly designed playground experience.
SOLVED

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

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Employee
3 Replies

Avatar

Correct answer by
Employee

Avatar

Level 2

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