- [Jon] If you want to extend your bot further, let's see how I can integrate different channels with my Lex bot. This is done using the Lambda function in the session attributes. I'm inviting you to explore the code to see how this was done, if you have the time and if you want to read some Python code. Now that I have a bot that is fully tested, I can publish it and show you the Channels tab. On top of easily integrating Lex into web UI, like you will do in the next exercise, or in your mobile application via the AWS mobile SDK, you can integrate your bot with Facebook Messenger, Kik, Slack, and Twilio SMS. Let's see how to do that with Facebook Messenger. First, we need a name. I'll input ServerlessChatBot. Then, I need to fill which alias I want to associate to my Facebook page. Ill use prod, that we've created before. Then, I need to select which Key Management Service key I want to use to encrypt all of the data that I will use below. I'm going to leave it as aws/lex. I need to input a verify token that I will use, reuse it in fact, on the Facebook developer portal. I'm going to use the verysecuretoken. It's a very secure token. For the other two parameters, I need to go on Facebook to get those. First, I will create a Facebook page. I hit the Create button and select Page. I will use Community or Public Figure by clicking the Get Started button. My page is going to be called Serverlesschatbot and then the category is going to be Just For Fun. Then, I will click Continue. I'll skip the next two steps out here because I don't really need that here. Now that I have a page, I will need to jump over to the developer portal of Facebook, a little bit different website. In here, where I'm already logged in, I'll create a brand new application by clicking on the My Apps menu at the top, and clicking Add New App. For the Display Name, I'm going to use Serverlesschatbot. They don't need to match, but it's all right, and I'm going to make them match. I'll click Create App ID. I'll confirm that I am not a robot, and I'll click Submit. Going under the Settings, under Basic, I am going to find my App Secret. I'll need to click that Show button right here to display it. I'll take this App Secret, go back to Amazon Lex, and enter it as my App Secret input here. Next, I'll go back to my developer portal in Facebook. I will go under the Products page, and I will add Messenger, and I'll set up Messenger here. I will go under the Token Generation, and I'll select the Facebook page I created called Serverlesschatbot. I'll continue as myself. Now, this gives me a page access token that I'll copy and paste back onto my Lex console. I now have all of the data that I need to create my channel in Lex, so let's activate it. I will get an Endpoint URL. I will copy this Endpoint URL, that I'll then use a little bit later. So, still under the developer portal, under the setting of Messenger, I'll go under Webhooks. I'll click the Setup Webhooks button, where I will input this Endpoint URL that I have just copied from the Lex endpoint. Then, I need my Verify Token. If you remember, that was the verysecuretoken. Then I need to specify Subscription Fields - those are messages, messaging_postbacks, and messaging_optins. I'll click Verify and Save. And it seems like it worked. The next step is to subscribe, under my Webhooks, subscribe my Serverlesschatbot page to this application that I have right here. So now that it's subscribed, it's time to test the chatbot via Facebook Messenger. In my Facebook page, I will add a button, by clicking the Add button. I'll select Contact you, send the message, click Next, select Messenger, and hit Finish. Now, this Send Message button allows us to send a message to the chatbot. I'll test it out, so putting my cursor on top of Send Message and clicking the Test Button. My chatbot is now available via my Facebook page. So let's do a quick chat, book a hotel. What city will you be staying in? Oh, that sounds familiar. It looks like I'm interacting, from Facebook this time, all the way back to our bot. Exactly, that's how channels work. It's an integration between a few different components - Facebook, Twilio SMS, Kik, and Slack - towards your bot. Soon, you'll put to use everything you have learned about Lex, into an exercise. Thanks for watching.