Get Skills & Proficiency for each user in Queue

We are setting up preferred agent groups and want to look at a subset of skills the agent has in order to set the score for the agent.
We are using the queue members API, to find users in that queue with the skills needed for the call.
/api/v2/routing/queues/${input.queueId}/members?pageNumber=1&pageSize=100&skills=${input.skills}

I can return the list of members without issue but having trouble with the nested array of skills. I know data actions have issues with nested arrays so I am trying to figure out how to associate the user id with a skill & proficiency. I also know we can't use input contract variables in the success template for me to pull the specific skills.

From the example below I am trying to get a list that has the userid associated with the skill & proficiency so that I can look at my subset of skills in architect and assign the score. I tried pulling back each in an array but since the number of skills per user couldn't get them to work using indexes.

1234,Primary,5
1234,Secondary,3
5678,Primary,5
5678,Secondary,5
5678,North,5

{
      "entities": [
        {
          "id": "1234",
          "name": "Patti",
            "skills": [
              {
                "id": "BKKO8",
                "name": "Primary",
                "proficiency": 5},
              {
                "id": "A227",
                "name": "Secondary",
                "proficiency": 3          }
            ]
          }
        ,
        {
          "id": "5678",
          "name": "Scott",
            "skills": [
              {
                "id": "BKKO8",
                "name": "Primary",
                "proficiency": 5},
              {
                "id": "A227",
                "name": "Secondary",
                "proficiency": 5
              },
              {
                "id": "IJOIJ9",
                "name": "North",
                "proficiency": 5}
            ]
          }     
      ]
    }

I know I can take the list of users and call another API for each user for the skil/proficiency, but I am trying to avoid a separate API call for each user as this is happening on all queue calls, so I don't want to hit the API limit per minute just getting skill proficiencies.
Thanks

Hi Patti,

Unfortunately I don't have a great solution to this right now. The immediate solution that I would suggest is to wrap up all of this logic in a lambda and call it via a Lambda Data Action. Then you can have a single call to the Genesys Cloud endpoint, and do all of your calculations in one place instead of convoluted Data Action and Architect configurations.

I am going to bring up with my team the possibility of allowing the "foreach" capability of velocity, which would probably make it possible to do what you want, but isn't something that would be released for a while.

--Jason

Thanks Jason. I do think the foreach would be nice long term as it could help more with nested arrays. Appreciate the update. - Patti