Confirming Slots

Confirmation can be thought of as reverse validation. When validating slot values, the skill verifies that the values given by the user meet certain criteria. Confirmation, on the other hand, is checking with the user to make sure that what the skill is about to do meets the user’s expectations.

When scheduling a trip, for example, it would be helpful if Alexa repeated the trip details back to the user to make sure that she heard everything correctly before booking the trip. To enable such confirmation for the ScheduleTripIntent, we can simply set the confirmationRequired property on the intent to true and specify the prompt Alexa should use to confirm the trip details:

Get Build Talking Apps for Alexa now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.