Expand my Community achievements bar.

Dynamically retrieving all Camaign personalised variables in AEM?

Avatar

Level 8

Hi,

We have a custom component in AEM that helps us select content blocks based on the personalised variables in Campaign.

For now we have hard coded the Camaign variables in the AEM template like shown in the code snippet below. 

How can we programatically retrieve in AEM all the possible Campaign personalised variables (ex. recipient.localization.city, recipient.location.stateCode, recipient.age etc) ? 

 

 

anasustic_1-1742226399902.png

 

 

 

<!--/* ACC Conditional Content Syntax https://experienceleague.adobe.com/en/docs/campaign-classic/using/sending-messages/personalizing-deliveries/conditional-content */-->
<% if (recipient.gender == ${model.gender} ) {
%>
<table data-sly-unwrap="${!wcmmode.edit}" class="author-component-wrapper">
<sly data-sly-test="${model.defined}">
<sly data-sly-list.item="${model.children}">
<sly data-sly-test="${!allowed.applicable}"
data-sly-resource="${item.path @ resourceType=item.resourceType, decoration='false'}"></sly>
</sly>
</sly>
</table>
<% }
else {
%>
<table data-sly-unwrap="${!wcmmode.edit}" class="author-component-wrapper">
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0" width="100%" height="0"
style="border-collapse: collapse; border: 0; border-spacing: 0; margin: 0; table-layout: fixed; overflow: hidden;">
<tr>
<td style="font-size: 0; line-height: 0; overflow: hidden;">
<p>Default Content</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<% } %>
0 Replies