Jacob Houston
Jacob Houston

Reputation: 5

Intent immediately defaults to FallbackIntent, even with incredibly specific utterance

the utterance
the slot being used

the testing screen

the intent in my lambda function:

var phoneNumber;    
"getPhoneNumberIntent": function() {
    phoneNumber = this.event.request.intent.slots.phoneNumber.value;
    if (getLength(phoneNumber) === 10) {
        this.response.speak('I heard <say-as interpret-as="telephone"> ' + phoneNumber + '</say-as>. Is this the correct number?').listen();
        this.emit(':responseReady');
    } else {
        console.log(phoneNumber);
        this.response.speak('That is not a valid phone number. Please try again.').listen();

    }
},

When I type in the incredibly specific utterance, The only thing in the output JSON is null. and in the input, the proper intent wasn't even being called. I have not seen a problem similar to mine on the website, I've looked high and low. Any help or feedback is appreciated.

Upvotes: 0

Views: 154

Answers (1)

johndoe
johndoe

Reputation: 4387

Use predefined AMAZON.NUMBER as the slot type for phoneNumber.

While testing numbers in Alexa Test Simulator, represent them as words

Ex: the phone number is nine eight seven six five four three two one zero

And for abbreviations use period "."

Ex: The code is a.w.e.

Upvotes: 1

Related Questions