Let’s just click on this to test the agent in the simulator.
Let’s just start by saying hello so it just says hello how can I help you right.
And then I’m going to say what is my balance it says you haven’t added any money please begin by adding a quarter.
Now, if I say add a quarter see it did two things if you notice the first thing it did is that it actually responded with okay I added a quarter.
And then also see that it says you have entered state 25.
And the reason for that is because in the start state if you had to go to add a quarter you will notice that the intent already has a response coming back which is okay I added a quarter.
And then it does a transition to a new page that is a new state.
And [m1] if you notice in the new state called state 25 it has something called an entry dialog which actually says that you have entered state 25.
So that is why the response that you see here has two phrases okay I added a quarter.
And it also says you have entered state 25 so with just what you have seen till now you should be able to understand a few things the first is that the states that we see here the states that we see here or rather the pages that we see here sorry the pages that we see here represent states in your state diagram right that’s the first thing that you understand the other thing that you must notice is that when you are in this state you can the user is able to say a certain set of phrases.
And the bot is – you know – programmed to [m2] behave in a certain way but I hope that you also noticed one more thing so.
If I were to click on the Default Welcome Intent you can see that the user could say any number of welcome phrases like hi.
And all that.
And you can see that the fulfillment here says that – you know – how can I help you how can I assist.
And all that.
But notice that this is empty right.
So what happened here is that the user types a message right.
And the agent comes back with the response so we know that this intent was mapped but because it did not transition to a new page that is a new state it’s still going to be active for the other phrases which you have defined in the set of intent routes.
So I hope that you are clear about that because that part is I mean you need to understand that [m3] before you can move on to the – you know – the future videos because here’s the thing there’s a lot of things going on here really I would say that even though this part is very simple it’s still actually doing a lot of things it is simultaneously trying to understand which set of intents are actually candidates to fire at a given point in the conversation now in my if you notice in my the tips the tips for learning Dialogflow I the article that I pointed out before one of the first things that I will say there is you should understand how Dialogflow ES works.
And in es there is this concept that I defined called candidate intents now I came up with the term candidate intense I don’t know whether google calls it exactly the same thing but it the concept is quite similar it is that at any given point in the conversation [m4] not all intents that you have defined can fire there are only as a subset of all the intents that you have already created which are eligible to fire at the point in the conversation.
And that’s decided by a set of factors in Dialogflow ES it’s based on the context which is active at that point in the case of Dialogflow CX it is based on the actual state which is.
In fact, represented by a page in your CX agent right.
So the reason I’m saying all this is because you have to understand that as your as your user types something what response you get actually depends on which page is currently active that is which state is currently active okay we will be looking at this in quite a lot more detail later on when we talk about scope.
And stuff but for now this is an important thing to understand.
And that is also why [m5] when you clicked on I’m sorry when the user said add a quarter it not only came back with the fulfillment response saying okay I added a quarter but it actually – you know – it it affected the state transition.
And we know that it affected that straight transition because it also came with the it also provided the response which is you have entered state 25 so you saw that it did all of those things when the user said add a quarter into the start state so all these things you need to recognize as we are moving forward to the next video
<— End of article —>
This website contains affiliate links. See the disclosure page for more details.
Check out the Learn Dialogflow ES and Learn Dialogflow CX courses if you would like to learn Dialogflow in depth.
"The magic key I needed as a non-programmer" The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn. - Kathleen R Cofounder, gathrHealth