Step 2: Migrating the Alexa Interaction Model

by Jan König on Apr 17, 2019

Migrating the Alexa Interaction Model from ASK SDK to Jovo

In this step, we will turn an Alexa Skill Interaction Model into a Jovo Language Model. This step isn't necessary to get your app running at this step of the course, but it is especially helpful for fast testing in the Jovo Debugger (the buttons there access the Jovo Language Model, in the previous step it was LAUNCH and MyNameIsIntent, for example).

Introduction to the Jovo Language Model

Learn more about the Jovo Language Model here.

The Jovo Language Model offers an abstracted way to define language models for multiple platforms. For example, you can create the model files once and translate them into an Alexa Interaction Model and a Dialogflow Agent for Google Actions.

The Jovo Language Model also works well with other tools in the Jovo ecosystem. For example, you can directly access the intents from the Jovo Debugger for fast testing:

Jovo Debugger Request Buttons

In this course step, we will import the existing Interaction Model of the Quiz Game Alexa Skill template and turn it into a Jovo Language Model, in two sections:

Accessing the Interaction Model

The Alexa Skill Interaction Model of quiz game template comes with some custom intents and a custom slot type:

Quiz Game Alexa Interaction Model

It would be a lot of manual work to copy all the intents and values into the Jovo Language Model by hand. This is why we offer two ways to import the Interaction Model files into your Jovo project:

Alternative 1: jovo get

You can import an existing Alexa Skill project from the Amazon Developer Console (including the Interaction Model files) into your Jovo project by using the jovo get command:

If you're doing this for the first time, this will prompt you to choose from all Alexa Skills in the current developer account connected to your ASK profile:

Import Alexa Interaction Model

After you select your Skill project, it will import the files into the platforms/alexaSkill folder of your Jovo project.

In the platforms/alexaSkill/models folder you can now find a file called en-US.json which contains your interaction model. It starts like this:

Alternative 2: Copy paste

You can also access the Alexa Interaction Model on GitHub: skill-sample-nodejs-quiz-game/models/en-US.json.

You can use this file and copy it into your platforms/alexaSkill/models folder.

Don't see that folder? Run the following command first:

This will create the platforms/alexaSkill folder in your Jovo project.

jovo build reverse

Bringing the Interaction Model from above into the right format for the Jovo Language Model by hand can be quite time consuming.

This is why we created a "reverse build" CLI command that saves you some time:

This will use the en-US.json file in the platforms/alexaSkill/models folder and translate it into a Jovo Language Model file in the models folder of your Jovo project directory.

This file looks like this:

After this step, we can access the intents of the model in the Jovo Debugger.

Next Step

We have everything prepared for fast testing now. Let's dive deeper into the Skill's structure by converting from ASK SDK canHandle and handle to the Jovo routing.

Step 3: Migrating Intents and Handlers

Jan König

Co-founder at Jovo

Comments and Questions

Any specific questions? Just drop them below or join the Jovo Community Forum.

Join Our Newsletter

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