Passing value from one intent to another as argument - possible?


#1

Is there any way I can pass a value to an intent using toIntent method as an argument? Currently we can jump to an intent using return this.toIntent('intent_name'), but if I want to send some values along, how would I do it?

I read state handling but did not understand purely. Is there any complete documentation with code sample abut how to use it in JOVO available yet?


#2

Why aren’t you using the User object provided by jovo?


#3

We typically recommend to use the this.$data object if the data is only needed for the current request:


#4

Thank you @michaelwapp! However, for my skill I do not need a user object for now. But thank you so much. I will require it in near future for the same skill! :slight_smile:


#5

That’s probably the thing I was looking for at the moment. One question. Please let me know how would I destroy a session item after it has been used - this.$session.$data.data_id.


#6

When you use this.$data, It disappears with the next request (it’s only stored inside the this context, which is only alive for a single request), so this shouldn’t be a problem normally.

This should work, though: