Bot Connector: Accessing Google Dialogflow Intent Confidence Scores in Architect

I’m a junior dev working on our first Genesys Cloud + Google Dialogflow ES integration using the Bot Connector. I can successfully map intents and slots, but I’m struggling with ‘Low Confidence’ scenarios.

I want to see the actual confidence score (the 0.0 to 1.0 value) that Dialogflow returns for an intent so I can build a ‘Did you mean X?’ confirmation loop in Architect if the score is below 0.6. However, the ‘Bot Flow’ variables only seem to show the intent name. Is there a built-in variable that holds the confidence score, or do I need to pass it back as a custom ‘Session Entity’ from Dialogflow?

The Bot Connector doesn’t automatically map the confidence score into a standard Architect variable. You’re on the right track with the custom mapping! In Dialogflow, you should include the confidence score in the payload object of your fulfillment response. Then, in the Bot Connector configuration within Genesys Cloud, you can map that specific JSON path to an output variable that Architect can read.

Actually, if you’re using the ‘Dialogflow CX’ or ‘ES’ native integration (not just a generic Bot Connector), there’s a hidden variable called Bot.IntentConfidence that becomes available in the ‘Call Bot’ block.

Since you’re using the generic ‘Bot Connector’, you’ll have to do what Luc said. Just be careful with your types—ensure the variable in Architect is a ‘Decimal’ and not a ‘String’, or the comparison logic (< 0.6) will throw a runtime error and dump the caller to the failure path!