Is it possible to inject W3C trace context headers directly into a CXone Studio Snippet using the GetRESTProxy function without triggering an INVALID_FUNCTION runtime error? I am attempting to correlate CXone IVR flows with Genesys Cloud backend services by propagating the traceparent header through an external REST call. My goal is to maintain distributed tracing integrity across the platform boundary. I have verified that the header values are correctly populated in the session variables, but the execution fails immediately upon invocation. The error log indicates that the function signature or the argument passing mechanism is malformed, specifically citing INVALID_FUNCTION during the ASSIGN step.
Here is the relevant snippet code that reproduces the issue. I am trying to pass the trace context as a custom header map. The traceparent variable contains a valid W3C trace string, and the targetUrl is a mock endpoint for testing. The error occurs on the GetRESTProxy line. I have tried both inline JSON construction and variable-based header assignment, but neither approach resolves the syntax error reported by the Studio engine.
ASSIGN traceHeader = {"traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"}
ASSIGN response = GetRESTProxy("GET", "https://example.com/api/v1/test", traceHeader, "")
I suspect the issue lies in how GetRESTProxy expects the headers object to be structured or serialized within the Snippet context. The documentation is sparse regarding complex object types as arguments. I need to know the correct syntax for passing a dictionary-like structure as headers in CXone Studio. Is there a specific JSON stringification step required before passing the headers object? I am running this in the US1 environment and need a reliable way to bridge the tracing context without resorting to complex workarounds.