0

I'm creating an alexa skill which have several different states. I want to define an intent that will work over the whole app, regardless of state.

So far I've tried:

Alexa.CreateStateHandler([array, of, states], {
  globalIntent() {
    this.emit(':tell', 'something for alexa to say');
  },
});

My only work around for this is to define the globalIntent in every state which is fine but I'm wondering if there's a more elegant solution.

Thanks!

Nick Ramsbottom
  • 583
  • 1
  • 6
  • 17

1 Answers1

0

You can redirect to another intent and retain the current state with something like:

this.emitWithState('globalIntent');

Any session attributes that have been set or modified, such as speechOutput, will be available to the globalIntent.

Pappa
  • 1,593
  • 14
  • 20