Expand my Community achievements bar.

SOLVED

Is there any why to display Profile attributes in AT activities dynamically?

Avatar

Community Advisor

Hi Team,

 

  Is it possible to display the profile attribute values in AT Activity dynamically?

 

 Use case :

1. Activities will come from AEM 

2. Profles data will come from 3rd Party to AT

 

Use case to display profile attrubute value in activity dynamically.

 

Any ideas/advice would be great to solve the problem.

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Uma, you can get the value of profile attribute in the html like this :

 

console.log("Hello User, selected currency is : " +  "${profile.preferredCurrency}");

wherein preferredCurrency is the profile parameter.

 

get the value of profile script  in the html like this :

console.log("Hello User, selected currency is : " +  "${user.prCurrency}");

wherein prCurrency is the profile script.

 

View solution in original post

4 Replies

Avatar

Employee Advisor

@Umamaheswari_Yakkala  You should be able to access the profile script using beloa syntax unless you're looking for something else.

user.get<profilescriptname>

you can find an example here:

https://experienceleague.adobe.com/docs/target/using/implement-target/before-implement/methods/scrip...

Avatar

Community Advisor

Hi shelly-goel, 

 

I am looking for how can I use this profile info in content to display infor dynamically. 

 

Lets say.. like to display thier Last name in offer and that is coming from 3rd party system to Adobe Target. 

 

How can we display that profiles attribute value in offers? Is there way.

 

Thanks

 

Avatar

Correct answer by
Community Advisor

Hi Uma, you can get the value of profile attribute in the html like this :

 

console.log("Hello User, selected currency is : " +  "${profile.preferredCurrency}");

wherein preferredCurrency is the profile parameter.

 

get the value of profile script  in the html like this :

console.log("Hello User, selected currency is : " +  "${user.prCurrency}");

wherein prCurrency is the profile script.

 

Avatar

Community Advisor

Hi LordOfTheRings, its working like charm. Thank you so much.

 

we are planning to use this attribute in AEM content to display vallue dynamically  "${profile.preferredCurrency}");. 

 

How can display this value more gracefully like if there is no value in this ttaribute I would like to show default value from content. 

 

Any sugesstions/ideas how to handle that.

 

Thank You

Uma