So, you’re a developer interested in exploring the world of conversational AI? You want to know how to effectively manage multiple bots? Great! This article will guide you through how to create a bot with Amazon Lex, add it to Zwerm, and see it in action within the Zwerm ecosystem and on your own website.
Start enterprise bot development with Amazon Lex
You can quickly make a bot bot using Amazon Lex. All you have to do is to copy a so-called blueprint. In this exercise, we’ll help you create your first Amazon Lex bot using a blueprint.
- Sign in to your AWS account (or create one if you don’t have one).
- Open the Amazon Lex console. Make sure you switch to one of these two supported regions before continuing: us-east-1 or eu-west-1.
- If you have never made a bot before, click “Get Started” and choose an example to try.
- On the Create your Lex bot page, provide the following information, and then choose Create.
- Choose a blueprint, for example OrderFlowers
- Choose a name.
- For COPPA, choose No.
- Click Create. Next you’ll see the bot editor window. Wait for confirmation that your bot was built.
- Now you can test the the bot and connect it to Zwerm.
If you like, you can modify the bot by adding new responses.
We’re focussing on connecting your bot to Zwerm. For more information on how to make bots using AWS, read Getting Started with Amazon Lex.
Connect your bot to Zwerm
Keep your AWS Console open; you’ll need this later. Now sign up or sign in to Zwerm. Your first encounter will be Zwerm’s IAM application which helps you manage teams and users as well as setup and connect bots.
In Zwerm IAM:
- On the opening screen of Zwerm you will see the team you are a part of and the option to add a bot. Click Add a bot.
- To create a new bot fill in the bot name, for example OrderFlowers, leave the Bot ID as it is and select Amazon Lex as the engine.
- The settings for Amazon Lex appear:
- Leave the engine label blank for now.
- To fill in the Bot Name, go to AWS Lex and look for the name of your bot. In this example that’s “OrderFlowers”. Put this name into the Bot Name field in your Zwerm IAM panel.
- Now in AWS Lex, open your bot.
- The first thing you need to do is publish your bot. Don’t worry, no one will see it yet. To do so click on the publish button at the top right.
- In the pop up, name this version of your bot. (e.g. Production or Published). Wait for it to be published and close the confirmation pop up.
- Next up, go to the settings tab and check to see if your alias is available. Copy the alias name and switch back to Zwerm and paste in the Bot Alias field.
- Select the correct AWS region in which your bot is deployed. (Currently supported regions are us-east-1 and eu-west-1. The top right-hand corner in AWS shows where the server is located.)
- Next sign in to your AWS IAM service and go to Users in the sidebar menu and select your user. Go to the Security credentials tab and create a new secret access key. Enter the Access Key ID and the Secret access key in Zwerm IAM. (Make sure you have the user’s permissions set correctly. See AWS for more information).
- Click Create to connect your bot.
Now your bot is added to Zwerm! Click Open in App and go to Testing to test how your bot behaves.
Add the 1-minute web chat widget
Now let’s integrate your bot in your website with Zwerm’s web chat widget, which can sit on any HTML page.
- With your bot selected in Zwerm IAM, go to Channels in the bot settings menu. Select Web Chat in the Add a channel dropdown and select the Add button. Save.
- Select the eye icon next to your new channel in the channels list. Copy and paste the widget snippet into a HTML page on your website. (For more info in what you can do with this web widget and if you want to customise it further, check out our documentation).
See your bot in action
Now you’ve built and connected your bot to Zwerm, put it on your website and can manage and control it. It’s now time to see what it can do! Go to your webpage and tell the bot “I would like to order some flowers.” Your bot should respond with “What type of flowers would you like to order?” Your bot will conclude the conversation by telling you the flowers have been ordered.
Now it’s time to learn more about Zwerm’s awesome functions like conversation take over, sentiment tracking, the metrics, and the ability to change voices right off the bat, or go back into AWS Lex and tweak your bot! Check out our extensive documentation for details.