Retrieving id from profile.timeSeriesEvents.identityMap in AJO offer | Community
Skip to main content
Level 2
September 4, 2025
Solved

Retrieving id from profile.timeSeriesEvents.identityMap in AJO offer

  • September 4, 2025
  • 1 reply
  • 300 views

Hi everyone, 

 

I'm wondering if anyone had successfully retrieved Id from profile.timeSeriesEvents.identityMap in an AJO offer. 

I had no problem retrieving the id using this helper function. {%= head(get(profile.identityMap,"accountId")).id %}

However, when I use the same formula for profile.timeSeriesEvents.identityMap: 

{%= head(get(profile.timeSeriesEvents.identityMap,"accountId")) %}, it throws this error: 
Invalid syntax get applied to an array requires integer parameter - was: STRING., Object expression for "head" must be of type array. Was Map[STRING => OBJECT[]].. Error beginning at position: Line 5, Character 23
 
 

Appreciate any tips on this. 

Best answer by Mayank_Gandhi

yes there are certain limitations when using profile.timeSeriesEvents (and its fields, like identityMap). just thinking it may be due to limited support for iterating or calling deep-access helpers on collections/arrays within offers.  https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalization/functions/arrays-list

1 reply

Mayank_Gandhi
Adobe Employee
Adobe Employee
September 5, 2025

@frankxu3 profile.timeSeriesEvents is an array of event objects, each with its own identityMap. profile.timeSeriesEvents.identityMap means: "the array of identityMaps for each event"  so it’s actually an array of maps, not a map by itself.

try this:

  • select the first event, then access its identityMap:
    {%= head(get(head(profile.timeSeriesEvents).identityMap, "accountId")).id %}
    
    • head(profile.timeSeriesEvents) — gets the first event object
    • .identityMap — gets that event's identityMap
    • get(..., "accountId") — gets the array for "accountId", e.g. [{"id":"xxx"}]
    • head(...).id — gets the first id

FrankXu3Author
Level 2
September 5, 2025

Hey Mayank. Thanks for the response. I've tried that already and it would return false. 

In the offer, if I use head(profile.timeSeriesEvents.identityMap), I'd get false as well. but if I just put {{profile.timeSeriesEvents.identityMap}}, it would return the whole identitymap object. I am wondering if it's because timeseriesevents is not fully supported in the offer yet.

Mayank_Gandhi
Adobe Employee
Mayank_GandhiAdobe EmployeeAccepted solution
Adobe Employee
September 5, 2025

yes there are certain limitations when using profile.timeSeriesEvents (and its fields, like identityMap). just thinking it may be due to limited support for iterating or calling deep-access helpers on collections/arrays within offers.  https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalization/functions/arrays-list