Hello guys, welcome to the 27th session of create custom and access key using AWS lambda function tutorials for beginners. In this session we will use confirm slot directive. Confirm slot is used to add confirmation for slot value. In previous session we have created a new intent for obtaining person name, country money and friends count. In this session I will go to modify it such that it will ask for confirmation for friends count. Open add user preference intent edit dialog for a counselor that is available confirmation for this law.
You need to add text that will be asked for the user for confirmation. Right you want to visit conference right the model Open JSON editor. column to dialogue property. For count slot you can see the confirmation required is true and it contains confirmation prompt ID scroll down to end. Here new properties added for confirmation of count. build a model.
Let us switch to VS code to update lambda. add one more else block here. If confirmation status of counselor is none then we will prompt with the message you want to visit counselor dot value friends right and use add confirm slot To vector method of responsibility to generate response like elicit in confirm slot we need to pass slot name for each we will add confirm directing. When user denies confirmation then confirmation status will be denied. In that situation we need to ask the user to enter that value okay. For this I will use innocent slot directly.
Let us create as Rob for that when confirmation status is denied, then ask the user for Can you please tell me again about how many friends you want to visit controlling slot when you use an illicit slot directive method to retry when you again here's the file and deploy it. That function is tested in Echo Dot. Alexa, open the third demo. Welcome to third demo skill. My name is Megan and I want to visit fete num with my three friends. Do you want to visit three friends?
Right? No. Can you please tell me again about how many friends you want to visit Vietnam? You want to visit to friends, right? Yeah. Your name is Megan.
You want to visit Vietnam with two other. Let us see what we have learned in this session. Confirm slot directive is used to provide confirmation for slot value Here is an example that we have created. When confirmation status is none we have used add confirm floor directive for confirmation. When user denies confirmation, we will ask for new value using elicit slot directive. Thanks for watching this video.
If you have any doubts, please feel free to contact me Have a nice day.