Building Chatbots with Amazon Lex and IBM Watson: Chapter 1 | Nicholas Ivanecky | Skillshare

Building Chatbots with Amazon Lex and IBM Watson: Chapter 1

Nicholas Ivanecky, Teaching Techustler Courses

Building Chatbots with Amazon Lex and IBM Watson: Chapter 1

Nicholas Ivanecky, Teaching Techustler Courses

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
16 Lessons (52m)
    • 1. 0 Introduction to Lex

    • 2. 1 Lex Architecture

    • 3. 2 Lex Practice Question#1(Volume off)

    • 4. 3 Project#1 Intro

    • 5. 4 Project#1 AWS setup

    • 6. 5 Project#1 AWS Lex Interface

    • 7. 6 Project#1 Create our intent

    • 8. 7 Project#1 Create Slot Types

    • 9. 8 Project#1 Setup Slots and Utterances

    • 10. 9 Project#1 Error Handling

    • 11. 10 Project#1 Testing

    • 12. 11 Project#1 Twilio Intro Setup

    • 13. 12 Project#1 Twilio Webhook Created in Lex

    • 14. 13 Project#1 Create a Message Service Twilio

    • 15. 14 Project#1 Twilio Texting Test

    • 16. 15 Project#1 Practice Question#2

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Update: Join over 9,600 students in the Techustler Course Series. You don’t want to miss this opportunity in learning practical knowledge in Tech.

Have you ever wondered how chat bots are made?

Why are chat bots the next big trend?

How can I build chat bots that are cool?

If you ever wanted to understand the space of Bots or build them yourself, then take my course "Building Chatbots with Amazon Lex and AI with IBM Watson". I designed it in a practical way so that when you finish the content you can immediately put it into use. 

Now, why should you build bots?

Bots are the next big trend according to media journals, silicon valley companies, and web developers. The barrier of entry to build a bot is low enough, but the amount of traction you can get is enormous. This is why startups like Slack have built a billion dollar business around it. Now, we are in the early stages of this trend and in order to stay ahead you must learn a thing or two about bots. More importantly, how to build bots which I teach in this course.

This course contains over 40 lectures and 3 hrs of content. It's designed for beginners to play with new platforms in the bot space. You’ll learn the tools needed to build the bots, how the inner workings of bots, how to map a user conversation, and market your bot to your friends.

Course Structure

The course follows a familiar structure where in each video I will teach the concepts followed by the student applying the concepts practically. If your goal is to become a better developer, you should understand node.js, server side development and how to access certain APIs to build better bots. The course does not go deep into API integration of bot responses. This means we won't be building complex models, AI driven bots, or multiple API driven bots. That would be for an expert course. 

Environment Setup

This course aims to simulate a live in-person course as much as possible. After you finish each lecture, you should practice and try the solution on your own. You learn the best by practicing and doing. 


At the end of each section, you will be asked to complete a bot which you can then share with your network or on the Skillshare network. 

Testimonials from other Techustler Courses and the Instructor

“Great set of videos Nick! I really liked the format of the videos with you in the corner of the screen showing us how to use the website. Cool songs you use at the beginning of each video. It really gives off the vibe that your course is hip and up-to-date with modern times. You do a great job of keeping of with the times. Stay modern, but classy at the same time Nick!” - Penelope

“The course is amazing so far. I didn't know you could do so much with Slack. I can't wait to build the on-boarding site and start bringing users into my community. I highly recommend this course.” - John

"He is a crafty problem solver, coming up with clever solutions to solve problems on schedule. When we worked together on a project, he quickly came up with and implemented UI solutions for the app to finish on time." - Doug

"Nick is highly focused and is the type of person who puts in the time and effort to solve a problem while not sacrificing quality. His attention to detail led to his design of a creative and great looking app." - Christine

"Nick's great at guerrilla customer development, he knows how to analyze data and make strong connections to the market. He understands the user flow when solving their problems." - Taso

"It was a highly positive experience working alongside Nick at DigaBlue and with the work ethic he has, I am certain that he will produce great results in his future endeavors." - Saif

"Nick is an aspiring tech entrepreneur with what I would consider a strong passion and desire to learn more and excel in the evolving digital age. He is an experienced programmer with a track record of creating both his own website and various mechanical devices." - Elliot

"Nick taught me so much, and invested a good amount of time being my mentor--teaching me to become a better non-technical leader." - Rohan

What is the target audience?

This course is designed for people with little or no experience with chat bot making and who want to build the next cool product. By the end of the course, you’ll have valuable skills that will help you be creative and resourceful in your pursuit of building products (hopefully in the bot space :)

Next Steps

Now it's time to become a Techustler and join me in registering for the course. I can’t wait to have you on board!

Meet Your Teacher

Teacher Profile Image

Nicholas Ivanecky

Teaching Techustler Courses


Update: Join over 7,300 students in the Techustler Course Series(Udemy and Skillshare). You don't want to miss this opportunity in learning practical knowledge in Tech.

I'm a product manager with 3 years of experience in both web and mobile products. I have worked on professional assistant mobile applications to local business advertising solutions on the web. Until recently, I led the product team for WeBeam, a professional networking tool focused on enhancing attendees's experiences at events. In this role, I managed the development of WeBeam from idea to live product. I created user flow diagrams and PRDs, collaborated with marketing to develop the user-interface and worked alongside engineers during development, QA, and user testing. Successes included growing pre-launch sign... See full profile

Related Skills

Technology Web Development

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Your creative journey starts here.

  • Unlimited access to every class
  • Supportive online creative community
  • Learn offline with Skillshare’s app

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.



1. 0 Introduction to Lex: So I hate the Cussler's. I'm so excited to be teaching you the next chapter in our course related to Chatbots. So we'll be playing with Amazon Lex, which is a great new development framework that they've created and also playing with IBM Watson. So without further ado, let's get started. So in terms of use cases, Amazon can do a lot of different things. So for one, it could be providing information. You can do applications on mobile. It can do enterprise you can do. I owe to. You can do a lot of different things, um, for it, for example, for information of bots that can be chatbots for regular they use. So if you need something booked or something, you know to quickly check up on news. Ah, but can do just that for you. In terms of mobile applications, Amazon allows very easy access to their mobile help. That's what they call it. And with this mobile hub, you're allowed to connect your android or IOS device directly to Amazon. Lex. So again, easy testing on the mobile device, which is pretty sweet in terms of enterprise applications. So we've seen Amazon Lex connected not only Facebook Messenger but slack Tulio and a few other bought services already. So being able to connect to Slack, which is a great enterprise tool, already is immensely powerful. And lastly, with Iowa's R. I O T bots, you can literally connect with your physical device that you let's say you've created or you've bought, let's say, in the store and be able to have ah, chat conversation with that device. So quite a bit of use cases, definitely something that you should be learning in this day and age. Since bots are quite popular right now, in terms of benefits, Lex offers quite a bit of benefits. Number one. It's easy to use. If you look at the interface, it's quite smooth. Learning curve doesn't take too long, which is great in terms of high quality Texan speech language understanding its top notch because again they've created Amazon Alexa, which was in the past two or three years. Right now, they've accumulated so much data from all the natural language processing that has occurred with regular users and people that bought the device so they have a good amount of data providing concrete answers in terms of the development environment itself. It's seamlessly deploying, and you can scale it very quickly. So when I want to test that, say something with Amazon Lex. It happens very quickly, which is sweet, Um, in terms of built in integration with AWS. Again, it's all part of the same hub, whether it's a W s lambda for creating those serverless functions or if it's a P I gateway that they have, or right now it selects a WS is very, very effective. And lastly, in terms of cost, it's quite cost effect or effective. So if we look at the pricing themselves, so here's Amazon pricing. So essentially it's gonna be 0.0 for sense per voice request, or 0.575 per text request. So if we have ah pricing example here, we have 4000 speech request at four cents. That's 4000 requests. It will be $16 which is not bad. 1000 texts. Requests will be 75 cents, so it's not too bad you can look at another example here. The bought sends 500 speech requests and 500 Texan month in December. Monthly charges for December will be $2.38. So again, quite low, very efficient That way and again, um, even free. For example, Um, if you get started with the names on Lex, they can process these 10,000 text requests and 5000 speech requests per month for free for the first year. So, really, you are saving a lot of money and you're barely not paying any. So that's why we decided to also go with that route. So in the next video, I'm gonna kind of explain the higher key on the architecture of Amazon Lex. And also then, after explaining the terminology needed to really understand how to program in it. So I see you in the next video. 2. 1 Lex Architecture: so hate their Cussler's welcome back. Let's continue learning about Amazon, Lex and what kind of tools it has to offer. So, as I was saying before, let's talk about the architecture. So here is a sample architectural layout of how Amazon, let's say, will process bank account statements, right? We're going to start off here and kind of make our way towards Amazon, I believe. Lex. Polly, what can happen in between in cognito Amazon is basically kind of verifying the user. We're not really going to deal with that in the course, but we will deal with this entire stretch here. So processing here or asking for, let's say, some type of response, Polly recognizing it, Lex doing something with it and processing it. This is any service side code that we have, which will also kind of go back and forth with Lex and then after respond back to the user . Um, these services here Amazon does happen, but we don't necessarily need them for this course. Same thing with the cloudwatch. So if a customer is calling for a bank account or wanting to know their bank account statement like this year, what's gonna happen is it's going to do some authentication to see if that's the correct user that needs the statement. So that's what this is. Then it's going to go and recognize the speech itself, and what's gonna happen here is you know it's gonna get the account information. However, in order to get that information and recognize it, it's going to send a request to Amazon Lambda. That's where there's probably an A P I connected to the bank account. Then the bank account will read that information from your account and give some authentication parameters. Saying that it is. You redirect back to Lex saying, You know, account has been retrieved. Polly will then say, you know, um, your account information is provided. Here you go, and here's your balance. So that's how it will kind of work. Lex will also kind of be more kind of figuring out what type of question you, uh, for example, uh, asked it. So if you just wanted to open our check your account balance, it could specifies that that savings or checking so again we're gonna ask for specificity. Let Lex will know exactly kind of what direction we need to go with or go in and then retrieve some type of account based on this response. So that, in a nutshell, is the hierarchy in terms of the bots structure itself. It's very similar to Amazon. Alexa. So if you took in my course before on Amazon Alexa kind of building for that voice activated device very similar to that in that we have intense utterances, slots and fulfillment the film, it might be a new thing. Um, but then everything else is kind of straightforward, and I'll explain the concept if you have not taken my class. So don't worry. In terms of mobile, though, Amazon Lex is very interesting on mobile because they have great integrations already to Android and also to IOS. Now, in this course, I don't believe we're gonna be integrating to Android or IOS. But that's further exercises for you to try out on your own once you finished the course, Um, in terms of examples, So I want to kind of go over a quick example regarding the coffee box. So if we actually zoom in a bit closer here pretending this is the speech and somebody saying you know, I like to order a small mocha. So what's happening here is that's what I guess user response is. What's gonna happen is it's going to start recognizing the speech and kind of dividing each word up into smaller bits. Then what's gonna happen is start organizing that terminology. So if we really specified, for example, certain slots to be type, size temperature and assigned those slots to MOCA small, large, medium or hot cold or mocha coffee, it's gonna start organizing it that way. Then, if we want a for example, so this is the natural language processing that's happening here. If we like to kind of asking for more clarification of small mocha, you know the Lambda function, which is again where most of the code will be located, you can say, you know, would you like a small mocha? Is that correct? And then we would specify Yes, yes, would be another response from the user coming in. So that's an utterance. And then it's gonna go back to that intense lot model validated here again. And once we've kind of have our parameters, it's gonna go toe a confirmation view and say you're mocha will be available soon. Then Polly will either announce it to you or just tell it to through text. So that, in essence, is a very simple, simplified version of the coffee box. Um, if you look at the interface, I wanted to kind of go over some of that. So this is the interface for Amazon, Lex. As you can see, we have intense. This is gonna be our editor view. There's a settings, channels, and monitoring. Monitoring is kind of saying how many people are using your about analytics related to that channels could also be used on. We will do it later, is connecting to different platforms like Facebook, like slack telegram and maybe a few others but editors where we're gonna be spending most of our time. So with Editor, this is a simple view of Lex. We have our intense slot types air handling, our utterances air here are slot types are here. And if we go a bit lower, which I'll show you when we start doing our first project, um, we see fulfillment. And again, fulfillment is any other code that we like to run based on a user's response will be run there. So now let's go over some key concepts before we get started with their project so intense . That's the first thing we want to do. And this is an example. Is performing an action in response to natural language user input? So we create one this way, and then you know we'll be able to do certain actions with it. As you can see, some built in intense include cancel intent. So if someone says the word cancel or types and cancel, it will end the chap so again it's gonna have performed some type of action. Next thing is utterances. So again, these could be spoken or type phrases that invoke your intent. So again, in this case year, we have high. Hello. Tell me about a movie. Tell me about a name. If a user said these specific commands, that means a response will be invoked and we can kind of guide. The user asked what we're going to say so again, anything that the user says, that's an utterance. Next, our slots. So slots are input data required to fulfill and intent. So as we can see here, um, this is just a little sampling, I guess, of slot types, but we have a slot type here we created. We have to and we assign it a name, right? So this could be summary. It can be details. It can be synopsis something else, right? Like it could be three different things. But we signed that word toe a particular slot. So that way we can recognize it very easily, and that's essentially what slots do on. And I think lastly is fulfillment. So this is gonna be a mechanism for your intent. So for women is down here and we're gonna sign it a lambda function. So this function here, movie PD a logic that's actually a program that we've created already within aws Lambda. And what's that? What's that? Or what's going to happen here is that if we wanted to run this fulfillment, it's going to run that code and give us an output. Okay, so that's what's happening here. And we allow that if there is nothing else that this bought, let's say is going to perform, we could just easily say goodbye message and then just have some text here that says thank you, and that's pretty much it for fulfillment. So hopefully these air, some simple concepts for you to understand in the next video. I'll just do a quick practice video with you so that will you understand the concepts and we can get going on our first project. 3. 2 Lex Practice Question#1(Volume off): So he took Cussler's Let's do some practice questions to kind of get you familiar with the interface. So this is basically our question itself. So what is the utterance in this case? The intent and the slot. Okay. So, essentially, here it is. Here's the interface. And I want you to kind of name May those key points, the intense, the slots and the utterances. Okay. And then posit video. And then in the next one, I'm going to explain what they are. Okay. Okay. So I'll see you then. Okay, so here's their answers. So intense are located here. So they are Book, car and book hotel slots are actually these guys here. Okay, So car type value is the room type values shoe brand shoot type, and they're organized down here in these areas. So that's what I highlight here and then in terms of utterances, sample responses that the user will say that is all located right here. Okay, So that is it for a little practice session, and hopefully you understand a bit more now. So let's continue with our first project on Amazon. Lex 4. 3 Project#1 Intro: so welcome back today, we'll start off with our subway bought. Okay? So, essentially, we're gonna be ordering subs different type of subs with different sauces, different ingredients on it. And I'm gonna show you how it does work and function through Amazon. Lex will be able to test out the baht after and then be able to also, I'm try out an integration with it as well. So essentially, this is a statement that the but can say so that we would say eso we would type in in our chat. But I would like to order a sub. Um, it should understand that we would like to order a seven. This is part of an intent, and therefore the response will be what kind of bread Then we would say Italian, and then we kind of go with the discussion and flow until we have our entire order complete . So that's what I'm gonna teach you. And explain to you just will be Maurin Trajectory. So we're going to really understand Amazon, Lex. So I'll see you in the next video 5. 4 Project#1 AWS setup: so hey there. Before we get started with Amazon, Lex, we do need to connect to our AWS account. So if you already have account like I do, just enter your email password and log in. If you don't have an account again, just say you are a new user and then you can kind of create your profile. Now Amazon will ask for your credit card information, but you will not be charged. I'm so just clarification there. And if you are new to Amazon Web services, you should get a free tier for about a year where most of their services air for free. So you shouldn't be charged unless it we let's say, start using the box on a massive scale, which in this course I don't think we will be doing so. It should be fine for you to put that credit card information inside. But once you have everything organized and you've already signed in and created, an account will need to sign in. And this is gonna be the main interface where you see all of AWS. Key things you should realize is that when you click on the top bar here, your region is gonna be very important, which is this year. So I'm in us East one. That's kind of where they store all of my code or report or whatever projects I do that's gonna be important for you, because later we're gonna need to kind of connect the dots and make sure that we are always developing within this region. Some of these programs I believe in Lambda can only work if you're in certain regions like us East one. Okay, um, there's multiple regions here, but us east. You want us east? North Virginia is where we can do lambda functions. So sometimes you need to be inside that state or inside that I mean heading over here to make sure we can apply it. Key thing here to understand is going to be Lex and Lambda. We may touch into Mobile Hub, but for the most part it will be Lex and Lambda. Okay, um, and then this is where we're gonna write are server side coat. This is where we're gonna kind of cheat. Teach. Um, what are but will do. OK, so in the next video, I'll explain the interface of legs. What's happening there? How to set one up and then we'll go from there. Continue making our subway ordering, but 6. 5 Project#1 AWS Lex Interface: They're so then that we have completed a little bit of a tutorial on Amazon AWS. Let's go to Lex. Okay, If you cannot find it, because again, I've already added a W s services here, and this is my recently searched, Um, what I would do is scroll down and we need to find Lex artificial intelligence and click on Lex. So that's one way of also finding it as well. Um, this is the main interface where you've created all your bots. So you have intense a lot types and but intense or all the ones that we've created these air, all the slot types of be created. If we would like to remove one, it's easy as that, um so just kind of, Ah, it shows everything basically. But if you want to create a baht, which is what we'd like to do, this is where we would go Now. What's nice about Amazon is that it actually gives out a way to customize your bod initially or try a sample one. And, you know, if we try sample one, it already creates kind of sample, text us to what is happening here and that we kind of understand clarity. So if we go to book a trip, for example? Okay, so book a hotel. That is going to be the intent. These air utterances. So these air spoken phrases by us. So I'd like to book a hotel Amazon. Lex will say Sure. What city? New York City. What date do you want to check in? And then some film It logic happens. So essentially, you know, it's kind of kind of training us are helping us understand. What about iss and giving us a little bit of a tutorial and also comes with a name as well , and it fills in the name and all these other responses here. But since we're doing a custom bought, we're gonna hit custom, and we're going to create our lex. But so let's focus on subway ordering, Okay. In terms of voice, there's quite a bit of voices to choose from. We're just gonna go simple and pick Joanna. Hello. My name is Joe. So Joanna, That's the voice there. If we want a type of sample sentence, we can do so to understand how she's gonna talk. Is that correct? So there you go. So the voices okay. In terms of session, time out will give it five minutes. It already gives us the user role. So a W s service road for led spots. So we'll leave that alone. And we have to also indicated this body is going to be subject to Children's online Privacy Act. So in our case, no, we do not need to worry about that. So that is it there. So we'll creator about So this is the lay up again. It likes to give us our tutorial again. So we really understand what's happening here. But we will create our intense here simply with an X or with this plus icon, or create one here. Adan slot types here focus on air handling here. Um, any settings or general information that we like to edit any channels we would like to hook up to? So again, some web hoax will be needed for this, and we'll kind of go over those steps as we move along in the course and then monitoring the different requests. Right. So, analytics essentially here. So if we go back here are intense page, um, air handling, air handling. This is something where if the response wasn't very clear to the user. You can easily just type in some sentence here. Like, can you repeat that or I didn't quite understand. And that way, it'll kind of very like randomize the air message and be able to inform the user input in the correct response or something that we can track. So that's interesting here, But again, this is the main interface right here. So let's now go back to which one is it? Slats intense. So? So what? Ordering. Okay, So in the next video, what we're gonna do is create our first intent and start creating some slots for how to order a sub. 7. 6 Project#1 Create our intent: Welcome back to Cussler's Let's create our intent today. So when we're here on the main page, we're gonna click on Create Intent. What's interesting is we can already use some existing ones or look at the custom ones we've already made and search for those ones. Or we can create our own new one. So typically, if we're gonna do an intent, we want to kind of create some type of almost like an action phrase, So get subway order. Okay, so that's gonna be that. And now that we have created our intent, you see that the rest of the interface has opened up. We'll have utterances right now. So these air sample responses from the user weaken do lamb, but Lambda initialization and validation. So it's kind of to validate the responses. We have slots right now here. So again, based on what the user will say, we can start, you know, deconstructing the sentence, confirmation prompts again and also having some type of fulfillment where we like to, let's say, access to certain AP I or get certain data from the Lambda function. We can easily do so here. So that's it. Therefore, the intent it's been created will focus on slots in the next video 8. 7 Project#1 Create Slot Types: So now that we have our intense built out and ready, let's focus on our slot types. So we're going to click this plus icon here and create our slot types. So what I'm gonna do is have some type of naming convention, so I'll call it Ah, subway, uh, bread type. So that'll be the convention will always start with. Subway will have some type of item here, whether it's bread sauce and then a type. OK, so this will specify. So we'll say Italian, and we'll keep everything in lower case Italian white, whole grain. Okay, so leave that alone and then we're gonna add this lot to this intent. There we go. So right away, we see Slot one is going to be a subway red type. Let's keep adding more intense so subway size type so the sides of the sub will focus on six inch 12 inch. Okay, so there's that subway, um, sauce south tonight. So that's focus on sauce sauce with the sub. Let's see if we can do tomato sauce, barbecue sauce. Um, ranch sauce. Okay, that So I got bread sauce size subway, uh, toppings and temperature toppings. Type, um, toppings. and this one will be So we'll say peppers. Because lettuce, um, mushrooms. That's it. There. Add it to the slot. And the last lot I'd like to focus on is the temperature. So subway, 10th type. Okay. And this will be, um, temperature of the sub on this one. We will do. Let's see, temperature of this sub. Um, it could be warm. It can be hot. It can be called. Okay, Perfect. So now that we have our intense, um, we're gonna what are our slut? We have our slot types. What I'd like to do in the next video is organized. Thes are set these up s so that way they can match our utterances. So, um, that'll be in the next video. And then we'll focus on Cem air handling and then get into some tests. So see you in the next video 9. 8 Project#1 Setup Slots and Utterances: So in this video we're going to focus on is setting up our slots and then adding some sample utterances so that we know exactly when a user says this particular phrase will be able to match it up with a certain slot type. Okay, so first off, we're gonna change these names because these names, they're gonna correspond to the utterances that we give up here. So this one will be called breads. This one will be called size, actually sizes. This one will be called sauce. This one will be toppings. This one will be temp temperature. Okay, so now that we've got those taking care of, another thing to note is I'll explain this layout and what each means. So with priority, we can actually kind of suggest where we would like certain things to appear. So if sauces is priority, so size is sauces, breads be one breads to move up. Then we can make breads the first priority, and again, with priorities. I'm going to explain it when we have utterances, why it's important. But it just gives ah hierarchy as to what needs to be read first or processed first. Okay, In terms of this required statement so required is going to be useful for props. Okay, So that means when we let's say, give, uh, for example, an utterance being I like Italian. Six in sub. It's going, Teoh prompt us after in this location here for Brad's being, you know, what type of bread And it would be Italian or if we're not. So, for example, if we're not specifying, uh the type of bread So if we're just saying six inch sub, we're going to go through the bread section here and it's gonna ask, you know what bread would you like? And it should be Italian. So is basically going to prompt the user and asking anything that is missing in terms of parameters. So if a user gave all of these as there parameters here in an utterance, then we don't necessarily need to do any prompts because we have all the value. Okay, so now that we have a slots all taking care of its focus on the problem so well, say what type of bread? Um what size, uh, sub. And we'll give some examples. Exit six inch or 12 inch. What type of bread? Italian. Um What sauce would you like? Okay, what? Top things. Okay, what sounds which you likes of the Soviet tomato. This one here would be, um let's just say peppers. Um, like, uh huh. So Okay, so these are prompts again. We'll leave them. As is, um maybe we'll make this also, uh, verified as well, because again, we do want thes two items. At least we want to know the bread we want under the size. So that's what we're gonna ask it to prompt that. So now, with utterances, this is where we're gonna ask. Or this is where regular user will ask the question. You know, can I get a Can I get? Uh, it's a 12 inch. Let's say 12 inches of on this one's gonna have to be sizes on that bread. Okay, We're gonna add it. And what it did now is color code size is based on this lot. Type on Brett's. Based on that, if we wanted to say, can I get ah, six inch, uh, Italian on no Italian hut? You can also do so as well. Okay. So that means if we specify, can I get a blank like blank? It'll know to configure these responses here. Right. Um, let's see if we can do I want, uh, brands, sizes, toppings and bread sizes. Toppings, sauces. Okay, so there you go. So we'll leave these utterances alone right now. Um, I think these air good to go. Also these air good to go. And in the next video, we'll talk about air handling and then do our first sample test, so I'll see you in the next video. 10. 9 Project#1 Error Handling: So now let's focus on Cem air handling. So we'll click on this tab, and we're gonna ask for some clarification responses as well as hang up responses. So if something that you know, Amazon doesn't understand, will say sorry. I, uh I didn't understand that. Can you repeat? Okay? Terms of a hanging, pray. Sorry. I could not understand. Goodbye. This just means it's going to stop the program. So we can also say goodbye. That's it there. So we'll save these. Okay, Okay. And now we'll go back to our intent. And what we'd like to do right now is save the intent and everything's good. And now let's actually go to our little test section here. Okay? So you'll notice that you can't actually test the box unless it has been built. Okay, so we'll have to build it. Well, that Amazon build the bought for us, and then we'll be able to test it out. So we'll give it some time. And once we are ready, will be able to type in these utterances and will be able to get some prompts as well. Let's start conversing with her Bob through him, son Lex. And what I like to do in this project is also integrate this pot into twilio. Twilio is, ah, SMS type service where you can essentially send text messages. Andi kind of automated, let's say work flows and businesses. But in our case, what I like to do is put the baht within twilio. So that way we can actually text the baht and order a sub that way. So I'll show you how to do that shortly. So now that the test but is ready to go because we have built the product now we just start typing. So if we type in the word hey, it's not gonna recognize that because we actually have not trained it to say that, right? So we don't we don't understand what it's going to do. However, if we say, can I get, uh, six inch subs on Italian and basically it hasn't found it. Now it organizes it based on the slot type. So we see breads is Italian sauces is no because nothing was selected sizes. Six inch temperatures, no toppings is no. That means it's working. Basically where, um, if we type in, can I get a sub again? We did not get anything because we didn't program that in there. However, it will say Sorry, didn't understand that. Can you repeat? That's part of our air handling. So you see, and what's interesting is the first time we dio it was actually the first response. So Amazon is clever enough to randomize thes clarification problems. Same thing with these hang up phrases. So it's more unique that weight and more natural. So that's one thing that's pretty cool. So now that we have this going, let's try one more example. And, uh, se can't I want, uh, Sei Tallinn again telling 12 inch that there. Tomato. There you go. So Italian, 12 inch No, now did not read toppings or sauce, Right? So what? What's going on here? So let's take a look deeper into these types, so it didn't read sauces or toppings. So you see tomato. That's tomato sauce. So we know that. What about toppings? Peppers? Right, so we have to specify that. So if I wanna say it again Italian. So time. 12 inch peppers, tomato. Now it picked it up. So I male Senate. That's about the end of this, too. But no, it has picked it up. So Italian bread, tomato sauce, 12 inch toppings, air peppers. I think the reason why did no work in this case is because we did not have the sub at the end of this utterance. So that's basically it for a test. But we know that it works. We can clear it and we can continue building it out. So what I'm gonna do in the next couple videos has kind of introduce you to twilio and we'll get going on that. 11. 10 Project#1 Testing: So welcome back, Tech. Cussler's last thing I wanted to do with this code before we get going with twilio, is this confirmation prompt? OK, so when I select this, this is going to confirm that whatever entries we have typed in, we're confirming that it is correct. So what we can do here is if I specify, can I get a six inch sub on Italian? I'm going to say, Are you Are you sure you I want, uh, so six inch sub on Italian. Okay. And then if the user says no, um, your order will not be placed. Okay, so that's save this intent and build it, and we'll test it out right now, and then we'll head off to twilio just taking what to build. Okay, there we go. So we'll say, Can I get, uh, six inch? Um, okay. And another thing I like to test out Is that the prompt? So because I said can I get a six inch sub? I did not finish the breads slot here. It's actually going to ask me to fill it out because we are missing that. So you see what type of bread Italian and I'm like? Sure. Okay, so I say Italian. It has this and this, which are both the required slots again that we would like to get. So we're good to go now? The confirmation prompt comes in. Are you sure you want a six inch sub on Italian? So 16 sub on a talent in the breads. And I'm like, Yes. And now it's ready for fulfillment for us to use this data and process it. So that's kind of where all the fun stuff happens in the Amazon land to function and the processing. So that pretty much ends this lesson here. And this was a good introduction to learning Amazon, Lex. So next video will up it up and create a new channel, which is the twilio channel. Where we can text are but for ordering subs. So I'll see you then. 12. 11 Project#1 Twilio Intro Setup: So now that we're starting our first, uh, essentially integration into twilio, we are going to need to create that account. So go to twilio dot com and click Sign up. Okay. It's gonna kind of go through the process with you, um, to creating an account. If you want, for example to actually send text messages, though, you will need to input some money. So I was able to put down $20 before, but again, it's not needed on Do. What happens is during this trial version, you're going to get like, a little message at the bottom of each text that it's and saying it's in. Try a moat so you can be in tri mode. It's OK, but if you are trying to build us for production or for larger scale, it's best just to pay. So I'm gonna log in to my account. So I already made my account type in password, and basically the key thing we're going to need is from the account summary. So your account s I D. And you're off token. Okay, so these two things they're gonna be keep because we do need to import those into for Amazon Lex to work. So in the next video, once we have all this information here, I'm going to integrate it into one of the channels. So that's in the next video. 13. 12 Project#1 Twilio Webhook Created in Lex: Okay, take Cussler. So now we're gonna go to our settings page, and we're gonna create our alias reason why to create this is so that it knows after which code to run when we do connected twilio. So I'm just gonna call it data, and I'm gonna connect the most latest version, and I'll click plus, Okay, so then that we have that alias should be down here, which is good. So let's create this tool essentially for us to integrate into Tulio. So we're going to use Beta. Our name will be subway for doing okay. Um, so our description will be texting subway orders. We are gonna be a ws lex here, and now we're gonna type in our authentication token. Okay, So I get that, okay, and we'll get the S I d. Okay, and we'll activate it. Okay, so now that's activated. We have somebody ordering. Here's our endpoint. U R l This your world is going to me needed after s. So that way we can start speaking with Amazon. Lex to Tulia. It's on the next video. Connect that within the Tulio console, and then we should be able to perform a test to see if we can get these messages working. So I'll see you then. 14. 13 Project#1 Create a Message Service Twilio: So now that we have our endpoint you are or a call back. You are, uh we're gonna copy this and go to our TWILIO council. So once we've logged in, I'd like you to go to programmable SMS, okay. And click on messaging services. And what we want to do is create a new messaging service. So we're gonna call it Subway ordering, but and our use case is going to be chap about two way interactive. So what? Create this service? And right now we want to configure it. Okay, so we want to do a belief it is inbound requests. Ums going to paste it in there. Actually, I think it's inbound. I think it's outbound, so it leave it in the callback. You Well, um, we should save it right now. Okay. So leave it alone. Um, we'll go back to messaging services, and we should have to. And when you got a phone number, So I'm just gonna go to our resume body. Okay, so this one here, we're actually going to configure it, so this link itself Well, actually, go right here, not in call back. Just a quick thing. Saved that and again When you do created Twitter account, you'll be able to access one full number. So that's what we're going to do with this body. Connect the phone number. So that way we can actually test it out. So we're gonna add an existing number. Okay. So bad. So we're gonna add it to that number. Okay. Excellent. Perfect. And now are ordering bots should be ready. Okay, so next video will do a test on the phone. And that way we'll see the bottom working in action. So I'll see you then. 15. 14 Project#1 Twilio Texting Test: Okay, So now that we've done our actual, um, integration to twilio as well as Amazon Lex, it's time to actually test out our service to see if it does what it does. So we're gonna goto our app right now, and I'm gonna go to my phone number. So again, twilio home is going to be this phone number here. So 256415 5937 So that matches that, which is good. So now we'll go to Lex, and we're gonna ask it a message, so I'm gonna text it. Hello? Okay, so it's gonna say sorry. Can you repeat that? So that's part of the air handling that happens. So it's definitely reading it, which is fantastic. Now, let's see if it can actually do in order for us. So can I get, um, 12 inch sub? Okay, so it was able to get 12 and seven, which is good. Got that slot. Now it's asking its what type of bread because it's required. So I'm gonna say Italian are white bread. Okay. And now it's gonna ask us this confirmation prompt. Are you sure you want a 12 inch sub on white and I will say no. So your order will not be placed. And there you have it. That's our bopped working with twilio and us being able to text it through Amazon. Lex, it's quite amazing. And I can't wait to build up more bots with you guys. So in the next video, we'll do a practice to make sure you understand how this works and will modify our current intent. So see you then. 16. 15 Project#1 Practice Question#2: Okay, so welcome back. We are gonna do a practice session now, so this may require some work, but after doing the first pot, I know you'll be just fine. So what I like it to do right now is credit burger ordering intent or burger Burger ordering. But so slot types, they're going to include buns, toppings and sauces. You're gonna have to create all of these new intense bots. There's only one intent, but you create a new bots and utterances and slots. Make sure you kind of look at the previous video to kind of see how we did it and then integrated within twilio so that you can text with it. So that way, you kind of simulate a burger ordering experience on your phone. So that's my challenge to you. It shouldn't be too complicated, but it's gonna be exciting. So that's it.