Amazon Alexa Platform Integration
Learn more about Alexa specific features that can be used with the Jovo Framework.
- $alexaSkill Object
- Jovo Language Model
- Permissions and Data
- Alexa Skill Interfaces
- Progressive Responses
Import the installed module, initialize and add it to the
Install the Jovo CLI
We highly recommend using the Jovo CLI if you want to benefit from all the features coming with Jovo. You can learn more and find alternatives on our installation page.
Create a new Jovo Project
You can create a Jovo project into a new directory with the following command:
This will create a new folder, download the Jovo "Hello World" template, and install all the necessary dependencies so you can get started right away.
This is how a typical Jovo project looks like:
Run and Test the Code
To test the logic of your code, you can use the local development server provided by Jovo, and the Jovo Debugger.
To get started, use the following command:
This will start the development server on port
3000 and create a Jovo Webhook URL that can be used for local development. Copy this link and open it in your browser to use the Jovo Debugger.
In the Debugger, you can quickly test if the flow of your voice app works. For this example, click on the
LAUNCH button, and then specify a name on the
MyNameIsIntent button. The Debugger will create requests and run them against your local webhook.
project.js in your project directory, you can configure your skill specifically for your needs. Using stages, you can also utilize different configurations for different environments.
The following elements can be added to the
In the deployment process with the Jovo CLI (
askProfile are by default taken from the existing
config in the
/platforms/alexaSkill/.ask folder. Specifying those in the
project.js to override the existing platform files is especially useful if you have different versions of the Alexa Skill in separate developer accounts (see Stages).
You can also add information to go into the
skill.json. You can basically add or override any element that you can find in the skill manifest:
To add an object, make sure to add the same path it has in the
skill.json. The below example (from our Alexa Audioplayer Template) adds the Audioplayer Directive to the Alexa Skill:
$alexaSkill object holds references to every Alexa-specific feature:
Jovo Language Model
For a general understanding of the Jovo Language Model, check out the platform-independent docs
When using the Jovo Language Model you can add an
alexa object to each intent. In there you can define the intent name for Alexa specifically:
But, that way, the
AMAZON.NextIntent would still be extended using the utterances in the
phrases array. To specify Alexa-specific utterances you can add a
samples array as well. If you keep the array empty, the intent won't be extended at all:
When using slots in your intents, you can define platform-specific slot types:
Last but not least, you can add an
alexa object at the root of the Jovo Language Model which has the same syntax as the original Alexa interaction model. Both the platform-independent Jovo Language Model and the
alexa part will be merged when building:
If you want to augment your existing entities depending on a dynamic change in data or context, you can use Dynamic Entities to dynamically create new entities during your session. These will be resolved in addition to your static slot values and are valid for a total time of 30 minutes, even after the user session has ended, although we recommend to clear every dynamic entity as soon as the session ends.
Here is the official reference by Amazon: Dynamic Entities.
Permissions and Data
There are a lot of Alexa specific permissions and data that a Skill can use, such as:
- Contact Information
- Skill Events
Alexa Skill Interfaces
Learn more about the different Alexa Skill Interface types here: Alexa Skill Interfaces.
Learn how to sell physical goods and services in your Alexa Skills using Amazon Pay and Jovo. Find out more here: Amazon Pay Docs.
Learn how to sell digital goods in your Alexa Skills using Alexa In-Skill Purchases (ISPs). Find out more here: Alexa ISP Docs.
For responses that require long processing times, you can use progressive responses to tell your users that you are currently working on fulfilling their request.
Here is the official reference by Amazon: Send the User a Progressive Response.
Find an example file here: