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 (Object)

    • name: String (String) - The name of the skill

    • invocation: String (String) - The name to use to invoke the skill (eg, “tell <invocation> to <intent>”)

    • intents: List<Intent> (List | Intent) - Intents (ie, commands) supported by the skill.

    • description: String? (String)

    • category: SkillCategory? (SkillCategory)

    • keywords: List<String>? (List | String)

    • summary: String? (String)

    • examples: List<String>? (List | String)

Returns: String (String) - ID

Alexa.deleteSkill(ID: String)

Delete the given Alexa Skill (created within NetsBlox).

Arguments:

  • ID: String (String) - 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 (String) - Alexa Skill ID to send utterance to

  • utterance: String (String) - Text to send to skill

Returns: String (String) - ID

Alexa.listSkills()

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

Returns: List<String> (List | String) - IDs

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

Update skill configuration with the given ID.

Arguments:

  • ID: String (String) - ID of the skill to update

  • configuration: Object (Object)

    • name: String (String) - The name of the skill

    • invocation: String (String) - The name to use to invoke the skill (eg, “tell <invocation> to <intent>”)

    • intents: List<Intent> (List | Intent) - Intents (ie, commands) supported by the skill.

    • description: String? (String)

    • category: SkillCategory? (SkillCategory)

    • keywords: List<String>? (List | String)

    • summary: String? (String)

    • examples: List<String>? (List | String)