Default answer for unrecognized intent

Hi,
I developed a very simple Alexa Skill using the examples shown on the "Developing Alexa skill without writing any code – Part1 and Part 2 (https://backendless.com/developing-alexa-skill-without-writing-any-code-part1-codeless-in-backendless-mbaas/ and https://backendless.com/developing-an-alexa-skill-without-writing-any-code-part2-slots/).
The Skill I developed for testing is very simple. It uses the examples shown on these 2 pages but without the slots, so I only have to deal with intents. I use the “test/if true/if false” block to test for the right intent, and then on “if true” I just have a text responding on that intent, and on “if false” I have another “test/if true/if false” block that checks for a second intent, has a text responding to that intent on “if true”, and a text on “if false” saying something like “I don’t understand what you’re asking for”.
Everything works great except that, regardless of what I say, Alexa will always respond with either the “if true” response from intent 1 or intent 2, and never with the “I don’t understand…” message, even if I just say a random nonsense word after I call the skill. I even tried adding a third intent on the “if false” part of the second intent and it works fine, so it is evaluating correctly, but it still never replies with the “I don’t understand message”.
Any idea what I might be doing wrong?

Hello,

Could you post a screenshot showing the logic of your Alexa service in Backendless?

Regards,
Mark

Hi Mark,
I’ve extended the number of intents I have so hopefully these 2 snapshots show you everything you need.

The first image (Alexa1) shows how I start the API Service, sets a default answer in case no message is understood (which also has never been triggered), and then it shows how I start to check which intent the client has said.

The second image (Alexa2) shows how I check for the last intent, and how it has an “if false” message to say in case none of the intents tested for below was correct.

What I’m finding is that, whatever I say, I always get a response from one of the intents, never from this last “if false” text.

Is that an issue with this code or something setup incorrectly on the Amazon Alexa Developer site? Just in case, this is my Interaction model:
{
“intents”: [
{
“intent”: “AMAZON.CancelIntent”
},
{
“intent”: “AMAZON.HelpIntent”
},
{
“intent”: “AMAZON.StopIntent”
},
{
“intent”: “More”
},
{
“intent”: “Right”
},
{
“intent”: “NicoHungry”
},
{
“intent”: “AnythingElse”
}
]
}

Thanks!

Alexa1.png

Hi Dani,

It is rather hard to see what the problem is by looking at a partial screenshot. Would it be possible to take a screenshot of the entire logic?

Also, please specify what exactly you hear back in response to various intents?

Finally, make sure to include a screenshot of the getIntentName function.

Regards,
Mark

Hi Mark,

It was hard to get a screenshot of the whole code. It’s a little blurry but I hope it’s good enough to follow.

I’ve also attached a screenshot of the getIntentName function.

Thanks again for your help!

Hi Mark,
I wanted to confirm that the image I uploaded was clear enough. I now have a monitor with better resolution so I could take a better snapshot, if that helped.
Thanks again!

Hi Dani,

The logic looks good. Could you please let me know your app ID so I can dig in a bit further?

Regards,
Mark

Hi Mark,
This is the App ID: AFB04006-B63C-179F-FF67-9C6245621B00
Thanks!

Hi Dani,

I registered your service as a skill in my account and tried it out. It worked every time for me:

More: http://take.ms/1SE3n
Right: http://take.ms/OoFzc
NicoHungry: http://take.ms/xWmP3

How did you configure the sample utterances in your skill?

Mark

Hi Mark,
You’re right, the skill works perfectly for all the intents and the utterances I’ve defined. What doesn’t work correctly, and you can test this on that same Amazon test page, is if you try an utterance that has not been defined. Based on my logic, that should give you a message saying something like "I don’t understand what you’re asking for”, but every time I try it, it defaults to one of the defined intents, regardless of whether it has a utterance defined or not.
As an example, if I just ask Alexa to call this skill and I say a random phrase that’s not defined in my utterances it will still default to one of the intents, instead of failing all the “checked” intents in my logic and providing the last “false” message.
Thanks!

Hi Dani,

There is no problem with the codeless logic. What you’re seeing is just how Alexa works, it always tries to map the spoke utterance to an intent. See this discussion for more details: https://forums.developer.amazon.com/questions/80583/unrecognized-utterance-how-to-handle.html

Regards,
Mark

Hi Mark,
Thank you very much, that explains the behavior I’m seeing!