CXone Studio Snippet: Parsing JSON response from GetRESTProxy

Hey team,

I’m stuck on a Studio Snippet logic block. I need to pull some external data during an interaction and map it to a local variable. I’ve got the GetRESTProxy action set up, and the HTTP call itself seems fine. The response code is 200, and I can see the payload in the debug logs.

The issue is extracting the specific value I need. The JSON structure is nested, and I’m not sure how to reference it correctly in the ASSIGN action. I’ve tried a few variations, but the variable ends up empty or null.

Here is the JSON response I’m getting back:

{
 "data": {
 "customer": {
 "id": "12345",
 "tier": "gold"
 }
 }
}

I want to grab the tier value. My current snippet looks like this:

ASSIGN tier_level = GetRESTProxy.ResponseJson.data.customer.tier

But that throws a syntax error in the Studio editor. I’ve also tried:

ASSIGN tier_level = GetRESTProxy.ResponseJson['data']['customer']['tier']

No luck there either. The error message just says “Invalid expression syntax.” I’ve checked the CXone documentation, but it’s pretty light on examples for nested JSON parsing in Snippets.

I’m used to doing this in Python or JavaScript, where it’s straightforward. Studio feels a bit restrictive with its dot notation. Is there a specific way to handle nested objects here? Or do I need to flatten the JSON first using a different action?

I’ve got the GetRESTProxy action returning the full response body in ResponseJson. I just can’t figure out the correct path to drill down. Any help would be great. I’m on a deadline for this flow update.

Thanks.