AWS lex bot...created "slottypes" like "coffetype" "coffeesize" but can't use them in the bot creation

Viewed 33

In the construction of the bot, I should be able access the slotypes I created. but I can't see them. There are videos that they we can create slot types and use them in building intents. Even though my slot type exists I can't access them while I am building the Utterances

enter image description here

enter image description here

enter image description here

2 Answers

In order to reference the slot types within an intent's utterances, you need to have added those slot types to slots within the intent.

Please take a look at this example where I have a slot called quantity of type AMAZON.Number. I can then reference the quantity slot within any utterance that I have.

enter image description here

Reegz's answer was very good and seemed to cover everything so I apologize if I am repeating things.

You've created your own custom slots already, however, you must include them in the intent you want to use them with. You must do this before you add them to Utterances. Otherwise they will not appear in the drop-down.

Add the slots to the intent by going to the Slots section of your intent:

Image of Lex V2 Slots section

Click on the Add slot button on the top right corner of this section.

Create a name for the slot, this is similar to setting a variable name for an object. This name is also how you will access the Slot. Image of creating a new slot

You may need to click save on the intent in order to see changes in the slot drop-down.

Now when you go to add a new Utterance, your custom slot should appear: Custom slot in drop down

Let me know if you have anymore questions. I hope this helps you.

Related