Is this possible to send a sample utterance to the skill dynamically


#1

Wondering if there is a way to send a sample utterance from the code to the skill when routing to INTENT-B from INTENT-A so that the skill is able to find the desired intent (INTENT-B) immediately without waiting for the user to say the utterance and proceeds with user inputs for the available slots in this intent (INTENT-B).

INTENT-A: LinkAccountIntent
INTENT-B: ValidatorIntent

Here is a use case:

LAUNCH( return this.toIntent("LinkAccountIntent") );

LinkAccountIntent() {
   if ( account is linked ) {
          // additional validation
          return this.toIntent("ValidatorIntent"); ###
   } else {
         // do something else.
   }
}

// Sample utterance: "validate my account please"
// Number of slots: 02
ValidatorIntent() {
    if( both the slots are filled ) {
        // do something
    } else {
        // do something else
    }
}

###: Question
Is this possible to somehow send the utterance “validate my account please” dynamically with return this.toIntent("ValidatorIntent"); directly to the skill and let it find the right intent tied with this utterance and start asking the user for supplying the slot values immediately?

Regards,
Subrata Sarkar


#2

I’m not sure if I understand it correctly, but what you could do, is for example work with session data this.$session.$data.slot1 and this.$session.$data.slot2 and fill them if the slots are available. And if not, ask the user.


#3

The slot values are associated with an intent. They are supposed to be filled in by the user when alexa asks those. What I want is to call the Intent by passing the sample utterance somehow dynamically from the skill function.

If I can invoke that intent dynamically in the above way without involving the user, ideally it would start asking the user to fill in the slot values. Am I right?

Please let me know if I could explain what I am trying to accomplish.