Amazon Alexa

Integration published by Jovo | 12,848 downloads

Build apps for Amazon's Alexa assistant platform

Dialog Interface

The Amazon Alexa Dialog Interface helps you manage multi-turn conversations with your user to gather the information needed to for your intent. Here is the official documentation by Amazon. Every conversation is connected to an intent and it is maintained until all the required slots are filled or confirmed by the user.

Requirements

To use the Dialog Interface, you need a dialog model, which you can create with the Skill Builder. In the dialog model, you select which slots are required for your intent and whether the user has to confirm them or the whole intent. You also define, which prompts Alexa should use and how the user might answer (utterances).

You can also check out a sample implementation of the Dialog Interface in the Jovo language model here: Alexa Dialog Interface Template

Please consider that you're not allowed to use the AMAZON.LITERAL slot type.

Dialog State

If the Dialog Interface is enabled, you will get a dialogState property with every request. It is used to determine whether the dialog has just STARTED, is IN_PROGRESS or already COMPLETED. When the intent is invoked for the first time, dialogState will be set to STARTED. It is only set to COMPLETED, if you let Alexa handle the whole conversation. We will get to that later on.

To check the dialog state, use:

Jovo also allows you to check for a specific state:

Dialog Delegate

If you decide to delegate the conversation, Alexa will use the prompts you defined in your dialog model to fill the required slots. Alexa will also confirm both slots or the whole intent if you selected that in the dialog model.

To delegate the conversation, use:

Optionally you can also pass in an Intent object as described here:

Control the Dialog in Your Code

The Dialog Interface allows you to jump in and control the conversation yourself. Keep in mind that the prompts you prepared in the Skill Builder are only used if you delegate the conversation to Alexa. The utterances are still being used.

You have the possibility the ask the user to fill a certain slot, confirm a slot, or confirm the whole intent. You can also update the intent if you have certain values, for example the user's name, saved in a database.

From now on, parameters which are between these [] brackets are optional. These parameters are repromptText and updatedIntent. If you don't specifiy a repromptText, the speechText will be used twice.

Slot Value

To check, whether a slot has a value or not, use:

Elicit Slot

If you want the user to fill a slot, use:

Confirm Slot

To confirm a slot use:

Confirm Intent

To confirm the whole intent, use:

Update Intent

Updating an intent gives you the ability to change slot values or the confirmation status for slots or intents. Here's an example:

You already have the user's name stored in the database, so you don't want to ask for it again. Therefor you just update the intent and add the slot value.

Amazon Alexa Changelog

Jovo Marketplace | GitHub | npm

Current version might be higher than the latest changes displayed below because of updates of dependencies.

2021-10-27 [3.5.5]

2021-02-22 [3.5]

  • #901 Move setResponse from response to after.response middleware (@aswetlow)
  • #901 Route Alexa.Presentation.APLA.RuntimeError requests to ON_ERROR (@aswetlow)

2020-11-10 [3.2.1]

2020-08-21 [3.0.30]

3.0.17 (2020-05-13)

🐛 Bug fix

  • jovo-platform-alexa Fix http status in ReminderAPI

Committers: 1

3.0.13 (2020-05-04)

💅 Enhancements

  • jovo-platform-alexa #734 Add getPermissionIsCardThrown (@rmtuckerphx)
  • jovo-platform-alexa Add types for skill event body objects

Committers: 2

3.0.11 (2020-04-06)

  • Updated Typescript to 3.8.x
  • Updated Prettier to 2.x

Committers: 2

2.x

Find the 2.x changelog here.

Join Our Newsletter

Be the first to get our free tutorials, courses, and other resources for voice app developers.