To add Amazon Alexa as a channel to your Kore.ai bot, you must extract supported Dialog Tasks of this bot from the Configurations tab and add to your Amazon Alexa’s Skills. Additionally, you must configure your bot’s Webhook URL as your Alexa Skill Set’s Service Endpoint for the platform to receive messages.
Note: Alexa as a channel must be enabled for bots that are specifically built to work on voice-based channels. Review the following constraints before enabling Alexa as a channel for this bot:
- Enterprise bots that require the user’s authorization to communicate with the bot are not supported.
- If your dialog tasks require the user’s authorization to communicate with external systems, then the platform will push a card with URL information to the Alexa app.
- Intents and entities of only Published Dialog Tasks can be exported to Amazon Alexa. Ensure that your intents and entities adhere to the naming guidelines of Amazon Alexa.
- Not all entity types available in the Kore.ai platform are currently available in Alexa. Verify that your tasks contain Alexa-supported entities for optimal user experience.
- Ensure that your dialog tasks contain one or more utterances.
- If you want to display bot response as templates on supported devices like Echo Show, you must define channel-specific responses/prompts.
- Ensure that your dialog tasks contain the Bot Message node as the last node only. Alexa marks a task as completed if a bot message is displayed without expecting any input from the user.
- Webhook Nodes work asynchronously and are currently not supported.
- Amazon Alexa executes one task at a time and hence Hold & Resume functionality is not supported.
To add the Amazon Alexa channel to your bot, you must:
- Add a New Skill – To enable the Alexa channel to your Kore.ai bot, create a new Alexa skill in the Amazon developer console.
- Configure Interaction Model – Alexa skill can be built in one of the following ways:
- Dialog Migration to extract the dialog tasks from Kore.ai and import them into Amazon Alexa’s Skills. This will entail re-import for reflecting ongoing changes in the dialog definition. Intent detection and execution are primarily controlled by Alexa.
- Redirection to create a single intent in your skill with one SearchQuery slot that accepts user inputs and redirects them to your Kore.ai bot. Intent detection and execution are primarily controlled by the Kore.ai bot.
- Enable Account Linking – To access end user’s authentication details to make API calls to external services. This step is optional.
- Enable Webhook Integration – To integrate Amazon Alexa with your Kore.ai bot, enable webhook integration by copying the Webhook URL provided on the Configurations tab of the Amazon Alexa Channel page in the bot builder and select HTTPS as Service Endpoint type.
- Enable Channel – After completing the integration setup, enable the channel.
- Test Integration – Once the channel is enabled, to validate a successful integration, test any intent utterance using the Test tab of your Alexa Skill and check its responses for the given test utterances.
- Publishing Information, Privacy & Compliance, and Certification – You must publish your Alexa Skill on Alexa App and provide details for Privacy and Compliance to enable Skills Beta Testing that allows you to invite your co-developers to test your app. You must also submit your Skill to Amazon for certification to enable your skill to become visible on Alexa Skills on Amazon App Store after it is certified.
To add the Amazon Alexa Channel, follow these steps:
- In the Bots section of the Bot Builder, click the bot you want to add the Amazon Alexa channel to.
- Click on the Deploy tab to go to the Channels page.
- In the Channels page, click the Amazon Alexa icon under Voice Channels. The Amazon Alexa Channel page is displayed.
- In a new browser tab, log in to your Amazon Alexa Skills Portal.
- You will be taken to the Alexa Skills Kit page. Click the Console button.
Note:To enable the Alexa channel, you must have an Amazon Developer account or register for a new account.
- Alexa Skills page is displayed. You can access the existing skills or click the Create Skill button to create a new one.
- In the Create a new skill page, enter the required information in the respective fields.
- Custom model needs to be added to your skill as illustrated below.
- Select the Alexa-hosted(Node.js) method to be added to your skill as illustrated below.
- Click Create Skill and select the Start from Scratch template, then click Continue with Template.
- Enter the captcha and click Submit. An Amazon Alexa voice skill will be processed and created.
- On clicking Submit, the following message is displayed.
- Upon skill creation, the following page is displayed.
- From the Interaction Model tab in the left navigation pane, you can add intents, annotations, check the Intent History and Utterance Conflicts.
- Go to JSON Editor under the Interaction Model.
- In the JSON Editor page, you can define the intents and entities to be associated with your newly created skill. For this, go to the bot builder and click Amazon Alexa under Configured Channels in the Channels page of your bot.
- Click the Download File button to download the JSON file containing intents and entities of all the supported dialogs in this bot.
- Click Confirm in the following pop-up window. The json file is downloaded in your local directory.
- Go back to the JSON Editor section of your alexa skill. Copy paste the content or drag and drop the JSON file.
- Review to ensure that there are no errors in your code and click Save Model. Once the skill is successfully saved without errors, click Build Model.
Note:
It takes 2-5 mins for the Model to build. Any changes implemented in the built model would be reflected only by rebuilding the model. - To enable webhook integration, click the Endpoint in the left navigation, select HTTPS as the Service Endpoint Type.
- Copy the Webhook URL provided in the Configurations tab of the Amazon Alexa in the Channels page of the bot builder and enter it in the Default Region field of the Endpoint page of Alexa Console.
- In the Select SSL certificate type drop-down, choose the option My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority.
- Click Save Endpoints to save the changes.
- From the top menu bar you can go to the Test tab to test your skill.
- Before you can start testing your bot on Alexa, you must complete the channel setup. Go to the Configurations tab of the Amazon Alexa channel page, review the details and select Yes; click Save to enable Amazon Alexa Channel.
- You can use the Test tab of your Alexa Skill to test your utterances against the integration. In the Test tab, go to the Alexa Simulator section and provide any intent utterance and click Ask <skill-name> to test the utterance.
If you get a successful response then the integration is considered a success. - Go to the Distribution tab, provide all the required details for publishing your Alexa Skill on Alexa App and click Save and continue.
- You will be taken to the Privacy & Compliance page, provide all the required details and click Save and Continue.
- You will be taken to the Availability page, where the Beta Test option is enabled and this allows you to invite your co-developers to test your app.
- Fill the required details and click Save and Continue.
- You will be taken to the Validation page under the Certification tab. Click Run to validate your skill.
- On successful validation and certification, your skill will be visible on Alexa Skills on Amazon App Store.
Edit Amazon Alexa Channel
To edit the Amazon Alexa channel, follow these steps:
- Hover over the channel to modify, and then click the Settings icon to display the command menu as shown in the following image.
Select one of the following commands to modify the channel:
- Disable/Enable – Click Disable to temporarily disable the use of the Amazon Alexa for your bot. To enable the use of the Amazon Alexa channel, Click Enable.
- Delete – Click Delete. On the Delete Confirmation dialog box, click OK to permanently delete the bot channel configuration.