In this section, you will learn more about the essentials of building the logic of your Jovo Voice App.
The /app
folder contains all the logic necessary for your voice application. The app.js
includes both a part about App Configuration, as well as App Logic.
You can find out more about the basic concepts below.
In the following sections, you will learn about handling and routing through intents and states, accessing user input and data, and crafting speech and visual output.
The handler
is the main building block of your voice app. This is where the logic happens.
app.setHandler({
'LAUNCH': function() {
this.toIntent('HelloWorldIntent');
},
'HelloWorldIntent': function() {
this.tell('Hello World!');
},
});
You can also define seperate handlers for each platform to overwrite specific intents and states for platform specific app logic.
app.setAlexaHandler({
'HelloWorldIntent': function() {
this.tell('Hello Alexa user');
}
});
app.setGoogleActionHandler({
'HelloWorldIntent': function() {
this.tell('Hello Google user');
}
});
In section App Logic > Routing, the concepts of intents and states are introduced, and how to route through them in the app's flow.
In section App Logic > Data, user input (slots and parameters) and user specific data are covered.
In section App Logic > Output, you can learn more about how to craft speech, audio, and visual responses.