Return email from list of emails of a profile | Community
Skip to main content
Silvio6
Level 5
January 22, 2025
Solved

Return email from list of emails of a profile

Hi, I’d like to use a condition within a journey to filter profiles based on email domains, specifically emails with the domain @warder.com from the email object.

For example, if a profile has the following emails: [a@asd.com, b@bsd.com, c@mgh.com], I want to ensure the journey only sends emails to those with the @warder.com domain.

How can I achieve this using advanced expressions in a condition?

I’ve tried an approach, but it seems to be returning all emails associated with the profile rather than filtering for the specific domain.

 

 

Thanks

 

Silvio6
Silvio6Accepted solution
Level 5
February 26, 2025

SOLVED With this expression I return the desired email domain from the profile's email list Object:

#{ExperiencePlatform.ProfileFieldGroup.profile.identityMap.entry('email').first(containIgnoreCase(currentDataPackField.id, 'adobe.com')).id}

9 replies

Silvio6
Silvio6AuthorAccepted solution
Level 5
February 26, 2025

SOLVED With this expression I return the desired email domain from the profile's email list Object:

#{ExperiencePlatform.ProfileFieldGroup.profile.identityMap.entry('email').first(containIgnoreCase(currentDataPackField.id, 'adobe.com')).id}

Translate
Mohan_Dugganab
Employee
February 22, 2025

You can use the following expression to filter those profiles that have 'asd.com' as the email domain value

containIgnoreCase(serializeList(#{ExperiencePlatform.ProfileFieldGroup.profile.identityMap.entry('email').id}, "|", true),'@asd.com')

 

Translate
Silvio6
Silvio6Author
Level 5
February 22, 2025

Thanks! please take a look to my response to ZoeKi.

Translate
Employee
February 21, 2025
This should work:
 
count(#{ExperiencePlatform.ProfileFieldGroup.profile.identityMap.all(
contain(currentDataPackField.email,"@asd.com")
    )}) > 0
 
The all() function will return any listObjects whose email address contains the substring "@asd.com".  I used the "count() > 0" wrapper because listObjects aren't supported in conditions; they need a boolean.
 
Just make sure the syntax before the .all() matches your path to your array (I took a guess based on your screenshot), and that the email field is also the correct variable name. 
Translate
Silvio6
Silvio6Author
Level 5
February 22, 2025

thanks! but I need the string value, for example, "a@asd.com", not a boolean.

 

The use case is that I need to send that string to Slack using custom action, that's why I need the exact value and not the boolean.

 

 

 

 

Translate
nnakirikanti
New Participant
January 28, 2025

Hello @silvio6 try this?

 

matchRegExp(serializedList,'.*@asd\\.com.*' )

 

 

~cheers,

NN.

Translate
Silvio6
Silvio6Author
Level 5
January 30, 2025

mm that's not working bc it's returning a boolean and I want to send email to "a@asd.com" from [a@asd.com, b@bsd.com, c@mgh.com] using a kind of contain function.

 

I mean, I want to return from the whole funcion the "a@asd.com" email

 

Thanks

 

 

Translate
Silvio6
Silvio6Author
Level 5
February 5, 2025

any help?

Translate
Silvio6
Silvio6Author
Level 5
January 27, 2025

.

Translate