[Docs] Data | Jovo Framework


Learn more about different data types that can be used in a Jovo project.

Learn more about sessions and the request & response lifecycle here.

This is a companion discussion topic for the original entry at https://www.jovo.tech/docs/data


How to correctly use app data?
I’d like to load data form a json file, or potentially from Firestore - can I do it from outside the app.setHandler ? Or does it have to be triggered with the intent, ie. LAUNCH intent?


Why there is no replied for MarekMis ?
I tired to use npm global , localStorage packages with no use.


Hi @engmg2011, could you further explain what you’re trying to achieve and what goes wrong?


I need to use a lot of variables globally between states and intents. So I thought of using this.$session.$data for all the variables instead of using global declaration.

The question may sound very naive but will it make my responses slower, as the lookup time may increase for this.$session.$data ?


Highly recommended! The problem of global variables is that they are not user-specific. So if you write into a global variable for one user, and the next request is coming from another user, it will use that global variable. I recommend to always use session or database data for stuff like this

At the beginning of each request, the incoming JSON will be parsed and the session data (in Alexa, session attributes) are stored into the this.$session.$data object. Accessing that data object takes as long as accessing any other (e.g. global) variable in your code.