0
votes

Hopefully someone can help me with this because I've been stumped for a week.

I am creating a simple Alexa skill from one of the samples. It's the color picker skill - you tell Alexa your favorite color, and then you ask her your favorite color. I'm using Custom Slots, and the Skill Service doesn't want to return a value for the color. It launches successfully, and then loads the correct intent, however it doesn't send the correct value. Instead, there's not even a value parameter in the output, just name and confirmation status.

Here's my skill's JSON, followed by the request JSON output after I tell the skill: "My color is red." I want the skill to pass "red" into the value parameter.

{
"interactionModel": {
    "languageModel": {
        "invocationName": "color picker",
        "intents": [
            {
                "name": "MyColorIsIntent",
                "slots": [
                    {
                        "name": "color",
                        "type": "LIST_OF_COLORS"
                    }
                ],
                "samples": [
                    "my color is {color}",
                    "{color} is my color"
                ]
            },
            {
                "name": "WhatsMyColorIntent",
                "slots": [],
                "samples": [
                    "what's my color",
                    "what's my favorite color"
                ]
            },
            {
                "name": "AMAZON.NavigateHomeIntent",
                "samples": []
            }
        ],
        "types": [
            {
                "name": "LIST_OF_COLORS",
                "values": [
                    {
                        "name": {
                            "value": "green"
                        }
                    },
                    {
                        "name": {
                            "value": "red"
                        }
                    },
                    {
                        "name": {
                            "value": "yellow"
                        }
                    },
                    {
                        "name": {
                            "value": "orange"
                        }
                    },
                    {
                        "name": {
                            "value": "black"
                        }
                    },
                    {
                        "name": {
                            "value": "blue"
                        }
                    }
                ]
            }
        ]
    }
}
}

Down below is the request:

"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.918d6da6-cd7e-4bb8-a2a9-41fb1af8a354",
"timestamp": "2018-10-01T01:53:56Z",
"locale": "en-US",
"intent": {
    "name": "MyColorIsIntent",
    "confirmationStatus": "NONE",
    "slots": {
        "Color": {
            "name": "Color",
            "confirmationStatus": "NONE"
        }
    }
}
}
2
I got the slot value correctly with both your sample utterances using the interaction model shared.johndoe
See answer below. Turned out I had more than one Alexa skill with the same invocation name. Thanks.Jeffery Gough

2 Answers

0
votes

Your issue is that slot "color" should be named "Color" and your sample references changed to reflect this so "my color is {Color}", and "{Color} is my color", It is not picking up the slot because the name is identical. Be sure to also complete the skill with the required Intents for stop and help, currently, this will just continue asking for color choices until you kill the program.

0
votes

​This is what happened: I was working on different versions of the same skill, each with the same invocation name. When I typed in the invocation name, it actually opened an outdated version of the skill (I hadn't deleted the old skills - I had like 3 different ones - I like to start over). I didn't realize that when you click "test" you can test any of your saved skills, not just the one you have open.