From ae6524e3ccd57db29eca8211224cdedde49e0bf0 Mon Sep 17 00:00:00 2001 From: Jake Kelly Date: Wed, 13 Dec 2017 15:15:16 -0700 Subject: [PATCH] Restructure for current standards --- .ask/config | 19 + README.md | 153 +++++--- instructions/0-intro.md | 73 ++++ .../1-voice-user-interface.md | 0 instructions/2-lambda-function.md | 56 +++ .../3-connect-vui-to-code.md | 0 {step-by-step => instructions}/4-testing.md | 0 .../5-customization.md | 0 .../6-publication.md | 0 ...ction-model.json => interaction-model.json | 0 {src => lambda/custom}/index.js | 0 {src => lambda/custom}/package.json | 0 models/en-US.json | 336 ++++++++++++++++++ step-by-step/2-lambda-function.md | 61 ---- 14 files changed, 587 insertions(+), 111 deletions(-) create mode 100644 .ask/config create mode 100644 instructions/0-intro.md rename {step-by-step => instructions}/1-voice-user-interface.md (100%) create mode 100644 instructions/2-lambda-function.md rename {step-by-step => instructions}/3-connect-vui-to-code.md (100%) rename {step-by-step => instructions}/4-testing.md (100%) rename {step-by-step => instructions}/5-customization.md (100%) rename {step-by-step => instructions}/6-publication.md (100%) rename speech-assets/interaction-model.json => interaction-model.json (100%) rename {src => lambda/custom}/index.js (100%) rename {src => lambda/custom}/package.json (100%) create mode 100644 models/en-US.json delete mode 100644 step-by-step/2-lambda-function.md diff --git a/.ask/config b/.ask/config new file mode 100644 index 0000000..59a39fb --- /dev/null +++ b/.ask/config @@ -0,0 +1,19 @@ +{ + "deploy_settings": { + "default": { + "skill_id": "", + "was_cloned": false, + "merge": { + "skillManifest": { + "apis": { + "custom": { + "endpoint": { + "uri": "ask-custom-myradio-default" + } + } + } + } + } + } + } +} diff --git a/README.md b/README.md index 69d8cb7..820a1c3 100644 --- a/README.md +++ b/README.md @@ -3,78 +3,131 @@ [![Voice User Interface](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/1-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/1-voice-user-interface.md)[![Lambda Function](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/2-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/2-lambda-function.md)[![Connect VUI to Code](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/3-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/3-connect-vui-to-code.md)[![Testing](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/4-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/4-testing.md)[![Customization](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/5-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/5-customization.md)[![Publication](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/6-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/6-publication.md) - +# Get started -## What You Will Learn +The idea behind this new sample app is pretty simple. Wouldn’t it be cool if there was a way you could look up the contact information for people by just asking Alexa? -In addition to the concepts listed below, the guide will walk you through the basics of how to build the skill using [AWS Lambda](http://aws.amazon.com/lambda), and the [Alexa Skills Kit (ASK)](https://developer.amazon.com/alexa-skills-kit). +If this is your first time here, you're new to Alexa Skills Development, or you're looking for more detailed instructions, click the **Get Started** button below: -* Introduction to the new [Alexa Skill Builder](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/ask-define-the-vui-with-gui) (Beta) JSON schema -* Voice User Interface (VUI) design -* Skill certification -* Session attributes (to maintain context) -* State management -* SSML +

+ +

-### New Tips and Tricks -As with any sample code, the idea here is also to encourage you to learn and explore new skill building concepts. Here are some new tips and tricks you’d be able to learn using the Team Lookup skill: +Be sure to take a look at the [Additional Resources](#additional-resources) at the bottom of this page! -1. Using the new [Alexa Skill Builder](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/ask-define-the-vui-with-gui) to build the interaction model. -2. **Searching** a given dataset based with a given query. -3. Using **session attributes** effectively to - - 1. Store **"last speech"** messages, so when the user asks information to be repeated, you can pull it from the session attributes. - 2. Add context by storing **"last search"** results in the session attributes. This enables contextual followup questions like “what’s his twitter”, or “give me her linkedin”. - 3. Store **"last intent"** for other logic processing when knowing what the user last requested is important. -4. Sending **cards with images** to the Alexa companion app -5. **Randomize help messages** so there’s a bit of variety. -6. **New helper functions** (Slow Spell,Pronouns, Random help message generator, and more) -7. **Extending Custom Slots** -8. Using custom slots for **commonly used phrases** to reduce the number of sample utterances, making the interaction model easier to maintain. +## About +**Note:** The rest of this readme assumes you have your developer environment ready to go and that you have some familiarity with CLI (Command Line Interface) Tools, [AWS](https://aws.amazon.com/), and the [ASK Developer Portal](https://developer.amazon.com/alexa-skills-kit). If not, [click here](./instructions/0-intro.md) for a more detailed walkthrough. -## What You Will Need -* [Amazon Developer Portal Account](http://developer.amazon.com) -* [Amazon Web Services Account](http://aws.amazon.com/) -* The sample code on [GitHub](https://github.com/alexa/skill-sample-nodejs-team-lookup). -* Simple graphical editing tool (to create an icon for your skill) -## What Your Skill Will Do -An Alexa skill built using the Alexa Node SDK, that lets you find information about Alexa Evangelists and Solutions Architects. +### Usage -The idea behind this new sample app is pretty simple. Wouldn’t it be cool if there was a way you could look up the contact information for people by just asking Alexa? +```text +Alexa, ask Quizgame to start a quiz. + >> OK. I will ask you 10 questions about the United States. + +Alexa, start Quiz Game +``` + +### Repository Contents +* `/.ask` - [ASK CLI (Command Line Interface) Configuration](https://developer.amazon.com/docs/smapi/ask-cli-intro.html) +* `/lambda/custom` - Back-End Logic for the Alexa Skill hosted on [AWS Lambda](https://aws.amazon.com/lambda/) +* `/models` - Voice User Interface and Language Specific Interaction Models +* `/instructions` - Step-by-Step Instructions for Getting Started +* `skill.json` - [Skill Manifest](https://developer.amazon.com/docs/smapi/skill-manifest.html) + +## Setup w/ ASK CLI + +### Pre-requisites + +* Node.js (> v4.3) +* Register for an [AWS Account](https://aws.amazon.com/) +* Register for an [Amazon Developer Account](https://developer.amazon.com/) +* Install and Setup [ASK CLI](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html) + +### Installation +1. Clone the repository. + + ```bash + $ git clone https://github.com/alexa/skill-sample-nodejs-quiz-game/ + ``` + +2. Initiatialize the [ASK CLI](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html) by Navigating into the repository and running npm command: `ask init`. Follow the prompts. + + ```bash + $ cd skill-sample-nodejs-quiz-game + $ ask init + ``` + +3. Install npm dependencies by navigating into the `/lambda` directory and running the npm command: `npm install` + + ```bash + $ cd lambda/custom + $ npm install + ``` + + +### Deployment + +ASK CLI will create the skill and the lambda function for you. The Lambda function will be created in ```us-east-1 (Northern Virginia)``` by default. + +1. Deploy the skill and the lambda function in one step by running the following command: + + ```bash + $ ask deploy + ``` + +### Testing + +1. To test, you need to login to Alexa Developer Console, and enable the "Test" switch on your skill from the "Test" Tab. + +2. Simulate verbal interaction with your skill through the command line using the following example: + + ```bash + $ ask simulate -l en-US -t "alexa, start quiz game" + + ✓ Simulation created for simulation id: 4a7a9ed8-94b2-40c0-b3bd-fb63d9887fa7 + ◡ Waiting for simulation response{ + "status": "SUCCESSFUL", + ... + ``` + +3. Once the "Test" switch is enabled, your skill can be tested on devices associated with the developer account as well. Speak to Alexa from any enabled device, from your browser at [echosim.io](https://echosim.io/welcome), or through your Amazon Mobile App and say : -The sample data included with this template for instance lets you search for Alexa Evangelists and Solutions Architects by city, and their first/last names. So, you could say “find me an evangelist in Seattle”, and it would respond with the name of the evangelist/s, along with their Twitter, LinkedIn, and GitHub handles. + ```text + Alexa, start quiz game + ``` +## Customization -**Here are some things you can say** - -1. Alexa, ask team lookup to find me an evangelist in seattle -2. Alexa, ask team lookup who is dave -3. Alexa, ask team lookup for amit’s twitter handle +1. ```./skill.json``` + Change the skill name, example phrase, icons, testing instructions etc ... -## How the Template is Laid Out -The code for the template is laid out in four sections: + Remember that many information is locale-specific and must be changed for each locale (en-GB and en-US) -1. **Data and text strings:** (Replace this data with your own): The first section includes the data and the text strings that you can replace with your data to customize your skill, and include information about your team. -2. **Skill code - Intent Handlers:** The second section is the core part of the code that makes the skill work. This includes all the intent handlers, and any other supporting functions. Feel free to explore this section, while you try to understand how things work, but be careful as editing this section may break your skill. -3. **Generating speech:** The third section includes all the functions that generate the output speech, or what Alexa says back to the user. -4. **Helper functions:** Finally, the fourth section includes some helper functions. These are functions that perform one very specific small task. These are written in a way that they can be reused in any skill. Just copy/paste them in to your skill, and use away. You can find more of these + See the Skill [Manifest Documentation](https://developer.amazon.com/docs/smapi/skill-manifest.html) for more information. -## Make It Your Own -You can replace the sample data included in this template, and make it your own. See the [customization](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/5-customization.md) section for more details and ideas on how. +2. ```./lambda/custom/index.js``` -**Scenario 1 - just replace the data, and publish:** Imagine you are a real estate company, and you'd like to enable your customers, and prospects to be able to find a local agent by just talking to Alexa. You can take this template, replace it with your data, and then publish it. Then anyone with access to an Alexa device can just say - “*Alexa, ask my broker to find me an agent in New York*”. + Modify messages, and facts from the source code to customize the skill. -**Scenario 2 - replace the data, and use it privately:** The first scenario entails publishing your skill and making it available in the Alexa skills store. But you could also use your skill privately to look up information for your friends and family: "*Alexa, ask people finder what's jessica's twitter handle*" +3. ```./models/*.json``` -**Scenario 3 - replace the data, add more features, and publish:** Finally, you can also use the sample code as a base and build up - say, by adding more information types like email and Instagram handles. You could also add search by geolocation, so it would return results for people who are currently in a given city. + Change the model definition to replace the invocation name and the sample phrase for each intent. Repeat the operation for each locale you are planning to support. +## Additional Resources -We can't wait to see what you build. Let us know if you have any questions/feedback at [@AlexaDevs](https://twitter.com/alexadevs). +### Community +* [Amazon Developer Forums](https://forums.developer.amazon.com/spaces/165/index.html) - Join the conversation! +* [Hackster.io](https://www.hackster.io/amazon-alexa) - See what others are building with Alexa. -
- +### Tutorials & Guides +* [Voice Design Guide](https://developer.amazon.com/designing-for-voice/) - A great resource for learning conversational and voice user interface design. +* [CodeAcademy: Learn Alexa](https://www.codecademy.com/learn/learn-alexa) - Learn how to build an Alexa Skill from within your browser with this beginner friendly tutorial on CodeAcademy! - +###Documentation +* [Official Alexa Skills Kit Node.js SDK](https://www.npmjs.com/package/alexa-sdk) - The Official Node.js SDK Documentation +* [Official Alexa Skills Kit Documentation](https://developer.amazon.com/docs/ask-overviews/build-skills-with-the-alexa-skills-kit.html) - Official Alexa Skills Kit Documentation diff --git a/instructions/0-intro.md b/instructions/0-intro.md new file mode 100644 index 0000000..1606658 --- /dev/null +++ b/instructions/0-intro.md @@ -0,0 +1,73 @@ +## What You Will Learn + +In addition to the concepts listed below, the guide will walk you through the basics of how to build the skill using [AWS Lambda](http://aws.amazon.com/lambda), and the [Alexa Skills Kit (ASK)](https://developer.amazon.com/alexa-skills-kit). + +* Introduction to the new [Alexa Skill Builder](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/ask-define-the-vui-with-gui) (Beta) JSON schema +* Voice User Interface (VUI) design +* Skill certification +* Session attributes (to maintain context) +* State management +* SSML + +### New Tips and Tricks +As with any sample code, the idea here is also to encourage you to learn and explore new skill building concepts. Here are some new tips and tricks you’d be able to learn using the Team Lookup skill: + + +1. Using the new [Alexa Skill Builder](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/ask-define-the-vui-with-gui) to build the interaction model. +2. **Searching** a given dataset based with a given query. +3. Using **session attributes** effectively to - + 1. Store **"last speech"** messages, so when the user asks information to be repeated, you can pull it from the session attributes. + 2. Add context by storing **"last search"** results in the session attributes. This enables contextual followup questions like “what’s his twitter”, or “give me her linkedin”. + 3. Store **"last intent"** for other logic processing when knowing what the user last requested is important. +4. Sending **cards with images** to the Alexa companion app +5. **Randomize help messages** so there’s a bit of variety. +6. **New helper functions** (Slow Spell,Pronouns, Random help message generator, and more) +7. **Extending Custom Slots** +8. Using custom slots for **commonly used phrases** to reduce the number of sample utterances, making the interaction model easier to maintain. + + +## What You Will Need +* [Amazon Developer Portal Account](http://developer.amazon.com) +* [Amazon Web Services Account](http://aws.amazon.com/) +* The sample code on [GitHub](https://github.com/alexa/skill-sample-nodejs-team-lookup). +* Simple graphical editing tool (to create an icon for your skill) + +## What Your Skill Will Do + +An Alexa skill built using the Alexa Node SDK, that lets you find information about Alexa Evangelists and Solutions Architects. + +The idea behind this new sample app is pretty simple. Wouldn’t it be cool if there was a way you could look up the contact information for people by just asking Alexa? + +The sample data included with this template for instance lets you search for Alexa Evangelists and Solutions Architects by city, and their first/last names. So, you could say “find me an evangelist in Seattle”, and it would respond with the name of the evangelist/s, along with their Twitter, LinkedIn, and GitHub handles. + + +**Here are some things you can say** - +1. Alexa, ask team lookup to find me an evangelist in seattle +2. Alexa, ask team lookup who is dave +3. Alexa, ask team lookup for amit’s twitter handle + + +## How the Template is Laid Out +The code for the template is laid out in four sections: + +1. **Data and text strings:** (Replace this data with your own): The first section includes the data and the text strings that you can replace with your data to customize your skill, and include information about your team. +2. **Skill code - Intent Handlers:** The second section is the core part of the code that makes the skill work. This includes all the intent handlers, and any other supporting functions. Feel free to explore this section, while you try to understand how things work, but be careful as editing this section may break your skill. +3. **Generating speech:** The third section includes all the functions that generate the output speech, or what Alexa says back to the user. +4. **Helper functions:** Finally, the fourth section includes some helper functions. These are functions that perform one very specific small task. These are written in a way that they can be reused in any skill. Just copy/paste them in to your skill, and use away. You can find more of these + +## Make It Your Own +You can replace the sample data included in this template, and make it your own. See the [customization](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/5-customization.md) section for more details and ideas on how. + +**Scenario 1 - just replace the data, and publish:** Imagine you are a real estate company, and you'd like to enable your customers, and prospects to be able to find a local agent by just talking to Alexa. You can take this template, replace it with your data, and then publish it. Then anyone with access to an Alexa device can just say - “*Alexa, ask my broker to find me an agent in New York*”. + +**Scenario 2 - replace the data, and use it privately:** The first scenario entails publishing your skill and making it available in the Alexa skills store. But you could also use your skill privately to look up information for your friends and family: "*Alexa, ask people finder what's jessica's twitter handle*" + +**Scenario 3 - replace the data, add more features, and publish:** Finally, you can also use the sample code as a base and build up - say, by adding more information types like email and Instagram handles. You could also add search by geolocation, so it would return results for people who are currently in a given city. + + +We can't wait to see what you build. Let us know if you have any questions/feedback at [@AlexaDevs](https://twitter.com/alexadevs). + + + + + diff --git a/step-by-step/1-voice-user-interface.md b/instructions/1-voice-user-interface.md similarity index 100% rename from step-by-step/1-voice-user-interface.md rename to instructions/1-voice-user-interface.md diff --git a/instructions/2-lambda-function.md b/instructions/2-lambda-function.md new file mode 100644 index 0000000..b4137ce --- /dev/null +++ b/instructions/2-lambda-function.md @@ -0,0 +1,56 @@ +# Build An Alexa Team Lookup Skill +[![Voice User Interface](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/1-locked._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-audio-player/blob/master/single-stream/instructions/1-voice-user-interface.md)[![Lambda Function](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/2-on._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-audio-player/blob/master/single-stream/instructions/2-lambda-function.md)[![Connect VUI to Code](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/3-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-audio-player/blob/master/single-stream/instructions/3-connect-vui-to-code.md)[![Testing](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/4-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-audio-player/blob/master/single-stream/instructions/4-testing.md)[![Customization](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/5-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-audio-player/blob/master/single-stream/instructions/5-customization.md)[![Publication](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/6-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-audio-player/blob/master/single-stream/instructions/6-publication.md) + +## Setting Up A Lambda Function Using Amazon Web Services + +In the [first step of this guide](https://github.com/alexa/skill-sample-nodejs-audio-player/blob/master/single-stream/instructions/1-voice-user-interface.md), we built the Voice User Interface (VUI) for our Alexa skill. On this page, we will be creating an AWS Lambda function using [Amazon Web Services](http://aws.amazon.com). You can [read more about what a Lambda function is](http://aws.amazon.com/lambda), but for the purposes of this guide, what you need to know is that AWS Lambda is where our code lives. When a user asks Alexa to use our skill, it is our AWS Lambda function that interprets the appropriate interaction, and provides the conversation back to the user. + +1. **Go to http://aws.amazon.com and sign in to the console.** If you don't already have an account, you will need to create one. [If you don't have an AWS account, check out this quick walkthrough for setting it up](https://github.com/alexa/alexa-cookbook/tree/master/aws/set-up-aws.md). + + + +2. **Click "Services" at the top of the screen, and type "Lambda" in the search box.** You can also find Lambda in the list of services. It is in the "Compute" section. + + + +3. **Check your AWS region.** AWS Lambda only works with the Alexa Skills Kit in two regions: US East (N. Virginia) and EU (Ireland). Make sure you choose the region closest to your customers. + + + +4. **Click the "Create a Lambda function" button.** It should be near the top of your screen. (If you don't see this button, it is because you haven't created a Lambda function before. Click the blue "Get Started" button near the center of your screen.) + + + +5. **There are two boxes labeled "Author from scratch" and "Blueprints". Click the radio button in the box titled "Blueprints" then choose the blueprint named "alexa-skill-kit-sdk-factskill".** We have created a blueprint as a shortcut to getting everything set up for your skill. You can search for a blueprint using the provided search box. This blueprint adds the alexa-sdk to your Lambda function so that you don't have to upload it yourself. + + + +6. **Configure your function.** This screen is where we will enter the important parts of our Lambda function. These values will only ever be visible to you, but make sure that you name your function something meaningful. "teamLookupSkill" is sufficient if you don't have another idea for a name. + + + +7. **Set up your Lambda function role.** If you haven't done this before, we have a [detailed walkthrough for setting up your first role for Lambda](https://github.com/alexa/alexa-cookbook/tree/master/aws/lambda-role.md). If you have done this before, set your **Existing role** value to "lambda_basic_execution." + + + +8. **Click Create Function in the bottom right corner.** You will need to scroll down to find **Create Function.** + + + +9. **After you create the function, the ARN value appears in the top right corner. Copy this value for use in the next section of the guide.** + + + +10. **Configure your trigger.** Look at the column on the left called "Add triggers", and select Alexa Skills Kit from the list. If you don't see Alexa Skills Kit in the list, jump back to step #3 on this page. + + + + Once you have selected Alexa Skills Kit, scroll down and click the **Add** button. Then click the **Save** button in the top right. You should see a green success message at the top of your screen. Now, click the box that has the Lambda icon followed by the name of your function (teamLookupSkill if you used our suggestion) and scroll down to the field called "Function code". + +7. **Copy and paste the [provided code](https://github.com/alexa/skill-sample-nodejs-team-lookup/lambda/src/index.js) into the Lambda function code box.** We have provided the code for this skill on [GitHub](https://github.com/alexa/skill-sample-nodejs-team-lookup/lambda/src/index.js). Delete the contents of the code box, and paste the contents of the new code. +Click "Save". + +

+ + + diff --git a/step-by-step/3-connect-vui-to-code.md b/instructions/3-connect-vui-to-code.md similarity index 100% rename from step-by-step/3-connect-vui-to-code.md rename to instructions/3-connect-vui-to-code.md diff --git a/step-by-step/4-testing.md b/instructions/4-testing.md similarity index 100% rename from step-by-step/4-testing.md rename to instructions/4-testing.md diff --git a/step-by-step/5-customization.md b/instructions/5-customization.md similarity index 100% rename from step-by-step/5-customization.md rename to instructions/5-customization.md diff --git a/step-by-step/6-publication.md b/instructions/6-publication.md similarity index 100% rename from step-by-step/6-publication.md rename to instructions/6-publication.md diff --git a/speech-assets/interaction-model.json b/interaction-model.json similarity index 100% rename from speech-assets/interaction-model.json rename to interaction-model.json diff --git a/src/index.js b/lambda/custom/index.js similarity index 100% rename from src/index.js rename to lambda/custom/index.js diff --git a/src/package.json b/lambda/custom/package.json similarity index 100% rename from src/package.json rename to lambda/custom/package.json diff --git a/models/en-US.json b/models/en-US.json new file mode 100644 index 0000000..c84412a --- /dev/null +++ b/models/en-US.json @@ -0,0 +1,336 @@ +{ + "interactionModel": { + "languageModel": { + "invocationName": "team lookup", + "intents": [ + { + "name": "AMAZON.CancelIntent", + "samples": [] + }, + { + "name": "AMAZON.HelpIntent", + "samples": [ + "how do I search" + ] + }, + { + "name": "AMAZON.NoIntent", + "samples": [] + }, + { + "name": "AMAZON.RepeatIntent", + "samples": [ + "repeat that", + "say that again", + "can you say that again", + "please repeat" + ] + }, + { + "name": "AMAZON.StartOverIntent", + "samples": [ + "startover", + "new search", + "search again" + ] + }, + { + "name": "AMAZON.StopIntent", + "samples": [] + }, + { + "name": "AMAZON.YesIntent", + "samples": [] + }, + { + "name": "SearchByCityIntent", + "samples": [ + "who is in {cityName} ", + "find me an evangelist in {cityName} ", + "find me someone in {cityName} ", + "{cityName} ", + "{cityName} evangelist" + ], + "slots": [ + { + "name": "cityName", + "type": "AMAZON.US_CITY", + "samples": [] + } + ] + }, + { + "name": "SearchByInfoTypeIntent", + "samples": [ + "{whatPhrase} {firstName} {lastName} {infoType}", + "{whatPhrase} {lastName} {infoType}", + "{whatPhrase} {firstName} {infoType} handle", + "{whatPhrase} {firstName} {infoType} username" + ], + "slots": [ + { + "name": "firstName", + "type": "AMAZON.US_FIRST_NAME", + "samples": [] + }, + { + "name": "lastName", + "type": "LAST_NAME", + "samples": [] + }, + { + "name": "infoType", + "type": "LIST_OF_INFO_TYPES", + "samples": [] + }, + { + "name": "whatPhrase", + "type": "WHAT_PHRASE", + "samples": [] + } + ] + }, + { + "name": "SearchByNameIntent", + "samples": [ + "{firstName}", + "{lastName}", + "{firstName} {lastName}", + "{whoPhrase} {firstName} ", + "{whoPhrase} {firstName} {lastName} ", + "{whoPhrase} {lastName} ", + "{whatPhrase} {firstName} {lastName} {infoType} username", + "{whatPhrase} {infoType} for {firstName} ", + "{whatPhrase} {firstName} {lastName} {infoType} handle" + ], + "slots": [ + { + "name": "firstName", + "type": "AMAZON.US_FIRST_NAME", + "samples": [] + }, + { + "name": "lastName", + "type": "LAST_NAME", + "samples": [] + }, + { + "name": "infoType", + "type": "LIST_OF_INFO_TYPES", + "samples": [] + }, + { + "name": "whoPhrase", + "type": "WHO_PHRASE", + "samples": [] + }, + { + "name": "whatPhrase", + "type": "WHAT_PHRASE", + "samples": [] + } + ] + }, + { + "name": "TellMeMoreIntent", + "samples": [ + "contact info", + "tell me more", + "more details" + ], + "slots": [] + }, + { + "name": "TellMeThisIntent", + "samples": [ + "{whatPhrase} her {infoType} handle", + "{whatPhrase} her {infoType} username", + "{whatPhrase} {infoType} username", + "{whatPhrase} his {infoType} handle", + "tell me his {infoType} username", + "tell me her {infoType} handle" + ], + "slots": [ + { + "name": "infoType", + "type": "LIST_OF_INFO_TYPES", + "samples": [] + }, + { + "name": "whatPhrase", + "type": "WHAT_PHRASE", + "samples": [] + } + ] + } + ], + "types": [ + { + "name": "AMAZON.US_FIRST_NAME", + "values": [ + { + "name": { + "value": "paul" + } + }, + { + "name": { + "value": "jeff" + } + }, + { + "name": { + "value": "memo" + } + }, + { + "name": { + "value": "rob" + } + }, + { + "name": { + "value": "dave" + } + }, + { + "name": { + "value": "amit" + } + }, + { + "name": { + "value": "liz" + } + }, + { + "name": { + "value": "dean" + } + } + ] + }, + { + "name": "LAST_NAME", + "values": [ + { + "name": { + "value": "cutsinger" + } + }, + { + "name": { + "value": "blankenburg" + } + }, + { + "name": { + "value": "doring" + } + }, + { + "name": { + "value": "mccauley" + } + }, + { + "name": { + "value": "isbitsky" + } + }, + { + "name": { + "value": "palermo" + } + }, + { + "name": { + "value": "jotwani" + } + }, + { + "name": { + "value": "myers" + } + }, + { + "name": { + "value": "bryen" + } + }, + { + "name": { + "value": "gilbert" + } + } + ] + }, + { + "name": "LIST_OF_INFO_TYPES", + "values": [ + { + "name": { + "value": "twitter" + } + }, + { + "name": { + "value": "git hub" + } + }, + { + "name": { + "value": "linkedin" + } + }, + { + "name": { + "value": "github" + } + } + ] + }, + { + "name": "WHAT_PHRASE", + "values": [ + { + "name": { + "value": "what is" + } + }, + { + "name": { + "value": "what's" + } + }, + { + "name": { + "value": "give me" + } + }, + { + "name": { + "value": "tell me" + } + } + ] + }, + { + "name": "WHO_PHRASE", + "values": [ + { + "name": { + "value": "find" + } + }, + { + "name": { + "value": "who is" + } + } + ] + } + ] + } + } +} diff --git a/step-by-step/2-lambda-function.md b/step-by-step/2-lambda-function.md deleted file mode 100644 index f55a050..0000000 --- a/step-by-step/2-lambda-function.md +++ /dev/null @@ -1,61 +0,0 @@ -# Build An Alexa Team Lookup Skill -[![Voice User Interface](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/1-locked._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/1-voice-user-interface.md)[![Lambda Function](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/2-on._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/2-lambda-function.md)[![Connect VUI to Code](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/3-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/3-connect-vui-to-code.md)[![Testing](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/4-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/4-testing.md)[![Customization](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/5-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/5-customization.md)[![Publication](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/6-off._TTH_.png)](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/6-publication.md) - - - -## Setting Up A Lambda Function Using Amazon Web Services - -In the [first step of this guide](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/step-by-step/1-voice-user-interface.md), we built the Voice User Interface (VUI) for our Alexa skill. On this page, we will be creating an AWS Lambda function using [Amazon Web Services](http://aws.amazon.com). You can [read more about what a Lambda function is](http://aws.amazon.com/lambda), but for the purposes of this guide, what you need to know is that AWS Lambda is where our code lives. When a user asks Alexa to use our skill, it is our AWS Lambda function that interprets the appropriate interaction, and provides the conversation back to the user. - -1. **Go to http://aws.amazon.com and sign in to the console.** If you don't already have an account, you will need to create one. [If you don't have an AWS account, check out this quick walkthrough for setting it up](/set-up-aws.md). - - - -2. **Click "Services" at the top of the screen, and type "Lambda" in the search box.** You can also find Lambda in the list of services. It is in the "Compute" section. - - - -3. **Check your AWS region.** AWS Lambda only works with the Alexa Skills Kit in two regions: US East (N. Virginia) and EU (Ireland). Make sure you choose the region closest to your customers. - - - -4. **Click the "Create a Lambda function" button.** It should be near the top of your screen. (If you don't see this button, it is because you haven't created a Lambda function before. Click the blue "Get Started" button near the center of your screen.) - - - -5. **Choose the blueprint named "alexa-skill-kit-sdk-factskill".** We have created a blueprint as a shortcut to getting everything set up for your skill. You can search for a blueprint using the provided search box. This blueprint adds the alexa-sdk to your Lambda function so that you don't have to upload it yourself. - - - -6. **Configure your trigger.** Click in the dashed box, and select Alexa Skills Kit from the list. If you don't see Alexa Skills Kit in the list, jump back to step #3 on this page. - - - - Once you have selected Alexa Skills Kit, click the **Next** button. - -7. **Configure your function.** This screen is where we will enter the important parts of our Lambda function. These values will only ever be visible to you, but make sure that you name your function something meaningful. "teamLookupSkill" is sufficient if you don't have another idea for a name. - - - -8. **Copy and paste the [provided code](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/src/index.js) into the Lambda function code box.** We have provided the code for this skill on [GitHub](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/src/index.js). Delete the contents of the code box, and paste the contents of the new code. - -9. **Set up your Lambda function role.** If you haven't done this before, we have a [detailed walkthrough for setting up your first role for Lambda](https://github.com/alexa/skill-sample-nodejs-team-lookup/blob/master/lambda-role.md). If you have done this before, set your **Existing role** value to "lambda_basic_execution." - - - -10. **For this guide, you can skip all of the Advanced settings.** Click the **Next** button to move to the Review screen. - - - -11. **The Review screen is a summary of your choices. Click Create Function in the bottom left corner.** You will need to scroll down to find **Create Function.** - - - -12. **After you create the function, the ARN value appears in the top right corner. Copy this value for use in the next section of the guide.** - - - -

- - -