Personalize email content based on profile attribute value | Community
Skip to main content
Level 2
December 21, 2022
Solved

Personalize email content based on profile attribute value

  • December 21, 2022
  • 2 replies
  • 1313 views

Hi there

 

I would like to personalize an email as following:

If Attribute 1 = "A", then show value of Attribute 2. 
Both attributes are available in Profile.

Example

Customer Attribute 1 Attribute 2
John A 100
John B 200
John C 300

 

Output:
100

 

I tried replicating through Helper Functions with a IF statement, but I did not get the results I hoped for. (Helper Functions)

 

Appreciate your input!

 

(In SFMC this is pretty easily done through AMP)

 

Best,
Giorgia

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

You may be able to retrieve this value using some of the array helper functions, like "includes" 

https://experienceleague.adobe.com/docs/journey-optimizer/using/personalized-dynamic-content/personalization/build-expressions/functions/arrays-list.html?lang=en#includes

 

Beyond that you may be looking at a Change Dimension type use case.

2 replies

SatheeskannaK
Community Advisor
Community Advisor
December 21, 2022

Hi @mandarinooo,

 

I did try this within email designer and it works. Make sure you have path correct that you can confirm from the schema.

 

 

{%#if profile.person.name.firstName = "John"%} {{profile.person.name.lastName}} {%else%} displayFirstname {%/if%}

 

Thanks!

Thanks, Sathees
Level 2
January 16, 2023

Hi @satheeskannak 

Thank you for your reply.

 

Your approach worked for First Name / Last name as the data has a 1:1 relationship. Every customer has only one First name and only one Last name.

 

It does not work when the data has a one to many relationship, like in case of arrays.

 

 

 

 

IvanMi1Adobe EmployeeAccepted solution
Adobe Employee
January 17, 2023

You may be able to retrieve this value using some of the array helper functions, like "includes" 

https://experienceleague.adobe.com/docs/journey-optimizer/using/personalized-dynamic-content/personalization/build-expressions/functions/arrays-list.html?lang=en#includes

 

Beyond that you may be looking at a Change Dimension type use case.

HHeigl
December 25, 2022

Hi,

 

I would like that, too. Hope for more input. Thanks.