Is there a way to use a slot with ALEXA OPEN dialog?


#1

Back again with another typical question! :slight_smile:
I am developing a new skill where I want to use a slot with the OPEN dialog itself to make the user interaction simpler.

I will use an API to fetch data and it has a number of endpoints, like campaign, message etc.

What I want is like this:

Alexa, open {app_name}. What are the results of my most recent {slot}?
or
Alexa, open {app_name}. Latest ten users who read my last {slot}?

Here {slot} could be like campaign, message etc, i.e:

Alexa, open {app_name}. What are the results of my most recent campaing?
or
Alexa, open {app_name}. Latest ten users who read my last message?

And yes, the second part of the opening dialog could differ like above based on the requirement, i.e. for campaign, it is What are the…", for message, it is “Latest ten…” etc.

The above command LAUNCH-es the skill and based on the slot value above, it jumps to the correct intent and proceed.

For example, if the {slot} value is campaign, it jumps to CampaignIntent. If it is message, it invokes MessagingIntent and so on.

Is this possible? I Googled but did not find any answer.

Thank you!

UPDATE
I have found this: https://developer.amazon.com/docs/custom-skills/understanding-how-users-invoke-custom-skills.html#cert-invoke-specific-request, which looks similar to what I need. But I still don’t know how would I decide which Intent to call inside LAUNCH request.

Means:
Alexa, ask <app_name> about the results of my most recent campaign, where the italic part of the above sentence is the sample utterance for CampaignIntent. Similarly, if I have a similar type of sample utterance for message Intent, I need to decide which one to call and that too inside the LAUNCH request. How would I do this? In simple words, what would be my LAUNCH function?

LAUNCH() {
    return this.toIntent(<which-intent-name-I-would-write-here>);
}

since the argument value is always a constant, if I have understood correctly.