Alexa Publishing Auto and Manual

Objective

This document will demonstrate how to automatically publish a Custom App from the VoiceWorx platform to Alexa or setup the skill manually in Alexa.

Introduction

After an app is configured on the VoiceWorx platform, the platform has the inbuilt capability to publish the skill to Alexa, using the different configurations and permissions set in the publishing page of the VoiceWorx platform.

Goal

Our goal is to demonstrate that an app can be setup in the VoiceWorx channel and automatically published to Alexa verses having to manually set up the skill in the VoiceWorx platform and again manually setup in Alexa Developer Console. Auto-publish can significantly reduce the skill setup process. This document will focus on the manual process, for the auto publish steps, please consult this link here.

Steps

The following shows the general steps/activities that will be carried out in setting up this integration. Note: It is advisable to use same email for signup across the 3 channels below. Step 1 -3 below are required.

  1. Ensure you Login With Amazon (LWA) https://developer.amazon.com/alexa/console/ask account is setup by your admin. If you are the account admin, you can follow this instruction to set it up.

  2. Set up connection to the external web API

  3. Create a custom app in VoiceWorx.

  4. Create a skill in Alexa Developer Console

  5. Test the Alexa skill.

Set up connection to the external web API

  1. Login to the VoiceWorx platform, use left navigation menu and click “Integration” then select “Connect System”. In the resulting page, click “Connect External Systems”.

  1. In “Connect External System” select or do the following:

Select Integration Category: Custom

Select System Type: Rest API Service

Click: Connect System.

  1. Once in “Rest API Service Setup” select or enter the following:

System Instance Name: ContactFinder

Authorization Type: Basic Auth

Add Web API URL: https://demo.voiceworx.ai

Under Basic Auth Settings

Enter Username and Password

Click: Validate System to ensure you have access to the web API endpoint.

Click on Validate System and Click on Save after the connection is validated.

Create Custom Skill in VoiceWorx.ai

  1. To create a custom app, use left navigation menu and click “Custom Apps” then select “Manage Apps”. Then click “New Custom App”.

  1. Now add Custom Skill by doing the following:

Name: Contact Finder

Custom Skill Type: Search

Category: None

Click: Save

  1. In the top menu tabs, select “Data Sources” then “Create New Data Source”. Select or enter the following:

Name: ContactFinderDS

Integration Configuration: Rest API Service: ContactFinder (integration configured in Step 2)

Manage Connections to create the external platform WebAPI integration

Click: Save

  1. In the top menu tabs, select “Methods” then select “Create New Methods”.

Provide following details in the resulting Create Method box and click on Save.

    • Name:GetPhoneNumberByName

    • Request Type: GET

    • Query Path: ?name={{Person}}

    • Result Type: Record

    • Method Path: /api/contacts

    • Empty Result Template: Sorry the searched contact could not be found. How else can I help you?

    • Result Template: {{Person}} contact number is {{Phone}}. How else can I help you?

    • Click: Save

  1. Let’s test if the method is extracting the contact information correctly. Click on Test button.

Fill the following parameter and click on Method Test, then on Result section, click on Result tab.

Person : Martin

  1. In the top menu tabs, select “Intents” and “Create New Intent”.

Then select or enter the following:

Name: PhoneByName

Intent Type: Search

Intent Action: Execute Method

DataSource: ContactFinderDS

DataSource Method: GetPhoneNumberByName

Click: Save

  1. In the top menu tabs, select “Slots” and select “Create New Slot”.

Note the Reprompt message is what Alexa will ask if it can’t fill/resolve the person slot. Then select or enter the following:

Name: Person

Slot Order: Blank

Reprompt Message: person name?

Type: Text

Custom App: ContactFinder

Intent: PhoneByName

Click: Save

  1. In the top menu tabs, select “Utterance” and select “Create New Utterance”. Utterance are words spoken to launch specific intents.

Now input or select the following:

Value: get phone number for {Person}

Custom Skill: ContactFinder

Intent: PhoneByName

Click: Save

Important: To insert slot in an utterance, type ‘{‘and a drop-down of available slots will appear.

You can add as many utterances as you would like.

  1. In the top menu tabs, select “Input” and select “Create New Input”.Then input or select the following:

Name: Person

Custom Skill: ContactFinder

Custom Intent: PhoneByName

Data Source: ContactFinderDS

Data Source Method: GetPhoneNumberByName

You will be able to view the created input as below:

Publish to Alexa

  1. To publish to Alexa,select “Publish” in the top menu tabs then click “Add App Publishing”. Then input or select the following:

Fill the following details to create publish.

External Skill Name: ContactFinder. (This will be the name of the skill in Alexa. Therefore, make it unique and different from the names of your other skills in Alexa.)

Skill Type: Select Search

Channel: Select Alexa

Uncheck the following: Require account linking, Auto Publish

Skill Invocation Name: ContactFinder. (This will be what users say to launch your skill in Alexa. It must be in lower case alphabets cannot contain START, BEGIN, STOP, EXIT, LAUNCH and cannot contain number or special characters.)

Optional: Replace all placeholder values in all “Message”. Uncheck all the settings shown in the second image below.

Click: Save.

  1. Set the needed Alexa permissions/features for your app in VoiceWorx by checking/unchecking the setting checkboxes in the publishing page as shown below.

Click: Save.

Create a skill in Alexa Developer Console

Note: This section shows how to manually set up a skill in the Alexa Developer Console. Please not that this step can be automatically performed by publishing directly from the VoiceWorx platform. To learn how to publish directly from the VoiceWorx platform please follow this tutorial.

  1. Login to https://developer.amazon.com/alexa/console/ask with the credentials set up in step 2 above.

  2. Click “Create Skill” in the resulting page.

  3. Now do the following:

Add a Skill Name: Contact Finder.

Custom Skill: Select

Click: Create skill in top right-hand corner.

  1. On the resulting page, ensure “Start from Scratch” is selected and select “Continue with template” in top right-hand corner.

  2. A “Creating A Custom Skill” screen will appear as seen below.

  3. After the skill is built, click “Invocation” and type in a simple unique word. When Alexa hears this, it will invoke the skill. For this exercise, Type in “Contact Finder”. To invoke the skill, say “Alexa Start Contact Finder”.

  4. On the left navigation menu click “Interaction Model” then click “Intents” then click, “Add Intent”.

  5. Type “PhoneByName” in the text box and click “Create Custom Intent

  6. Add Utterances: Utterances are what the users say to invoke the intent. Utterance contain “Slots”. Slots are the unique variables in utterances. In this exercise we will add a Slot “Person” in the utterance. In the Alexa console, to add a Slot, type “{“. Once you type in “ { “ in the Utterance text box, a “Add/Create New Slot” modal shows. Add a slot named Person in the Utterance. Note: Your slot names must match what was defined in VoiceWorx.

  7. Update the “Person” Slot we just created. Make it a Slot Type “AMAZON.SEARCHQUERY”. To do this, scroll down the utterance page, to the “Intent Slots” section. In the Slot Type column, expand the Slot Type drop down and select “AMAZON.SEARCHQUERY”.

  8. Click “save” then click “Build Model”.

  9. To set the VoiceWorx endpoint in Alexa developer console do the following:

Click: Endpoint

Select: “Https endpoint

Set “Default Region”: Visit https://alexa.VoiceWorx.ai/api/v1/alexa/request and select “My Development Endpoint Is a Subdomain of a Domain that has a wildcard certificate”

Click: Save Endpoint

  1. Go to the skills list home page in Alexa Developer Console, copy the skill ID and update the Skill ID in the VoiceWorx.

  1. Go to the VoiceWorx platform (https://portal.VoiceWorx.ai/) and in the left navigation menu select “Custom App” then select “Manage Apps”. Select the “Contact Finder Skill”.

  2. Then in the top menu tabs click Publish” tab and click “Edit”.

  1. On the “Edit Skill Page”, update the External ID to the ID you copied from Alexa Developer Console then click “save”.

Test the Skill

  1. Goto Alexa Developer Console. Select “Contact Finder” Skill. Click “Test” tab in the top menu, then below “Test” tab change the skill test status from “Off” to “Development”.

  2. Invoke skill by typing the invocation name “Contact Finder” inserted in the publishing step in VoiceWorx. If the invocation is successful, your configured welcome message will be displayed in the Alexa Developer Console.

Congratulations!

You have successfully completed Alexa Publishing.

Last updated