Accessing profileattributes within design | Community
Skip to main content
New Participant
December 11, 2023
Solved

Accessing profileattributes within design

  • December 11, 2023
  • 1 reply
  • 921 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_
New Participant
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

New Participant
December 13, 2023

Tried this, but gave me the parse issue .

 

Rajneesh_Gautam_
Rajneesh_Gautam_Accepted solution
New Participant
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)")]