You’ve got your ”Order Pizza” service tested and working and now you’re wondering how to deploy your service to Amazon so you can prepare it for publishing on the platform.
This tutorial will guide you through the steps.
Link your account to Amazon
Account linking is very important if you want to manage and eventually publish skills on Alexa.
The first step in account linking is the User Level Platform Configuration. It enables you to use the platform-specific API. You can view the Amazon Platform Configuration form by clicking on the Configuration menu item in the Convoworks GUI and choosing Amazon Configuration from the dropdown (Settings sub-view for the WordPress version).
As you can see, we need the Client ID, Client Secret, and Vendor ID data.
- If you don’t have an Amazon Developer account already you can find the full walkthrough in the ‘How to create an Amazon Developer account’ section of this guide.
- Log into your account then visit https://developer.amazon.com/dashboard and click on the Login with Amazon menu item. You can get the Client ID and Client Secret credentials by clicking on the Show Client ID and Client Secret if you have an existing Security Profile.
- To register a new Security Profile click on the Create a New Security Profile button. Ordinarily, you would have to provide your own, valid Privacy Notice URL, but for the sake of this tutorial just enter any website URL.
- You should also add your return URL to Allowed Return URLs. Open the Login with Amazon Console and locate your Security Profile in the Login with Amazon Configurations table. Hover over the button and select the Web Settings menu item. Once you’ve landed on the page, click the Edit button. Add your Allowed Return URLs and click Save. Here’s a link with more details: https://developer.amazon.com/docs/login-with-amazon/register-web.html
- To get your Vendor ID just visit: https://developer.amazon.com/settings/console/mycid
Now, switch back to the Convoworks GUI and fill out the Amazon Platform Configuration. Click on the Save Configurations button once you’re done.
As the last step, click on the Configuration menu item and choose Link Amazon Account from the dropdown. Sign in to your account.
Configuration for service propagation
Propagation allows Convoworks to deploy your app for you to a platform of your choosing, in this case, Amazon. The Service Level Platform Configuration manages service propagation.
To access the ”Order Pizza” service configuration first select the service from the Services view of the Convoworks Editor. Then open the Configurations menu item, scroll down and click the Configure button on an Amazon Alexa card.
This will take you to the Amazon Alexa service configuration form. Set the Mode of General Configuration to AUTO. The form is now divided into four sections: General Configuration, Amazon Alexa Skill Account Linking, and Distribution Information. Set the Interaction Model Sensitivity in the General Configuration section to Medium.
You don’t have to fill in any other data for now. Just click the Create button and the skill should be created on the Amazon developer console.
You can read more about platform configuration for Amazon and different configuration options in this guide.
Now, let’s check if the skill was created. Visit this link: https://developer.amazon.com/alexa/console/ask.
”Order Pizza” should be listed in the Alexa Skills.
Testing on Amazon
When developing skills, it’s important to create quality experience for users. Skill testing is one of the most important things you can do to provide that high-quality experience.
There are multiple options for testing your Alexa skill, but in this guide, we’ll go through the ones that allow you to test most of the functionalities of your skill. Those are the Skill simulator, Alexa app, and an Alexa device.
Alexa skill simulator is available in the developer console, on the Test page of your skill. It lets you test most of the skill’s functionality without a device.
Enable Skill I/O to see the JSON input and output. You’ll be able to see what is being sent to your skill and what’s coming back.
Enable Device Log to get help with intent debugging. The Device Log shows the list of intents that Alexa considered and discarded in the JSON response.
Let’s start testing.
Open the ”Order Pizza” skill in the Amazon developer console and navigate to the Test page. Locate the Test is disabled for this skill option and from the drop-down on the right, select Development as the skill-testing stage.
Test the skill by typing in the skill invocation in the Alexa Simulator. You can interact with the simulator with your voice, but for this tutorial, we’ll just use text. Enter “order pizza” to start testing. Check if the skill is working correctly.
Now, let’s go back to the Convoworks service editor and change the welcome text a bit.
Change the welcome text in the __sessionStart block to: “Welcome to the Order Pizza application.”. Save the change then click the Propagate to all drop-down at the top of the service page and select Amazon.
This will propagate the changes to the platform.
Switch back to Amazon’s “Order Pizza” page and test the changes in the Alexa Simulator.
You can test your skill with the Alexa app for Android/iOS. You can find the app by searching the app store on your mobile device. The Alexa app displays all of your skills currently under development, as well as all published skills.
To start testing:
- Download and the Alexa app and sign in using your developer account.
- Tap on the More button at the bottom right and select Skills & Games to check your skill
- Select Dev for skills currently in development, and select the “Order Pizza” to check if it’s enabled
- Go back to the Home screen and tap on the center button to start the utterance test. Invoke the skill by saying the skill’s invocation name
- The Alexa app should be invoked and respond back.
To test your skill with an Alexa-enabled device (such as an Amazon Echo), the device has to be registered with the same email address you used to sign up for your developer. Also, you have to make sure that the locale of your device matches at least one of the locales available for your skill.
To enable or disable the skill on the device, you have to use Alexa app for Android/ iOS or Alexa web app (https://alexa.amazon.com/). The instructions for using the Android/iOS app are in the previous section.
How to enable a skill via Alexa web app:
- Open the Alexa app and sign in using your developer account
- Click on the Skills menu item in the menu on the left
- Select Your Skills at the top right
- Type in the name of your skill
- Click on the skill and click the Enable button on the right
Now your skill can be accessed by any of the connected Alexa devices that use the same developer account.
To start testing the skill, simply invoke your skill with the wake word and your invocation name.