Data Action JSON mapping fails when Cognigy returns profile token

Building a flow where Architect calls a Cognigy endpoint to fetch a user profile token. The endpoint returns a valid JSON payload, but the Data Action fails to parse it into the output variables.

Payload looks like this:

{
 "profile": {
 "token": "abc123",
 "id": "user_99"
 }
}

I’ve mapped the output variable to $.profile.token in the JSON path. When I test the Data Action, it throws a generic parsing error.

The raw response from the REST call is correct. It seems like the Data Action engine is choking on the nested object structure or maybe the token format.

Tried flattening the JSON in the snippet before passing it to the Data Action, but that defeats the purpose of using the built-in parser.

Here’s the snippet code I’m using to call the REST proxy:

var proxy = GetRESTProxy();
proxy.setEndpoint("https://api.cognigy.ai/v1/users/profile");
proxy.addHeader("Authorization", "Bearer " + session.get("cognigyToken"));
proxy.execute();

var response = proxy.getResponse();
// trying to parse it here manually just to check
var parsed = JSON.parse(response.getBody());
session.set("testToken", parsed.profile.token);

The manual parse works fine in the snippet. The session variable testToken gets the value. But when I try to map $.profile.token directly in the Data Action configuration, it errors out.

Is there a known issue with nested objects in Data Action mappings? Or am I missing a config setting?