Expand my Community achievements bar.

SOLVED

Accessing profileattributes within design

Avatar

Level 2

Hi ,

 

Is there a way to access profile attributes within the Adobe target Desgin code?

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

hi @DivyaAshankar  - the user.PARAM, including the $ sign should be enclosed within double-quotes. Here's a version of code that does not give parsing error (though in case of Recommendations design, it will you an error if you do not refer to an entity)

 

[#set($parmas="$(user.mboxparam)")]

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @DivyaAshankar  - yes you can access profile-attributes in experience code. Here's the syntax:

var a = “${user.YOUR_PROFILE_ATTRIBUTE}”;

For more detail, you may refer to: https://experienceleague.adobe.com/docs/target/using/experiences/offers/passing-profile-attributes-t...

 

Hope it helps

 

Regards

Rajneesh

Avatar

Correct answer by
Community Advisor

hi @DivyaAshankar  - the user.PARAM, including the $ sign should be enclosed within double-quotes. Here's a version of code that does not give parsing error (though in case of Recommendations design, it will you an error if you do not refer to an entity)

 

[#set($parmas="$(user.mboxparam)")]