We're currently using the Genesys Lex V2 integration to build a conversational bot. Everything's configured properly and we're able to invoke Lex bots in our AWS account.
Architect mentions that the "Initial Intent Name" option for the "Call Lex V2 Bot" action must equal one of the bot's intent names, and cannot be "NOT_SET". Please see the image below for reference:
We don't want our bot to start with an initial intent. We'd rather have the bot determine the intent (i.e. elicit an intent) based on input from the user, which is the default behaviour when AWS Lex starts a new conversation.
Is it possible to configure the "Call Lex V2 Bot" action to invoke our Lex bot without an initial intent set?
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.
Do you have an example of a Lex bot with an associated Lambda function that performs this type of intent transition? We've tried, but are unable to have the bot respond with an ElicitIntent response via our WelcomeIntent.
The Initial Intent is how control of the call is transferred to the Lex V2 bot, but Lex will still Elicit an Intent following the delegation to the Initial Intent. For this, you can configure the WelcomeIntent to have only a "closing response" that provides a prompt for the caller. Then, select the WelcomeIntent as the Initial Intent Name in the "Call Lex V2 Bot" action.
At runtime, the Lex bot will be invoked and the first message from the bot prompt and Lex will begin to Elicit an Intent. The caller will then provide their reply which Lex will match against the sample utterances for the other Intents.
We are using a Close action in our WelcomeIntent lambda response and it "works" (i.e. allows for intents to be uttered afterwards). It probably shouldn't though - a Close response is used to tell the Lex service and the client application that the conversation is complete and no further dialog should be expected.
A more appropriate response action for a WelcomeIntent is ElicitIntent - which essentially tells the Lex service that it should expect an utterance from a user that needs to be routed to an intent. When we return an ElicitIntent action from our WelcomeIntent lambda response, the interaction raises an error and follows the failure path of the "Call Lex V2 Bot" action.
My concern is that it seems like the current implementation with the Close action is flawed/incorrect, and we'd prefer to not rely on this particular implementation quirk for our bot deployment in production. Of course all this can all be avoided if the Initial Intent field was optional on the "Call Lex V2 Bot" action. An initial intent does not need to be defined for other Lex V2 integrations such as AWS Connect/Slack or Twilio, therefore the Genesys implementation is the lone wolf in this regard.
Can we please put in a feature request to make the Initial Intent field optional for the Call Lex V2 Bot action in Architect?
We've talked to Amazon about the issue with ElicitIntent in the WelcomeIntent lambda. They've identified the issue and have a fix going through their deployment process. ETA for the deployment is Oct 20th.