DetectIntent API lacks Transition Details

Hello,

I am using the Dialogflow CX API and specifically the DetectIntent API and it is working quite well for us. However, the one thing I am noticing is that the response does not include the corresponding Flow or Page that the matched intent would trigger. The response seemingly includes everything else (e.g. fulfillment details, parameters, etc) but not the Transition details. Is there a reason that is not included in the response?

Thanks!

Hi, the information should be in the response under the QueryResult object: https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/QueryResult

Hello @xavidop , let me clarify.. I know what is in the QueryResult, which is why I am asking the question and trying to understand why the Transition details are not included in the QueryResult. The QueryResult object literally contains just about every possible detail related to the detected intent, which means it has all the information to also derive what the resulting transition flow/page should be, but unfortunately, it is not included in the QueryResult.

well, first of all, I am trying to help you. I do not work at Google and I am trying to provide information.

With that being said, when you call the detectIntent you are actually doing the transition. If you want to check where are you going to go, probably you will need to call the matchIntent method instead that does not do the transition and gives you the info

Hello @xavidop , my previous reply was written poorly as I did not intend to imply in any way frustration, your help is always appreciated! I will dig deeper into the APIs per your suggestion to see how else I can get at those details.

awesome! please let me know how that goes!

1 Like

Hello @xavidop ,

So quick update to the above, the DetectIntent API does in fact return the transition details, but I seem to not be getting them back consistently. In the QueryResult, there is the diagnosticInfo object which contains the Execution Sequence via a State Machine. What is interesting is that earlier today, I was only getting back 3 Steps in the State Machine, which ended at the Route Group where the Intent was detected. However, when I now make the same API call, I am getting back 4 Steps and the last one is the transitioned to Flow and Page! I will go back and see if something changed on our end to explain the changed behavior I am seeing, but at least I now know where those details are.

that could be because sometimes a transition is not triggered. You can stay in the same page after a detectIntent. that is my guess

1 Like