Testing it in the simulator

Autogenerated YouTube transcript

[00:00]. Okay now 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. Okay now if I say add a quarter see it did two things if you notice the

[00:30] 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

[01:00] 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

[01:30]. 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

[02:00] 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 hello 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

[02:30] 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

[03:00] 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

[03:30] 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 intents 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

[04:00] 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

[04:30] 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

[05:00] 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 state transition because it also came with the it also provided the response which is you have entered state 25 so

[05:30] 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.

Transcript auto-formatted using ATF

Free: Dialogflow ES Crash course for non-programmers

I recently changed the name of my website from Mining Business Data to BotFlo. To help spread the word, and to hopefully get people to bookmark my website, I am making a set of my training courses free for a few weeks. 

Learn more
"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