Skip to content

Adapter - Amazon Lex

This page describes version 2.0.6 of the adapter.

Overview

This adapter uses the the Amazon Web Service Lex API to send user input to Amazon Lex. Requests are sent to Amazon Lex at runtime. Amazon Lex then interprets the user input using the machine learning model it built for the bot.

A valid AWS account is needed to use this adapter. Please refer to Amazon's Documentation for information about Amazon's Lex API.

Configuration

All of the Amazon adapters, require a region, accessKey and secretKey. The regions list can be in Amazon's documentation. The accessKey and secretKey are accessed by logging in to your amazon account.

Accessing Secret Key

The secretKey can only be accessed once, directly after the accessKey and secretKey are generated.



Properties

Name Display Is Required Comments Type Default Value Maximum Value Minimum Value Maximum Length Minimum Length
region AWS Region True The Amazon (AWS) region to run Lex commands. string us-east-1 1024 1
accessKey Access Key True The Amazon account's Access Key. password 1024 1
secretKey Secret Key True The Amazon account's Secret Key. password 1024 1



Commands

Post Text (postText)

Sends user input to Amazon Lex. Client applications can use this API to send requests to Amazon Lex at runtime. Amazon Lex then interprets the user input using the machine learning model it built for the bot. In response Amazon Lex returns the next message to convey to the user an optional responseCard to display

Request Properties

Name Display Description Is Required Type
userId User ID The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the userID field. True string
botAlias BOT Alias The alias of the Amazon Lex bot. False string
botName BOT Name The name of the Amazon Lex bot. True string
inputText Input Text The text that the user entered (Amazon Lex interprets this text). True string

Response Properties

Name Description Type
dialogState.Value Identifies the current state of the user interaction. string
intentName The current user intent that Amazon Lex is aware of. string
message The message to convey to the user. string
messageFormat.Value The format of the response message. (PlainText, CustomPayload, SSML or Composite) string
responseCard Represents the options that the user has to respond to the current prompt. string
sessionAttributes A map of key-value pairs representing the session-specific context information. string
slots The intent slots that Amazon Lex detected from the user input in the conversation. string
slotToElicit If the dialogState value is ElicitSlot, returns the name of the slot for which Amazon Lex is eliciting a value. string

Get Session (getSession)

Returns session information for a specified bot, alias, and user ID.

Request Properties

Name Display Description Is Required Type
userId User ID The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the userID field. True string
botAlias BOT Alias The alias of the Amazon Lex bot. False string
botName BOT Name The name of the Amazon Lex bot. True string
checkpointLabelFilter Checkpoint Label Filter A string used to filter the intents returned in the recentIntentSummaryView structure. False string

Response Properties

Name Description Type
dialogAction.IntentName The current user intent that Amazon Lex is aware of. string
dialogAction.SlotToElicit If the dialogState value is ElicitSlot, returns the name of the slot for which Amazon Lex is eliciting a value.If the dialogState value is ElicitSlot, returns the name of the slot for which Amazon Lex is eliciting a value. string
dialogAction.Type.Value Describes the current state of the bot. string
recentIntentSummaryView An array of information about the intents used in the session. The array can contain a maximum of three summaries. array
recentIntentSummaryView.checkpointLabel A user-defined label that identifies a particular intent. You can use this label to return to a previous intent. string
recentIntentSummaryView.confirmationStatus The status of the intent after the user responds to the confirmation prompt. string
recentIntentSummaryView.dialogActionType The next action that the bot should take in its interaction with the user. string
recentIntentSummaryView.fullfilmentState The fulfillment state of the intent. (Failed, Fulfilled or ReadyForFulfilment) string
recentIntentSummaryView.intentName The name of the intent. string
recentIntentSummaryView.slots Map of the slots that have been gathered and their values. string
recentIntentSummaryView.slotToElicit The next slot to elicit from the user. If there is not a slot to elicit, the field is blank. string
message The message to convey to the user. string
messageFormat.Value The format of the response message. (PlainText, CustomPayload, SSML or Composite) string
responseCard Represents the options that the user has to respond to the current prompt. string
sessionAttributes A map of key-value pairs representing the session-specific context information. string
sessionId A unique identifier for the session. string

Delete Session (deleteSession)

Removes session information for a specified bot, alias, and user ID.

Request Properties

Name Display Description Is Required Type
userId User ID The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the userID field. True string
botAlias BOT Alias The alias of the Amazon Lex bot. False string
botName BOT Name The name of the Amazon Lex bot. True string

Response Properties

Name Description Type
botAlias The alias in use for the bot associated with the session data. string
botName The name of the bot associated with the session data. string
sessionId The unique identifier for the session. string
userId The ID of the client application user. string

Release History

Version Type Description Tracking # Date
2.0.1 Initial First release in the Adapter Type store.
2.0.4 Maintenance Updated third-party components and improved maintainability. NAP-11518
2.0.5 Maintenance Updated third-party components and improved maintainability. NAP-23945 2022-11-29
2.0.6 Maintenance Updated third-party components and improved maintainability. NAP-27635 2024-07-31

Categories