Expand my Community achievements bar.

Join us for the Adobe Journey Optimizer Community Q&A Coffee Break on 1st October at 8 am PT with Journey Optimizer experts Amarnath Vannarath, Ariel Sultan, Arthur Lacroix and Sandra Hausmann.
SOLVED

Looping through nested collections

Avatar

Level 7

Hi there,

 

We have a schema structure that looks like this:

(#{ExperiencePlatform.ABC.profile.tenantid.DDDOfferRecos.all(currentDataPackField.AA.AAOffers.ServiceAddress.offerCategory == "Fastfood").AA.customerID}

 

- DDDOffersRecos is an array

- ServiceAddress is also an array

 

I want to loop through all the arrays, and find the first object that has offerCategory == "Fastfood", and return the customerID at the AA object level. 

 

Is it possible to achieve this?

 

Thanks.

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee

You can take a look at the following example in the documentation https://experienceleague.adobe.com/en/docs/journey-optimizer/using/orchestrate-journeys/building-adv... 

#{ExperiencePlatform.ExperienceEventFieldGroup.experienceevent.all(currentDataPackField._aepgdcdevenablement2.purchase_event.receipt_nbr == "10-337-4016").
_aepgdcdevenablement2.purchase_event.productListItems. all(currentDataPackField.SKU == "AB17 1234 1775 19DT B4DR 8HDK 762").name}

 

As I don't have visibility to the actual schema, you can validate it on the following lines. 

 

#{ExperiencePlatform.ABC.profile.tenantid.DDDOfferRecos.all(<apply filters based on DDDOfferRecos object array attributes>).AA.AAOffers.ServiceAddress.all(<apply filters based on ServiceAddress object array attributes>).customerID}

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

You can take a look at the following example in the documentation https://experienceleague.adobe.com/en/docs/journey-optimizer/using/orchestrate-journeys/building-adv... 

#{ExperiencePlatform.ExperienceEventFieldGroup.experienceevent.all(currentDataPackField._aepgdcdevenablement2.purchase_event.receipt_nbr == "10-337-4016").
_aepgdcdevenablement2.purchase_event.productListItems. all(currentDataPackField.SKU == "AB17 1234 1775 19DT B4DR 8HDK 762").name}

 

As I don't have visibility to the actual schema, you can validate it on the following lines. 

 

#{ExperiencePlatform.ABC.profile.tenantid.DDDOfferRecos.all(<apply filters based on DDDOfferRecos object array attributes>).AA.AAOffers.ServiceAddress.all(<apply filters based on ServiceAddress object array attributes>).customerID}