Could use a hand troubleshooting this persistent INVALID_FUNCTION error in a CXone Studio Snippet. I am attempting to fetch customer data from a custom external API using the GetRESTProxy object. The snippet compiles without syntax errors in the editor, but fails at runtime during the call phase. Here is the relevant code block:
ASSIGN httpProxy = GetRESTProxy("GET", "https://api.example.com/v1/users/" + customer_id, "application/json", "")
ASSIGN response = httpProxy.Send()
IF response.Status != 200 THEN
ASSIGN error_msg = "HTTP Error: " + response.Status
ELSE
ASSIGN data = response.Body
END IF
The error log specifically points to the GetRESTProxy initialization line, stating the function is invalid. I have verified the URL is reachable and the method is correct. I am not passing headers in this test to isolate the issue, but the fourth parameter is empty string as per documentation for no headers. I have tried varying the content type and even hardcoding the URL, but the result is identical. The environment is set to production. I am wondering if there is a specific syntax requirement for the empty header parameter or if the object instantiation requires a different namespace or prefix in the current Studio version. I am used to Terraform strictness, so I assume there is a rigid syntax rule I am missing here.
I have checked the CXone developer documentation for GetRESTProxy, but the examples are sparse. The documentation suggests the signature is GetRESTProxy(method, url, contentType, headers). I am using the standard application/json content type. Is there a known issue with the Send() method or the object creation itself? I am looking for the exact correct syntax to instantiate this object without triggering the runtime error. Any working snippet example or clarification on the parameter types would be appreciated. I need to move past this blocker to implement the data retrieval logic in the flow. The rest of the flow works fine, so this is isolated to the REST call mechanism.