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
BedrockMission!

Learn More

View all

Sign in to view all badges

Looping through Transactional message

Avatar

Avatar
Validate 1
Level 1
supratim1034
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
supratim1034
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
supratim1034
Level 1

02-07-2020

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?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
ramon_bisswange
Employee

Likes

242 likes

Total Posts

353 posts

Correct Reply

182 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile

Avatar
Give Back 5
Employee
ramon_bisswange
Employee

Likes

242 likes

Total Posts

353 posts

Correct Reply

182 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile
ramon_bisswange
Employee

02-07-2020

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

Answers (0)