Encountering a persistent runtime failure in a CXone Studio snippet when attempting to parse a complex JSON response from an external REST API. The GetRESTProxy action executes successfully and returns a 200 OK status, but the subsequent ASSIGN block fails to extract the nested field, resulting in a null value downstream. The API endpoint is internal, and the response payload is confirmed valid via Postman. My snippet code is structured as follows:
Set REST_RESULT = GetRESTProxy("POST", "https://internal-api/v1/auth", {"user": "test", "pass": "123"}, "application/json")
Set TOKEN = REST_RESULT.response.body.access_token
The issue appears to be that response.body is treated as a raw string rather than a parsed object in the snippet context, causing the dot notation access_token to evaluate to null. I have verified that the response header Content-Type is application/json. Is there a specific parsing function or template syntax required in CXone Studio snippets to deserialize the JSON body before field extraction? I have tried wrapping the body in a ParseJSON helper, but that function does not exist in the current environment. Any guidance on handling JSON deserialization within the snippet’s GetRESTProxy context would be appreciated. Thanks.