Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Confusing Documentation in Dialogflow CX

Hello,

I am trying to understand the evaluation order of a parameter form filling of a particular page. According to the following piece of documentation it says that if no reprompt handler is defined in a parameter form filling then it will just repeat with the initial prompt that was used:

However, in the following piece of documentation it states this as the evaluation order for event handlers:

 

"3. Event handlers are evaluated in this order:

  1. Parameter-level: Event handlers applied to the current page's form parameter that the agent is currently attempting to fill (reprompt handlers), in the order supplied.
  2. Page-level: Event handlers applied to the current page, in the order supplied.
  3. Flow-level: Event handlers applied to the active flow, in the order supplied."

    Thus, it's stating that first the parameter-level event handler will be called, then the page-level, then the flow-level event handler defined in the start page. This is different from the documentation piece stated earlier that states that if no reprompt event handler is defined it will repeat itself. This documentation is saying that it will go back to page-level and then flow-level. Essentially, I am trying to use a flow-level event handler defined in the no-match-default event handler in the start page but when current form parameter is being filled it just repeats itself. Does anyone understand those two pieces of documentation?
0 6 1,343
6 REPLIES 6

Hi, 

The order of evaluation is what is it specified here: https://cloud.google.com/dialogflow/cx/docs/concept/handler#eval

If you are using data stores, this is the order of evaluation:

xavidop_0-1705915277160.png

 

Hello @xavidop,

As parameter form filling is not a "state handler" I am confused where the form filling is in the evaluation order: 

I have set up an example to display this. I have 3 pages of Start Page, Customer Start, and Continue. In the Customer Start I have a form parameter fill and prompt of "give me a number". Then I have a route that has a "true" condition that goes to a Continue page and says "I am continuing":
Here is the Customer Start Parameter Form Fill:

karlgardner_0-1705946171175.png

And here is the Continue page:

karlgardner_1-1705946233161.png

I am now testing it and it seems to just skip over the parameter form filling in the Customer Start page:

karlgardner_2-1705946300689.png

 

It seems like it evaluates all the routes before the parameter form filling? Also, in your diagram for the order of evaluation it says "Parameter input while form filling" happens first, however it seems like it's skipped in this case.

Karl

 

 

yeah, I think you are right, what I would suggest is to set the parameter to be required and do the transition if everything is fulfilled. Here is an example that I had:

xavidop_0-1705947726850.png

you can find that agent example here: https://github.com/xavidop/dialogflow-cx-webhook-pokedex

let me know if that helps!

Best,

Xavi

 

@xavidopI don't think I explained this properly sorry. I am restarting a new thread

I see what you mean.

You have to set the parameter to null when transitioning to re-trigger the parameter fulfilling:

xavidop_0-1705950040208.png

 

@xavidop Thanks! I put the full problem scenario that I am having in a different forum.