CXone Studio Snippet: Parsing nested JSON from GetRESTProxy response

We are implementing a lookup in a CXone Studio flow to fetch customer tier data from our internal CRM. The goal is to keep the logic contained within the Studio Snippet action rather than relying on external microservices.

We have configured the GetRESTProxy element to call https://api.internal.com/v1/customers/{id}. The HTTP status returns 200, and the raw response body looks correct in the debug logs:

{
 "status": "success",
 "data": {
 "tier": "platinum",
 "points": 4500
 }
}

However, when we attempt to extract the tier value using the ASSIGN element, the variable remains empty. We have tried using the syntax $response.data.tier and also $response['data']['tier'], but both result in null values.

Is there a specific way to handle nested objects in the Studio Snippet JSON parser? We suspect the root object might need to be unwrapped first, but the documentation is sparse on this behavior. Any examples of accessing nested properties would be helpful.

You’re missing the object path in the Snippet config. Set it to data.customer.tier instead of just data.