0

I'm trying to create a bot in Lex and I'm using the default one provided by the platform(BookTrip). Here when I enter some random text when I as prompted for city, it is taking anything, though it is a valid city or not.

enter image description here

please let me know if I'm going wrong somewhere and how can I fix this.

Thanks

user3872094
  • 3,269
  • 8
  • 33
  • 71

2 Answers2

0

The built-in slot types are not limited to their lists.

So it is good practice to validate the slot values yourself in Lambda.

Jay A. Little
  • 3,239
  • 2
  • 11
  • 32
0

The built-in slots have a big room to take on values that might not be valid, this happens for cities, names, emails, etc. To avoid this is to fill out the Corresponding utterances for each slot in the console.

An advanced way would be to attach a Lambda that gets called with the intent, then verify each slot value received to verify it matches your validation

Max Cabrera
  • 121
  • 1
  • 6