Accessing profileattributes within design | Community
Skip to main content
Level 2
December 11, 2023
Solved

Accessing profileattributes within design

  • December 11, 2023
  • 1 reply
  • 922 views

Hi ,

 

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

 

 

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 Rajneesh_Gautam_

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)")]

1 reply

Rajneesh_Gautam_
Community Advisor
Community Advisor
December 11, 2023

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-to-the-html-offer.html

 

Hope it helps

 

Regards

Rajneesh

Level 2
December 13, 2023

Tried this, but gave me the parse issue .

 

Rajneesh_Gautam_
Community Advisor
Rajneesh_Gautam_Community AdvisorAccepted solution
Community Advisor
December 14, 2023

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)")]