Upload Alexa Slot Types via API

Viewed 755

Is there anyway of uploading Custom Slot Types values via an API, so that you do not need to type them in manually using the new Alexa Skill Builder interface (if you have many of them):

enter image description here

I haven't found anything.

6 Answers

My recommendation is to get the model via SMAPI first, edit the json file with your new values and update it via SMAPI again.

ask api get-model -s "enter your skill id here" --stage development -l en-US > model.json

in the model.json file you can see the slots definition. Change it (with a script or manually) and update the model again

Reference to both commands:

In the left bar bellow the "Intents" and "Slot" is the option "JSON Editor". There you can write a JSON for the new intents you want to add.

Example without slot type

    {
      "name":"YesIntent",
      "samples":[
          "Yes",
          "Yeah",
          "I do",
          "I am"
      ]
    }

Example with slot type

    {
      "name":"NumberIntent",
      "slots":[
          {
            "name":"number",
            "type":"AMAZON.NUMBER"
          }
      ],
      "samples":[
          "{number} is my number",
          "{number}",
          "my number is {number}"
      ]
    }
Related