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

request builder - confirm intent requires named dialog to exist #110

Open
xcobbler opened this issue Jun 5, 2019 · 0 comments
Open

request builder - confirm intent requires named dialog to exist #110

xcobbler opened this issue Jun 5, 2019 · 0 comments

Comments

@xcobbler
Copy link

xcobbler commented Jun 5, 2019

Description:

When using the request builder, sending confirmed intents is requiring dialogs with the same name to exist in interactionModel/dialog/intents. For skills that don't want to always confirm to the user every time, a programmatic confirmation will be used. it's my understanding that when the model is made is the developer console, the interactionModel/dialog/intents part will only be present if the intent requires confirmation. the model can be updated explicitly state that the intent doesn't require confirmation...but that causes issues with upsells in the intent.

Environment:

  • Version: 0.7.2
  • OS: Windows 10
  • Node version: 10.14.1

Steps To Reproduce

Steps to reproduce the behavior:

  1. create an intent with no required intent confirmation (the interationModel/dialog/intents for the intent should be missing)
  2. programmatically have the intent return an intent confirmation
  3. write a test to hit the piece of code that is after the intent confirmation is sent

Expected behavior

Since it is not required to have the interationModel/dialog/intents present in the model, the automated test framework shouldn't crash complaining that there is no dialog for the intent. from a manual testing framework using the developer console, everything works with the model part missing.

Actual behavior

Error: No match for dialog name: SomeIntent

Code example

result = await alexa.request()
.intent("SomeIntent")
.intentStatus("CONFIRMED")
.send();

model change that shouldn't be required

{
    "name": "SomeIntent",
    "confirmationRequired": false,
    "prompts": {},
    "slots": []
},

Additional context

The 2 reasons that I feel that this manual model change shouldn't be required is because:

  1. the developer console doesn't produce this part of code
  2. this piece of code appears to cause issues with upsells (https://forums.developer.amazon.com/questions/207372/upsell-not-responding.html)

The overall process of what i'm trying to do is:

  1. user requests an action which requires in-game currency to perform.
  2. if the user doesn't have the required currency, an upsell to buy more is suggested (confirming the buy implicitly confirms the action).
  3. if the user does have enough in-game currency, an intent confirmation is returned to the user asking the user if they want to spend x amount of in-game currency.

As mentioned in the link above, adding these model changes actually causes issues during runtime with upsells. So the workaround I have is to change the model locally but don't push it which is kind of annoying.

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

No branches or pull requests

1 participant