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

Looping through Transactional message

supratim1034
Level 2
Level 2

Hi All,

I am using ACS RT transactional message. I have created a collection in the event object. My json of the event looks as following:

{
    "email""a@gmail.com",
    "ctx": {
"ratePlans": [
            {
                "ratePlanCode""string127 #1",
                "taxInclusive"true,
                "startDt""2020-07-02",
                "startDateYYYYMMDD""string127 #1"
            },
            {
                "ratePlanCode""string127 #2",
                "taxInclusive"true,
                "startDt""2020-07-02",
                "startDateYYYYMMDD""string127 #5"
            }
        ]
I am trying to find how to get the array length for looping through the values. context.rtEvent.ctx.ratePans.length is not working. I tried for for each loop, even that is failing and this being an ACS, I cannot see how the final ctx data is getting stored in the table - any thoughts?
1 Accepted Solution
ramon_bisswanger
Correct answer by
Employee
Employee

If you want to do a loop, the official way is to use the Product Listings feature:

https://docs.adobe.com/content/help/en/campaign-standard-learn/tutorials/designing-content/product-l...

 

JavaScript for parsing etc. is not supported in ACS

View solution in original post

0 Replies
ramon_bisswanger
Correct answer by
Employee
Employee

If you want to do a loop, the official way is to use the Product Listings feature:

https://docs.adobe.com/content/help/en/campaign-standard-learn/tutorials/designing-content/product-l...

 

JavaScript for parsing etc. is not supported in ACS

View solution in original post

supratim1034
Level 2
Level 2
I am using this looping inside a content block. Content block supports such basic building blocks and b
ramon_bisswanger
Employee
Employee
yes, content block can do it but it's not officially documented so product support won't help you on any issues.
supratim1034
Level 2
Level 2
I think then this is a very serious problem. I agree that the email content palatte is now a very robust and very much akin to the AEM kind of content builder. But in multiple cases, the email will be built by another tool (outisde of Campaign) and campaign is used mostly for delivery and segmentaition purpose. So not giving developer enough flexibility is an issue!!
fabiosurini
Level 1
Level 1
We have the same issue: we move looping in content block, but it is no working. We are not sure that the standard product listing covers all our needs. This is quite disappointing and is giving us a lot of troubles with our customer.