Cognigy webhook payload missing intent score in CXone flow

Getting a 400 Bad Request when trying to map the Cognigy webhook response to a CXone variable. The flow hangs at the Set Variable action because the JSON path is returning null.

We are routing calls based on intent confidence. The webhook hits a CXone flow. In the Set Variable action, I’m using this expression:
$webhookResponse.body.data.intent.score

But the actual payload from Cognigy looks like this:

{
 "requestId": "1234",
 "data": {
 "intent": "billing_query",
 "confidence": 0.85
 }
}

The property is confidence, not score. Even after updating the expression to $webhookResponse.body.data.confidence, the flow still fails to parse the float. It seems to treat it as a string or fails validation entirely.

Tried wrapping it in parseFloat() in a but that throws a syntax error in the expression builder. How do I correctly map a decimal confidence score from a custom webhook payload to a CXone numeric variable for downstream routing?

The issue is likely nested depth or a null check missing in the expression. Cognigy often wraps the intent data inside a result object before data. If data is null, the expression fails silently in some contexts or throws a bad request if the target variable expects a float.

Try this path instead:

$webhookResponse.body.result.intent.score

If that doesn’t work, wrap it in a conditional to prevent the flow from breaking on empty responses:

if($webhookResponse.body.result.intent != null, $webhookResponse.body.result.intent.score, 0)

Also, check the Content-Type header on the webhook. CXone expects application/json. If Cognigy sends text/plain, the body parser might not deserialize it correctly, leading to null values in the variable mapping. Force the header in your Cognigy webhook settings.