Dialog Interface

In this section, you will learn how to manage multi-turn conversations with the Alexa Dialog Interface.

Introduction

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).

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:

Features

When using the Dialog Interface, you can decide between letting Alexa handle the conversation or controlling each step yourself. There is also the possibility to combine both options.

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:

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 beeing 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.

Jovo Language Model

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

Comments and Questions

Any specific questions? Just drop them below. Alternatively, you can also fill out this feedback form. Thank you!

Join Our Newsletter

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