(Autogenerated transcript)
[00:00:00]
All right, so let's get started. The first thing we are going to do is delete these, and we are going to start the flow where you can say that the user will trigger the welcome intent. And the bot is going to say, may I have your name, please? All right, so now the next possible options we have will be the user is going to say, my name is Alex, and the bot has to say, pleasure to meet you, Alex and your last name. Or the user might say, let's just copy from this. Let's just copy from this. Say my last name is Alex, and then the bot would say,
[00:01:00]
can I have your first name, please? And then the user could also say, my full name is Alex Gonzalez, at which point the bot should say, thank you for providing your full name. What's the best phone number to reach? So the next thing it's going to do is, it's going to ask for phone numbers. So we'll have something like this,
[00:02:00]
await underscore phone underscore number, as you know. So the thing is, as we are designing the flow over here, what we should first do is we will add the names of these intents. So here the user is providing their first name, and let's make it bold. And I also usually like to provide color for the title, just so that we can distinguish it easily. And in this case, the user provides last name. And in the same way, let's provide it the color. And finally, this is the case where they are providing the full name. And we have this color.
[00:03:00]
So notice one thing as I go through this, by using this flow charting technique that I have explained in my material, you can see that it's actually very easy to go from just looking at the different ways the user might say certain things, and the specific, the way the bot should respond and all that, you'll be able to take that and write out those sample conversations, and just start designing your whole bot just based on that information. So that's the big strength of this, using this technique that I have described for creating these flow charts. Now you have all these, these are intents, as you know. So what I'm going to do is I'm going to make sure that I give them the right shape.
[00:04:00]
So these should be rectangles, and this is a context. So what I'm going to do is I'm going to shape this as an ellipse, right? So if they provide the first name, the next thing that you are going to do is you're going to await last name. And the thing is at this point, okay, we don't have the context defined here, which would actually make it a lot easier. So you might have something like this, await underscore name as the context at this step. And then we will make sure that we use the right shape. And remember that this has to be a child of this in the flow chart that is there. So this is exactly what we want, because we are at this point,
[00:05:00]
as soon as the user has triggered the welcome intent, what the bot is going to ask, may I have your name please? And then it's going to await the name, and then either the user could provide first name or last name or full name. And if they provide the first name, it's going to go to await last name. And at that point, the user might say something like this, my last name is Gonzalez. And remember that the bot has to effectively go back to this step, await full number. Okay, so what you will do then at this point is you will copy this. And it will say thank you for providing your last name. And then what's the best phone number to reach you. And one of the things that I mentioned is that you want to number these contexts
[00:06:00]
when you have to have these flows. So you will just say one. So this is like context number one. And then you'll just go to context one. So this is effectively saying that at this step, your output context is going to be await full number, which we have already declared over here. So what I do, the convention that I use is to just use a circle for this to indicate that it's a connector as a context. And then I'll use a rectangle because this is an intent. And here the intent should be provides last name after first. You can name it whatever you want, as long as you can make sense of the intent that you are describing. And this one, this is the context. So we are going to change the shape to ellipse. And you can imagine that the flow you will have over here will be very similar because here you will be similar because here you will be saying await first name.
[00:07:00]
And then user will say something like this, my first name is Alex. And the bot will say, thank you for providing your first name. What's the best phone number to reach? And then you have the same thing because it's going to go to that same context. And there you go. So this will be an ellipse too. And this would be a rectangle. So that's the basic idea. I haven't added the name of the intent for this one, provides.first name after last. All right, so this is the way you design this flow. And this flow chart explains like what is going on. If the user were to provide just their first name,
[00:08:00]
it will ask for the last name, await the last name. And then in the next step, assuming that they provide the last name properly, it is going to ask for the phone number and then point to this context. On the other hand, if they first give their last name alone, it will then ask for their first name, it will await their first name. And then assuming that they provide the first name properly, it's going to thank them and then it's going to ask for the phone number and then point back to this context over here. So that's the flow diagram for what we want here. And what I want you to notice is that if you were to imagine like this whole thing being a part of a flow, right, when this flow ends, you would have gotten both the first name and the last name, and then you would be waiting for the user's phone number and the context which would be active at that point in the conversation would be called await underscore phone underscore number.
[00:09:00]
So in our way, in our, I guess you can say that the end result that we are looking for in our case is we want both the first and last names to be collected and we want the await underscore phone underscore number to be set as the active context when we are finished with this particular flow. And in the next video, I'm going to show you how to actually do this in your Dialogflow console.