0

I am trying to create an Alexa skill which basically redirects any user input to my Web API, which generates the response. In other words, I don't want to use Alexa's built-in NLP engine.

For that purpose, I am trying to obtain the value of the AMAZON.LITERAL slot which is supposed to return the exact value of the user's input.

I have created an intent called Other and also created a slot named literal of type AMAZON.LITERAL. I added about 10 possible values to that slot, which are examples of what the user can say. I tried adding those examples both as normal text and in the form of {ask my_skill_name for their address|literal}.

When I test it, the response JSON recognizes the right intent Other, but the literal slot does not have a property named value, which it is supposed to have. So I can't get the user's input.

How can I obtain the full user's input or what am I doing wrong?

Relevant part of the response JSON:

"request": {
        "type": "IntentRequest",
        "requestId": "amzn1.echo-api.request.718cae5d-b45c-4774-ae9d-b72120ce8564",
        "timestamp": "2018-04-27T06:19:38Z",
        "locale": "en-US",
        "intent": {
            "name": "Other",
            "confirmationStatus": "NONE",
            "slots": {
                "literal": {
                    "name": "literal",
                    // Where is the `value`?
                    "confirmationStatus": "NONE"
                }
            }
        }
    }

1 Answers1

0

OK, I found it.

When you train your only intent, in my case the intent called Other, you have to type phrases in this format instead of plain text:

{my example phrase|literal}

Where literal is the name of the AMAZON.LITERAL slot that you created.