Use this action to integrate call flows with Amazon Lex V2 functionality for processing and returning intents and slots to Architect.

  • Before the Call Lex V2 Bot action appears in Architect, first obtain the Amazon Lex V2 integration from the Genesys AppFoundry. Then, configure it in Genesys Cloud and create an Amazon Lex V2 bot in the Amazon Lex V2 console
  • Changes you make to a Lex V2 bot or an alias in the Amazon Lex V2 console can take a few minutes to appear in Architect.
  • Amazon Lex V2 uses the AWS Polly Standard Voices text-to-speech engine with installed Lex V2 bots. If you select a different speech engine, the system reverts to AWS Polly Standard Voices.
Name Description
Name field Type a distinctive name for the action. The label you enter here becomes the action’s name displayed in the task sequence.
Bot Name

The Amazon Lex V2 bot that you want the flow to call.

Bot Alias

The specific version of the Lex V2 bot you want to use. This version is the alias you create in the AWS console that points to a specific version of a bot.

Note: Depending on your bot configuration, if the bot supports multiple languages, then the same alias name may appear more than once. You can select the alias and language combination.

Initial Intent Name

The initial intent that you want the flow to use. The options that are available here reflect the logic configured in the Lex V2 bot. 

Make sure that this intent name corresponds to a welcome intent; it should not be the actual intent that you want to collect. If you select such an intent, Lex V2 collects data and then expects you to transition to a new intent. If you then do not transition to another intent, the fallback intent is processed and the flow does not retrieve the slot values for the initial intent.

Notes: You create this intent in the Amazon Lex V2 console for the appropriate bot.

Session Variables

The information that you can pass into and retrieve from the Lex V2 bot’s session attributes. Enter the name of the variable and a value to assign. You can add multiple variables, and you can reorder them.

Most commonly, use session variables for bots that start an AWS Lambda Function with the completed intent. This process ensures that the AWS Lambda receives the necessary context for which to perform its operations.


Use inputs to pass data to a Lex V2 bot’s session attributes. For each value you send, give the entry a name and an expression that resolves to a string for its value. Then when the action runs, all expressions evaluate to produce the session attributes map that passes to the Lex V2 bot. You can pre-populate slots by choosing the name of what passes as the name of your slot.

  • Variable Name
  • Value to Assign


Use outputs to extract data from the Lex V2 bot’s session attributes. Then in Architect’s Output section, list the names of the parameters you want along with the Architect variables in which to store the matching values.

Note: Key names are case-sensitive.

  • Key Name
  • Variable to Assign

For more information, see Setting session attributes and Using an AWS Lambda function in the AWS Amazon Lex V2 Developer Guide.


The options that appear in this section reflect the logic configured in the Amazon Lex V2 bot. Each intent represents an action to perform. For example, order a pizza or order flowers. Each intent path matches an output path for the Call Lex V2 Bot action in the task editor.

Below each intent, Architect displays the configured Lex V2 bot slots, or any data the user must provide to fulfill the intent. Using the Pizza Order intent as an example, the slots can include crust type, ingredients, cheese amount, and cutting style. If the user chooses the Order Pizza path, then the Lex V2 bot provides the slots associated with that path.

Failure Outputs

Select the variables that you want to assign to the failure data values returned by the Lex V2 bot.

Data value Variable
  • FeatureNotEnabledError: The Call Lex V2 Bot action is not available for the organization.
  • InternalServerError: An unexpected error occurred during the Call Lex V2 Bot action. Typically, the received response is in an invalid format. Contact Genesys Cloud Customer Care.
  • NoInputError: The Call Lex V2 Bot action timed out without any user input.
  • NoLexBotResourceError: The Lex V2 bot response does not include accessible intents.
  • NoMatchError: The user input that the Lex V2 bot received did not match any grammar elements.
  • VersionMismatchError: Received success from the Lex V2 Bot, but a mismatch occurred. For example, the returned intent did not match any intents configured with the action. Reload the flow and republish it.
errorMessage A non-localized message. This string variable can be empty or NOT_SET.

Note: To expand or collapse the list of variables, click the arrow next to Failure Outputs.

Configure success and failure paths

Name Description
Intent output path or paths

Configure a matching output for the intent. This path indicates that the action successfully communicated with its external endpoint and received a result. All Lex V2 bot output variables are string types.

Drag the appropriate action below the path that follows the route you want the interaction to take.

To learn more information about them, click the help button next to each intent or slot.

Failure output path

This path indicates that an error occurred while running the action or there was a problem processing the results.  

Note: If the network experiences connectivity issues, the action automatically takes this failure path.

Drag the appropriate action below the Failure path and direct the route you want the interaction to take. For example, a transfer action to send the caller to an agent for assistance.