Dynamically retrieving all Camaign personalised variables in AEM? | Community
Skip to main content
Level 6
March 17, 2025
Question

Dynamically retrieving all Camaign personalised variables in AEM?

  • March 17, 2025
  • 0 replies
  • 245 views

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) ? 

 

 

 

 

 

<!--/* 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>
<% } %>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.