question

Maxwell Dribinsky avatar image
Maxwell Dribinsky asked

Dialog Directive Issue

Hi all, I'm having trouble using the dialog directive. I basically have an Intent that requires two slots to be filled, in no particular order: name and statType. I invoke the Intent with the utterance: "What is my {statType}". In this case, i have already provided the statType as "accuracy", and need to have Alexa ask a follow-up question to find out "name".

The request my lambda function receives is as follows:

  "request": 
  {
    "locale": "en-US", 
    "timestamp": 
    "2017-05-20T15:42:56Z", 
    "dialogState": "STARTED", 
    "intent": 
    {
      "slots": 
      {
        "name": 
        {
          "name": "name",  
          "confirmationStatus": "NONE"
        }, 
        "statType": 
        {
          "resolutions": 
          {
            "resolutionsPerAuthority": 
            [
              {
                "status": 
                {
                  "code": "ER_SUCCESS_MATCH"
                }, 
                "values": 
                [
                  {
                    "value": 
                    {
                      "name": "accuracy", 
                      "id": "5d6db9a1dc722586187fc2db530f8388"
                    }
                  }
                ], 
                "authority": "amzn1.er-authority.echo-sdk.amzn1.ask.skill.3030979a-a78c-4c60-8d80-739426814578.STATLIST"
              }
            ]
          }, 
          "name": "statType", 
          "value": "accuracy", 
          "confirmationStatus": "NONE"
        }
      }, 
      "name": "StatLookupIntent", 
      "confirmationStatus": "NONE"
    }, 
    "requestId": "amzn1.echo-api.request.whatever", 
    "type": "IntentRequest"
  }

The first strange thing here is the inclusion of the "resolutions" key in the request JSON. But, proceeding anyway, after I receive the request, I respond with the Dialog.Delegate response since the dialogState is not COMPLETE, as follows:

{
      "outputSpeech" : None,
      "card" : None,
      "directives" : [ {
        "type" : "Dialog.Delegate"
      } ],
      "reprompt" : None,
      "shouldEndSession" : False
}

Instead of Alexa then proceeding to prompt for the "name" slot, in the following Lambda request, I get the error:

"There is no valid prompt variation to choose to request information from the user. Please verify the dialog definition or the updated intent, if one was sent'"

For reference, here are the prompts I have to obtain both slots.

{
      "id": "Elicit.Intent-StatLookupIntent.IntentSlot-statType",
      "promptVersion": "1.0",
      "definitionVersion": "1.0",
      "variations": [
        {
          "type": "PlainText",
          "value": "Which stat would you like to look up for player"
        }
      ]
    },
    {
      "id": "Elicit.Intent-StatLookupIntent.IntentSlot-name",
      "promptVersion": "1.0",
      "definitionVersion": "1.0",
      "variations": [
        {
          "type": "PlainText",
          "value": "What is the name of the player you'd like to look up"
        },
        {
          "type": "PlainText",
          "value": "Whose stats would you like to look up"
        }
      ]
}

If you have any insight about either the dialogue error message or the presence of the resolutions/resolution authority messages in the JSON, please share :) Thanks very much.

debugginglambdaintentsapiresponse
1 comment
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Update: I made an exact copy of an intent with perfectly working Dialog Directives (AddPlayerIntent) named (AddPlayerIntentTwo) and am having this same issue as above for the new Intent.

After I send the Dialog.Delegate response, I receive an error saying "There is no valid prompt variation to choose to request information from the user. Please verify the dialog definition or the updated intent, if one was sent".

This seems to be the same issue as described here

0 Likes 0 ·
Brian@Amazon avatar image
Brian@Amazon answered

The issue you have linked to has been resolved. Let me know if you are still experiencing these issues.

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Deepu Madhusoodanan avatar image
Deepu Madhusoodanan answered
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.