Lex Bot
Lex Bot is an AI-powered chatbot that allows you to integrate a conversational interface into your flow with AWS.
Available Variables
Available Variables are placeholders for information that are automatically determined based on the contents of your flow. For example, if your flow begins with an Inbound Call trigger, the caller's phone number is stored as a $ANI variable. Later on in your flow, you can send a follow up SMS to the caller by adding the $ANI variable in the Send SMS/MMS action Inputs.
Check out How to Use Variables in SmartFlows for more information.
Inputs
Message Type
Select whether you’re sending text or audio to Lex.
Text/Message
If you select Text, enter the text you are sending to Lex. To use Assistant for an incoming SMS, for example, select the variable assigned to the Incoming SMS block and drag it to the Text/Message field.
Access Key ID & Secret Key Access
Key ID and secret access key are required to sign requests that are sent to your Lex bot. To get your access key, sign into your AWS console as an IAM user having permissions to access Lex API. Locate to your username in the upper-right section of the navigation bar. From the drop-down menu, select My Security Credentials. Then create an access key in Access keys for CLI, SDK, & API access section.
Bot Name
The name you have given your bot in Lex. You can also get this from the bot list in the Lex home page.
Bot Alias
A specific version of the bot.
User
The person who has the access to the Lex bot through IAM
Response Variables
responsebody: Entire Response from Lex Bot
StatusCode: Code that indicates the status of the API response (i.e. 200 = success, 404 = not found, 403 = forbidden)
Any of the Response Variables you entered holds the value you assigned to it from the query expression.
Note: To get the details to configure the Lex with SmartFlows go into your AWS Management Console > Security Credentials section.
Action
Each Lex Bot action includes two exit ports corresponding to the following outcomes:
-
On Success: The course of the flow if the bot interaction is successful (port 1)
-
On Failure: The course of the flow if the bot interaction is not successful (port 2)
An action should be connected to each of the exit ports to deploy your flow and the port order cannot be rearranged.