{"id":13800084,"url":"https://github.com/alexa-samples/skill-sample-nodejs-petmatch","last_synced_at":"2025-05-07T04:07:47.980Z","repository":{"id":110045554,"uuid":"111736354","full_name":"alexa-samples/skill-sample-nodejs-petmatch","owner":"alexa-samples","description":"This Alexa Skill Kit sample shows how to build a skill using Dialog Management and Entity Resolution.","archived":false,"fork":false,"pushed_at":"2023-06-30T20:00:26.000Z","size":268,"stargazers_count":98,"open_issues_count":2,"forks_count":95,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-05-07T04:07:39.185Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexa-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-11-22T21:57:40.000Z","updated_at":"2025-01-15T05:52:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f3024bc-4749-4d5b-935c-790e80149e47","html_url":"https://github.com/alexa-samples/skill-sample-nodejs-petmatch","commit_stats":null,"previous_names":["alexa/skill-sample-nodejs-petmatch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexa-samples%2Fskill-sample-nodejs-petmatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexa-samples%2Fskill-sample-nodejs-petmatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexa-samples%2Fskill-sample-nodejs-petmatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexa-samples%2Fskill-sample-nodejs-petmatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexa-samples","download_url":"https://codeload.github.com/alexa-samples/skill-sample-nodejs-petmatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810273,"owners_count":21807759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:09.088Z","updated_at":"2025-05-07T04:07:47.959Z","avatar_url":"https://github.com/alexa-samples.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Build An Alexa Pet Match Skill 🇺🇸\n\u003cimg src=\"https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/quiz-game/header._TTH_.png\" /\u003e\n\n\n**NOTE:** This project uses Dialog Management. If you're looking for **Pet Match** with\n[Alexa Conversations](https://developer.amazon.com/en-US/docs/alexa/conversations/about-alexa-conversations.html) Please see: [skill-sample-nodejs-alexa-conversations-pet-match](https://github.com/alexa/skill-sample-nodejs-alexa-conversations-pet-match). Learn \nAlexa Conversations with [Tutorial: Build Multi-turn Skills with Alexa Conversations](https://developer.amazon.com/en-US/alexa/alexa-skills-kit/get-deeper/tutorials-code-samples/build-multi-turn-skills-with-alexa-conversations).\n\n## Overview\n\nIn this workshop you will create a skill called Pet Match that matches the user\nwith a pet. When launched, this Alexa Skill will prompt the user for the\ninformation it needs to determine a match. Once all of the required information\nis collected, it will send the data to an external web service which processes\nthe data and returns the match.\n\nThrough this workshop, you'll learn how to use advanced Alexa Skills Kit\nfeatures to create and configure an Alexa Skill. The features you'll\nlearn to use are Dialog Management and Entity Resolution. These features leverage\nAlexa's Automatic Speech Recognition (ASR), Natural Language Understanding (NLU),\nand Machine Learning (ML), which makes your life easier because you don't have\nto write code. You only need to provide training data to the Alexa engines via your\ninteraction model. The skill builder makes it easy to do so.\n\nTo **Get Started** click the button below:\n\n[![Get Started](https://camo.githubusercontent.com/db9b9ce26327ad3bac57ec4daf0961a382d75790/68747470733a2f2f6d2e6d656469612d616d617a6f6e2e636f6d2f696d616765732f472f30312f6d6f62696c652d617070732f6465782f616c6578612f616c6578612d736b696c6c732d6b69742f7475746f7269616c732f67656e6572616c2f627574746f6e732f627574746f6e5f6765745f737461727465642e5f5454485f2e706e67)](./instructions/voice-user-interface.md)\n\n## Additional Resources\n\n### Community\n* [Amazon Developer Forums](https://forums.developer.amazon.com/spaces/165/index.html) - Join the conversation!\n* [Hackster.io](https://www.hackster.io/amazon-alexa) - See what others are building with Alexa.\n\n### Tutorials \u0026 Guides\n* [Voice Design Guide](https://developer.amazon.com/fr/designing-for-voice/) - A great resource for learning conversational and voice user interface design.\n* [Codecademy: 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 Codecademy!\n\n### Documentation\n* [Official Alexa Skills Kit Node.js SDK](https://www.npmjs.com/package/alexa-sdk) - The Official Node.js SDK Documentation\n*  [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\n\n\n\u003c!-- # Conversation and Memory\n\n## Pet Match\n\n\u003cimg src=\"https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/quiz-game/header._TTH_.png\" /\u003e\n\n[![Part 1: Build and Customize](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/tutorial-page-marker-1-off._TTH_.png)](./instructions/1-build-and-customize.md)[![Entity Resolution](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/tutorial-page-marker-2-off._TTH_.png)](./instructions/2-entity-resolution.md)[![Memory](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/tutorial-page-marker-3-off._TTH_.png)](./instructions/3-memory.md) --\u003e\n\n\n\u003c!-- ## Pre-requistes\n\nIn order to start working on this workshop you will need:\n\n*  \u003ca href=\"https://aws.amazon.com\" target=\"_new\"\u003eAWS Account\u003c/a\u003e\n*  \u003ca href=\"https://developer.amazon.com\"\ntarget=\"_new\"\u003eAmazon Developer Account\u003c/a\u003e\n\n\n## Get Started\n\nThe workshop is composed of three parts:\n\n*  Part 1: Build and Customize Pet match\n*  Part 2: Entity Resolution\n*  Part 3: Memory\n\nEach part contains a set of tasks that act as check points, and extra credit\nthat will present a challenge that will further enhance your learning.\n\n**Note** You may use Pet Match as a starting point to build your own skill that\nneeds to collect information form the user and have processed via a web service.\nYou can customize the slots to match the data you need and change the hostname\nto the web service you need to call.\n\nIf this is your first time here, you're new to Alexa Skills Development, you're interested in the \"extra credit\", or you're looking for more detailed instructions, click the **Get Started** button below:\n\n\u003cp align='center'\u003e\n\u003ca href='./instructions/1-build-and-customize.md'\u003e\u003cimg src='https://camo.githubusercontent.com/db9b9ce26327ad3bac57ec4daf0961a382d75790/68747470733a2f2f6d2e6d656469612d616d617a6f6e2e636f6d2f696d616765732f472f30312f6d6f62696c652d617070732f6465782f616c6578612f616c6578612d736b696c6c732d6b69742f7475746f7269616c732f67656e6572616c2f627574746f6e732f627574746f6e5f6765745f737461727465642e5f5454485f2e706e67'\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\nBe sure to take a look at the [Additional Resources](#additional-resources) at the bottom of this page!\n\n\n## About\n**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/1-build-and-customize.md) for a more detailed walkthrough.\n\n### Usage\n\n```text\nAlexa, ask pet match find a pet.\n\t\u003e\u003e Welcome to pet match. I can help you find the best dog for you. What are two things you are looking for in a dog?\n\nAlexa, open pet match\n```\n\n### Repository Contents\n* `/.ask`\t- [ASK CLI (Command Line Interface) Configuration](https://developer.amazon.com/docs/smapi/ask-cli-intro.html)\t \n* `/lambda/custom` - Back-End Logic for the Alexa Skill hosted on [AWS Lambda](https://aws.amazon.com/lambda/)\n* `/models` - Voice User Interface and Language Specific Interaction Models\n* `/instructions` - Step-by-Step Instructions for Getting Started\n* `skill.json`\t- [Skill Manifest](https://developer.amazon.com/docs/smapi/skill-manifest.html)\n\n## Setup w/ ASK CLI\n\n### Pre-requisites\n\n* Node.js (\u003e v4.3)\n* Register for an [AWS Account](https://aws.amazon.com/)\n* Register for an [Amazon Developer Account](https://developer.amazon.com/)\n* Install and Setup [ASK CLI](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html)\n\n### Installation\n1. Clone the repository.\n\n\t```bash\n\t$ git clone https://github.com/alexa/skill-sample-nodejs-petmatch/\n\t```\n\n2. 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.\n\n\t```bash\n\t$ cd skill-sample-nodejs-petmatch\n\t$ ask init\n\t```\n\n3. Install npm dependencies by navigating into the `/lambda` directory and running the npm command: `npm install`\n\n\t```bash\n\t$ cd lambda/custom\n\t$ npm install\n\t```\n\n\n### Deployment\n\nASK 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.\n\n1. Deploy the skill and the lambda function in one step by running the following command:\n\n\t```bash\n\t$ ask deploy\n\t```\n\n### Testing\n\n1. To test, you need to login to Alexa Developer Console, and enable the \"Test\" switch on your skill from the \"Test\" Tab.\n\n2. Simulate verbal interaction with your skill through the command line using the following example:\n\n\t```bash\n\t $ ask simulate -l en-US -t \"alexa, start pet match\"\n\n\t ✓ Simulation created for simulation id: 4a7a9ed8-94b2-40c0-b3bd-fb63d9887fa7\n\t◡ Waiting for simulation response{\n\t  \"status\": \"SUCCESSFUL\",\n\t  ...\n\t ```\n\n3. 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 :\n\n\t```text\n\tAlexa, start pet match\n\t```\n\n## Customization\n\n1. ```./skill.json```\n\n   Change the skill name, example phrase, icons, testing instructions etc ...\n\n   Remember that many information is locale-specific and must be changed for each locale (en-GB and en-US)\n\n   See the Skill [Manifest Documentation](https://developer.amazon.com/docs/smapi/skill-manifest.html) for more information.\n\n2. ```./lambda/custom/index.js```\n\n   Modify messages, and facts from the source code to customize the skill.\n\n3. ```./models/*.json```\n\n\tChange 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.\n\n## Additional Resources\n\n### Community\n* [Amazon Developer Forums](https://forums.developer.amazon.com/spaces/165/index.html) - Join the conversation!\n* [Hackster.io](https://www.hackster.io/amazon-alexa) - See what others are building with Alexa.\n\n### Tutorials \u0026 Guides\n* [Voice Design Guide](https://developer.amazon.com/designing-for-voice/) - A great resource for learning conversational and voice user interface design.\n* [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!\n\n### Documentation\n* [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\n* [Official Alexa Skills Kit Node.js SDK](https://www.npmjs.com/package/ask-sdk) - The Official Node.js SDK Documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexa-samples%2Fskill-sample-nodejs-petmatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexa-samples%2Fskill-sample-nodejs-petmatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexa-samples%2Fskill-sample-nodejs-petmatch/lists"}