Alexa

The Alexa service provides capabilities for building your own Alexa skills!

An Alexa skill consists of some general information (such as the name to use for invocation) as well as a list of supported intents. An intent is a command or question to which the skill can respond. Intents consist of a name, list of utterances, and any required slots. Utterances are examples of how the user might phrase questions or commands. Slots are used to define placeholders for concepts like names, cities, etc.

When Alexa determines that a request was made to a given intent, the slots are resolved to their corresponding values and then passed to the “handler” for the intent.

Before using any Alexa RPCs, you will first need to register as a developer with Amazon and login to Amazon here.

After checking out the walkthroughs, feel free to check out the best practices for defining utterances.

RPCS

Alexa.createSkill(configuration: Object)

Create an Alexa Skill from a configuration.

Arguments:

  • configuration: Object info

    • name: String info - The name of the skill
    • invocation: String info - The name to use to invoke the skill (eg, “tell <invocation> to <intent>”)
    • intents: List<Intent> info - Intents (ie, commands) supported by the skill.
    • description: String? info
    • category: SkillCategory? info
    • keywords: List<String>? info
    • summary: String? info
    • examples: List<String>? info

Returns: String info - ID

Alexa.deleteSkill(ID: String)

Delete the given Alexa Skill (created within NetsBlox).

Arguments:

  • ID: String info - ID of the Alexa skill to delete
Alexa.getSkill(ID: String)

Get the configuration of the given Alexa Skill.

Arguments:

Alexa.getSkillCategories()

Get a list of all valid categories for Alexa skills.

Alexa.getSlotTypes()

Get a list of all valid slot types that can be added to an intent. For more information, check out https://developer.amazon.com/en-US/docs/alexa/custom-skills/slot-type-reference.html

Alexa.invokeSkill(ID: String, utterance: String)

Invoke the skill with the given utterance using the closest intent.

Arguments:

  • ID: String info - Alexa Skill ID to send utterance to
  • utterance: String info - Text to send to skill

Returns: String info - ID

Alexa.listSkills()

List the IDs of all the Alexa Skills created in NetsBlox for the given user.

Returns: List<String> info - IDs

Alexa.updateSkill(ID: String, configuration: Object)

Update skill configuration with the given ID.

Arguments:

  • ID: String info - ID of the skill to update

  • configuration: Object info

    • name: String info - The name of the skill
    • invocation: String info - The name to use to invoke the skill (eg, “tell <invocation> to <intent>”)
    • intents: List<Intent> info - Intents (ie, commands) supported by the skill.
    • description: String? info
    • category: SkillCategory? info
    • keywords: List<String>? info
    • summary: String? info
    • examples: List<String>? info