Hey folks,
Running into a weird error in a CXone Studio snippet. I’m trying to hit an internal microservice to validate a customer’s account status before routing the call. The flow is simple: grab the phone number, make a GET request, and check the JSON response.
But every time the snippet runs, it bombs out with INVALID_FUNCTION. It’s driving me nuts because the syntax looks right based on the docs.
Here’s the snippet code:
ASSIGN rest = GetRESTProxy()
ASSIGN url = "https://internal-api.example.com/v1/status/" + Customer.PhoneNumber
ASSIGN response = rest.Get(url)
The error log just says:
ERROR: INVALID_FUNCTION: GetRESTProxy is not a valid function in this context.
I’ve checked the permissions on the API endpoint, and I can hit it fine from Postman with the same headers. Is there a specific scope or configuration I’m missing in the Studio environment? Or is GetRESTProxy deprecated for some reason?
Any help would be appreciated.