Amazon Connect and Lex Bot Integration
Last updated
Last updated
Prerequisite:
Amazon Connect allows companies to provide superior customized customer service across voice, chat, and tasks at a lower cost than the traditional contact center systems.
VoiceWorx allows organizations to design and customize their own chat bots and voice assistants for their business purposes that range from monitoring, regulating services to customer service/ support and many more. These assistants can also be deployed over Amazon Connect. For that, user needs to have followed following prerequisites:
Create Instance of Amazon Connect
Create Custom App in VoiceWorx
Publish Custom App to Amazon Lex as Lex Bot
You can use either Lex V1 or Lex V2.
Note that, now Lex V1 is referred as Lex Legacy version and Lex V2 is referred as Lex
If you are new to Amazon Connect, you can start by creating a Free Tier Amazon Web Services account.
Create a new instance of Amazon Connect and obtain a phone number using this official documentation from Amazon. Depending upon your location and the location of your target customers, you might need to perform some additional work here. Help from technical department might be required depending upon the scenario.
After creating the instance, Amazon Connect Home will look like this: Before you proceed from here, please make sure that these prerequisites have been fulfilled.
Getting Started with Lex Bot using Appointment Blueprint
Click on the Amazon Connect Instance in the figure shown in Step 3.
After the Lex Bot has been published and tested. Now let’s add the Bot for Amazon Connect. If you miss this step, the Lex Bot we created in Step 3(a) won’t be available for use in Amazon Connect.
Under the Amazon Lex section on the right select Region>>Bot>>Add Lex Bot.
Notes:
If you are using Lex V2 then you should also select Alias. If you are using Lex V1 (Lex Legacy) then Alias is not required, you can keep that empty.
Version should be associated with Lex Alias. Below screenshot shows a Lex bot Alias with an associated version.
If you do not see the Lex Bot you created, make sure the bot is published in the first place and Amazon Connect Instance and the Bot are both in the same region.
Click Add Lex Bot, verify that the bot is displayed under the section Lex Bots.
Now, to configure contact flow, let’s log in to the Amazon Connect Instance.
Click on the Access URL for the Amazon Connect Instance.
If you are having trouble signing in, you can take an alternative approach to Login to Amazon Connect Instance. Click on the Instance Alias name in above figure. You will be redirected to following page.
On the Overview menu, you can find a link for emergency access, you can click on that and proceed for training and emergency purposes.
The Amazon Connect Dashboard looks something like this:
Create a new Contact flow and name Appointment Booking Lex Sample. The Contact flow is basically a call flow chart that callers go through once they dial into the call center.
In this documentation, a simple prompt block greet is used: “Thank you for using Appointment Booking”. To add, drag the play prompt which is located under Interaction Section in the left navigation and drop it in the designer.
Connect the entry point block with the play prompt block as shown in diagram below. And click on the Play Prompt text heading.
Click: Get Customer Input header
Enter text: “How can I help you?”
Select: Amazon Lex
Lex bot Name: Appointment-Booking-Lex-Sample (Region…)
Alias: <Select one of the Alias from the list> (Applicable only for Lex V2)
Click: Customer Input and scroll to the section named: Intents.
Add: Intent that handles exit intent named QuitIntent. (Make sure to have the same intent defined in your Lex bot too).
Note that Intent name is case sensitive and there must be exact match of intent name.
In designer, add a play prompt for error handling, and another play prompt for handling exit intent.
For the error handling prompt, add text to speech: “Something went wrong, please try again later”.
For the play prompt for Exit Intent, enter text: “Thank you for using Appointment Booking. GoodBye”!
Click publish to test the intent.
Click the phone numbers on the left navigation as shown to claim a phone number.
Claim Phone Number as shown below.
You shall now see the phone number in the list.
After claiming the phone number, dial the number and test to ensure success.
Congratulations! You have successfully completed Amazon Connect and Lex Bot Integration. Likewise, you can repeat the same process with other Lex Bots using VoiceWorx and Amazon Connect Integrations.
Navigate to Routing>Contact flows.
To configure this play prompt, select Text-to-speech or chat text. And enter the “Thank you for using Appointment Booking. How can I help you?” and click Save.
Following the prompt block, add a new Get Customer Input. This allows the customer’s input either via DTMF or using Lex bots. In this case Lex bots are used.
And click on Save.
Add arrows connecting the blocks as shown in diagram.