Learn

Part of good conversational design is responding to users in their own language, i.e. respond with the user’s synonym.

Imagine that a user asks for a “scary” movie, but Alexa responds with a “horror” movie. The user’s synonym is interpreted correctly by the skill, but the response will not make that clear to the user.

Instead of responding with the resolved value (“horror”), we should respond with the slot value that the user used (“scary”). We can access that with:

this.event.request.intent.slots.YOUR_SLOT_NAME.value;

Repeating back what Alexa heard is a good voice design practice, because it gives the user assurance that they were correctly understood.

Instructions

1.

Edit the speech output on lines 13 and 16, so that Alexa responds with the user’s requested genre.

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?