Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

use fragment to loop data within a workflow and create dynamic email content

juliusg73170081
Level 2
Level 2

Hi,


I am trying to personnalize an email with data coming from enrichment activity (additional data) but all values are undefined.


I have created two queries :


a query fetching one specific user (me)

a query fetching all user who have received a delivery the day before today.


I have enriched my profil with the unique deliveries from the second query in an enrichment box. I have created a collection of 10 in that enrichment.


I would like to create a loop in order to display the collection in email delivery with a fragment by fetching this collection and displaying it as long as it it true.


My fragment look like :

<table>
<%
for each(query in context.targetData){
%>
<tr>
<td><%= query.query1 %></td>
</tr>
<%
}
%>
</table>


All values are undefined.


Please advise on how to proceed in order to fetch additionnal data in delivery in ACS Standard.


Julius

1 Accepted Solution
Venu_Reddy
Correct answer by
Community Advisor
Community Advisor

Hi @juliusg73170081 ,

 

Create content block and initialize the attributes with a variable and call it in the email delivery.

 

Regards,

Venu

 

 

View solution in original post

2 Replies
Venu_Reddy
Correct answer by
Community Advisor
Community Advisor

Hi @juliusg73170081 ,

 

Create content block and initialize the attributes with a variable and call it in the email delivery.

 

Regards,

Venu

 

 

View solution in original post

Sukrity_Wadhwa
Employee
Employee

Hi @juliusg73170081,

Were you able to resolve this query or do you still need more help here? Do let us know.

Thanks!