Input type "AMAZON.NUMBER" must be defined in inputTypes


#1

Hi, please help me understanding the following. I tried searching for an answer but failed to do so. In my en-US.json, I have the following entry:

{
      "name": "UserOptionIntent",
      "phrases": ["{option}"],
      "inputs": [
        {
          "name": "option",
          "type": "AMAZON.NUMBER",
          "dialogflow": "@sys.given-name"
        }
      ]
    }

When I am building using jovo run, I get the following error message:
/models/en-US.json - Input type "AMAZON.NUMBER" must be defined in inputTypes


How can I define multiple slots in en-US.json
#2

try this, maybe type should be an object

{
		"name": "DurationOfSpotIntent",
	     "phrases": [
			"durata {duration}",
			"durata"
		],
		"inputs": [
			{
				"name": "duration",
				"type": {
					"alexa": "AMAZON.NUMBER",
					"dialogflow": "@sys.number"
				}
			}
		]
	},

#3

Thank you very much! I modified my code according to your above suggestion and now the model is getting compiled without error.

But, the multi slot thing I could not figure out yet. The following code

{
      "name": "ClickSummaryIntent",
      "phrases": ["{emailid}", "{newpage}"],
      "inputs": [
        {
          "name": "emailid",
          "type": {
            "alexa": "AMAZON.NUMBER",
            "dialogflow": "@sys.number"
          }
        },
        {
          "name": "newpage",
          "type": {
            "alexa": "AMAZON.NUMBER",
            "dialogflow": "@sys.number"
          }
        }
      ]
    }

compiles to

{
   "name": "ClickSummaryIntent",
   "samples": [
	"{emailid}",
	"{newpage}"
    ],
   "slots": [
        {
          "name": "emailid",
          "type": "AMAZON.NUMBER"
	},
	{
	  "name": "newpage",
	  "type": "AMAZON.NUMBER"
	}
   ]
}

I understand that if I go and create a similar intent in alexa web interface, it will generate the JSON pattern I am looking for. But the question is, what is the way to write this by hand directly on JOVO?

The above compiled JSON does not match with (this is a different skill and created directly using alexa web interface)

"name": "ParticularsIntent",
     "slots": [
     {
         "name": "firstName",
         "type": "AMAZON.US_FIRST_NAME",
              "samples": [
                  "My first name is {firstName}",
                  "First name is {firstName}",
                  "{firstName}"
              ]
     },
].

I tried the following (i.e. by adding the phrases array inside inputs) with the expectation that samples will become a part of corresponding slots but it didn’t happen. I really want to know the correct way to write it rather than generating the JSON from alexa and get it to my local. It will not tell me the way I can write it by hand and I really want to do that.

{
      "name": "ClickSummaryIntent",
      "inputs": [
        {
          "name": "emailid",
          "type": {
            "alexa": "AMAZON.NUMBER",
            "dialogflow": "@sys.number"
          },
         "phrases": ["{emailid}"]
        },
        {
          "name": "newpage",
          "type": {
            "alexa": "AMAZON.NUMBER",
            "dialogflow": "@sys.number"
          },
          "phrases": ["{newpage}"]
        }
      ]
}

I am a newbie in alexa. Please help me understanding!