Alexa custom skill: getting FallbackIntent instead of validation prompt

128 views Asked by At

I have an interaction model with a GetMenuIntent which I can invoke with "what's for {meal}". meal is a MealType custom slot with allowed values of "breakfast" and "lunch". I added validation on the meal slot in my GetMenuIntent to only allow those values defined in the slot type and it works great for those configured values.

However, after saving and building my model, when I put "what's for dinner" into the Utterance Profiler or the interactive tester, It ended up calling my FallbackIntent instead of reprompting for a correct value.

I feel like what I'm trying to do isn't really much different than Amazon's own example here.

Here's "whats for lunch" working correctly:

enter image description here

And here's "whats for dinner" ignoring my GetMenuIntent and calling FallbackIntent instead:

enter image description here

Here's my interaction model:

{
  "interactionModel": {
    "languageModel": {
      "invocationName": "school menus",
      "intents": [
        {
          "name": "AMAZON.CancelIntent",
          "samples": []
        },
        {
          "name": "AMAZON.HelpIntent",
          "samples": []
        },
        {
          "name": "AMAZON.StopIntent",
          "samples": []
        },
        {
          "name": "AMAZON.NavigateHomeIntent",
          "samples": []
        },
        {
          "name": "GetMenuIntent",
          "slots": [
            {
              "name": "meal",
              "type": "Meal"
            },
            {
              "name": "date",
              "type": "AMAZON.DATE"
            }
          ],
          "samples": [
            "whats for {meal} {date}",
            "what will you have for {meal} {date}",
            "what is on the menu for {meal} {date}",
            "what are we having for {meal} {date}",
            "what we're having for {meal} {date}"
          ]
        },
        {
          "name": "AMAZON.FallbackIntent",
          "samples": []
        }
      ],
      "types": [
        {
          "values": [
            {
              "name": {
                "value": "lunch"
              }
            },
            {
              "name": {
                "value": "breakfast"
              }
            }
          ],
          "name": "Meal"
        }
      ]
    },
    "dialog": {
      "intents": [
        {
          "name": "GetMenuIntent",
          "confirmationRequired": false,
          "prompts": {},
          "slots": [
            {
              "name": "meal",
              "type": "Meal",
              "elicitationRequired": false,
              "confirmationRequired": false,
              "prompts": {},
              "validations": [
                {
                  "type": "hasEntityResolutionMatch",
                  "prompt": "Slot.Validation.806855880612.19281662909.602239253259"
                }
              ]
            },
            {
              "name": "date",
              "type": "AMAZON.DATE",
              "elicitationRequired": false,
              "confirmationRequired": false,
              "prompts": {}
            }
          ]
        }
      ],
      "delegationStrategy": "ALWAYS"
    },
    "prompts": [
      {
        "id": "Slot.Validation.806855880612.19281662909.602239253259",
        "variations": [
          {
            "type": "PlainText",
            "value": "Hmm, I don't know about that menu type. Please try again."
          }
        ]
      }
    ]
  },
  "version": "48"
}
1

There are 1 answers

1
Brad Irby On

Since this is 6 months old I assume you figured out by now that your interaction model only includes Lunch and Breakfast.