How to Build a Multimodal Alexa Skill

Cake Time Quick Start Instructions

These are the instructions for skill builders who have never worked with the Cake Time skill.

1. Setup Cake Time

Cake Time is a skill that celebrates your birthday! Tell it your birthday to have it count down the days. Interact with the skill on your special day to hear a happy birthday message.

On opening Cake TIme after you told Alexa your birthday, you are either greeted with a countdown to your birthday, or if it is your birthday, you get a birthday message. To set up your own Cake Time skill, follow the steps:

A. Open the developer console to the ASK page. Sign in or create an Alexa developer account if you do not yet have one.

B. Click Create skill.

C. Enter the skill name as "Cake Time." Make sure to scroll down and click Alexa-Hosted (Node.JS) below. Using the Alexa hosted environment means we do not need an AWS account.

toggle apl image

D. Upload the interaction model from here to your skill. This is easy to do from the build tab. Copy paste the raw GitHub JSON into the "JSON Editor" which you can find on the left side.

E. Build your interaction model with the Build Model button.

F. For the code, switch to the Code tab in the developer console.

G. Replace the contents of index.js with the contents in Github from here.

H. Replace the contents of the package.json file with the contents in Github from here.

I. Save and deploy the code.

J. Go to the test tab and enable the skill in "Development" stage.

K. Test the skill by typing open cake walk into the Alexa Simulator text box.

L. When this is all working (you will see JSON in the request and response), you have finished setting up Cake Time!

2. Testing Cake Time

Cake Time has two different LaunchRequest handlers: One which is invoked when there is no context while the other is invoked when your birthday is known. Our skill knows the birthday when it is saved into S3.

To delete what is in S3:

A. Access the S3 provision for your Alexa hosted skill by going to the Code tab.

B. On the left you will see: Media storage: S3…​. Click this.

interfaces click image

C. On the S3 page, click the skill ID: amzn1-ask-skill-…​.

D. Delete the document that starts with "amzn1.ask.account…​".

An alternative way to test without deleting user data is to fire a one shot intent to reset the day, month, and year values. For instance, "Alexa, tell Cake Time that I was born on <month> <day> <year>". This will let you easily set the birthday to today to test when it is your birthday or to a different day to test the non-birthday scenario. We will be building different visuals for each.