Skip to content

Latest commit

 

History

History
 
 

04_app-logic

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

App Logic

In this section, you will learn more about the essentials of building the logic of your Jovo Voice App.

Overview

Alexa Skill Folder in a Jovo Project

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.

Basic Concepts

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.

Handler

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');
    }
});

Routing

In section App Logic > Routing, the concepts of intents and states are introduced, and how to route through them in the app's flow.

Data

In section App Logic > Data, user input (slots and parameters) and user specific data are covered.

Output

In section App Logic > Output, you can learn more about how to craft speech, audio, and visual responses.