Weirdbeard65 | 2023-09-28 13:36:53 UTC | #1
I have a need to search across all Participants for some Participant Data Attributes. (Long story, which I won't bore you with here!) The built-in Get and Set operations only access the "current" Participant, so I'm looking at using a Data Action to access /api/v2/conversations/<conversation ID> to get the Array of Participants and then iterate over it to look for the required Attributes. I could use some help with crafting this, though! I assume that I can have the Data Action return the Array, but how do I then search it? I hope my question makes some sense. TIA!
Weirdbeard65 | 2023-10-09 17:07:16 UTC | #2
OK, for anyone else who stumbles across this, here is the fix: Use the Data Action I mentioned, but in the translationMap, you can configure it to grab an array of a particular Attribute from all Participants, like this: "$.participants[*].attributes.<attribute name>" In your Output Contract, you need to specify a String Array for this. Then, in Architect, you get the array and test the Count of it to verify if a value was returned at all. (In my case, there is only ever a maximum of one.) The end result is getting a Participant Data value regardless of Participant. Many thanks to @Craig_Stevenson for putting me on the right path!
system | 2023-11-09 17:08:01 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 22275