Data Action REST Call: Mapping nested JSON to Architect variables

Building a Data Action to call our internal WFM API. The request works in Postman but Architect fails on the response mapping. The endpoint returns a nested JSON object. I’m trying to map the agent_status field inside the data array to an Architect variable. Here is the mapping JSON I’m using:

{
 "agent_status": "$.data[0].status"
}

The Data Action completes without error, but the variable remains null. The API returns a 200 OK. Does Architect support array index notation in the JSONPath mapping?

Might be a scope issue with the array index. Sometimes the parser drops the first element if the timing is off. Try removing the [0] and using the filter function instead. It’s more reliable for dynamic lists.

{
 "agent_status": "$.data[?(@.status)].status"
}