Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for new built-in intent AMAZON.SelectIntent #115

Open
omenocal opened this issue Sep 25, 2019 · 5 comments
Open

Missing support for new built-in intent AMAZON.SelectIntent #115

omenocal opened this issue Sep 25, 2019 · 5 comments
Labels

Comments

@omenocal
Copy link

Description:

The framework throws an error when trying to use the AMAZON.SelectIntent built-in intent

Environment:

  • Version:
  • OS: Mac
  • Node version: 8

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create a test with this intent: reply = await platform.intend('AMAZON.SelectIntent', { ListPosition: '3' });

Expected behavior

virtual-alexa should return an intent request for AMAZON.SelectIntent with the slot value I defined in the slots. It could be one of the 4 intents allowed

Actual behavior

It returns the following error: Error: Trying to add slot to intent that does not have any slots defined

Code example

reply = await platform.intend('AMAZON.SelectIntent', { ListPosition: '3' });
@jkelvie
Copy link
Member

jkelvie commented Oct 2, 2019

Hi Octavio, we are looking to add support for this in our upcoming development. In the meantime, you can work around this by using our request object. It works like this:

const request = alexa.request()
    .intent("MyIntentName")
    // Directly set any property on the JSON easily with the new set method
    .set("request.intent.slots.ListPosition", {
          "name": "ListPosition",
          "value": "5",
          "confirmationStatus": "NONE"
      });
const response = await request.send();

Additional info on the skill request object is here:
https://bespoken.github.io/virtual-alexa/api/classes/skillrequest.html

Using the set method you can essentially manipulate the JSON as needed. Not an ideal solution, but should get you past this error message.

We are keeping this issue open for scheduling in an upcoming sprint.

@omenocal
Copy link
Author

omenocal commented Oct 2, 2019

Thanks @jkelvie I was able to use it that way exactly. Sorry for not posting it before!

@btburton42
Copy link

Hi @jkelvie @dmarvp any updates on a timeline for this enhancement? We are automating a testing solution and having the simpler .intend command would be nice (and much less work).

@jkelvie
Copy link
Member

jkelvie commented Jun 7, 2021

Hi Tyler, we do not have a current timeline for this - I would recommend the workaround as mentioned above, imperfect though it may be.

@btburton42
Copy link

@jkelvie thanks for the reply! I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants