If you are using Amazon Lex V2, refer to the Amazon Lex V2 guide instead.
If you are using Amazon Lex V1, we recommend upgrading your bots to Amazon Lex V2. We are no longer adding new features to V1 and strongly recommend using V2 for all new bots.
Step 3: Update the Intent: Configure a Code Hook
In this section, you update the configuration of the MakeAppointment
intent to use the Lambda function as a code hook for the validation and fulfillment
activities.
-
In the Amazon Lex console, select the ScheduleAppointment bot. The console shows the MakeAppointment intent. Modify the intent configuration as follows.
Note
You can update only the $LATEST versions of any of the Amazon Lex resources, including the intents. Make sure that the intent version is set to $LATEST. You have not published a version of your bot yet, so it should still be the $LATEST version in the console.
-
In the Options section, choose Initialization and validation code hook, and then choose the Lambda function from the list.
-
In the Fulfillment section, choose AWS Lambda function, and then choose the Lambda function from the list.
-
Choose Goodbye message, and type a message.
-
-
Choose Save, and then choose Build.
-
Test the bot, as in the following image:
Next Step
Step 4: Deploy the Bot on the Facebook Messenger Platform