To add Amazon Alexa as a channel to your Kore.ai bot, you need to extract supported Dialog Tasks of this bot from Configurations tab and add to your Amazon Alexa’s Skills. Additionally, you also need to 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 should ideally be enabled for bots that are specifically built to work on voice-based channels. Please review the following constraints before enabling Alexa as a channel for this bot:
- Enterprise Bots that require user’s authorization to communicate with the bot are not supported.
- If your dialog tasks require user’s authorization to communicate with external systems, then the platform will push a card with URL information to Alexa app.
- Intents and entities of only Published Dialog tasks can be exported to Amazon Alexa. Do ensure that your intents and entities adhere to naming guidelines of Amazon Alexa.
- Not all entity types available in Kore.ai platform are currently available in Alexa. Do verify that your tasks contain Alexa supported entities for optimal user experience.
- Do ensure that your dialog tasks contain one or more utterances.
- If you would like to display bot response as templates on supported devices like Echo Show, you will need to define channel specific responses/prompts.
- Do ensure that your dialog tasks contain 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 are not supported.
- Amazon Alexa executes one task at a time and hence ‘Hold & Resume’ functionality will not be supported.
To add the Amazon Alexa channel to your Bot, you will need to:
- Add a New Skill- To enable 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 is primarily controlled by Alexa.
- Redirection to create a single intent in your skill with one SearchQuery slot that would accept user inputs and redirect them to your Kore.ai bot. Intent detection and execution is primarily controlled by the Kore.ai bot.
- Enable Account Linking – To access end user’s authentication details for making API calls to external services. This step is optional.
- Enable Webhook Integration- To setup Amazon Alexa integration to 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, you need to enable the channel.
- Test Integration- Once the channel is enabled, to validate a successful integration, you can 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 will need to publish your Alexa Skill on Alexa App and provide details for Privacy and Compliance to enable ‘Skills Beta Testing’ that will allow you to invite your co-developers to test your app. You will also need to 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
- In the Bots section of the Bot Builder, click the Bot to which you want to add the Amazon Alexa channel.
- On the Channels tab, click the Amazon Alexa icon. The Amazon Alexa Channel page gets displayed.
- In a new browser tab, login to your Amazon Developer portal and navigate to Alexa tab. Choose Skills from Your Alexa Console and click Create Skill. To enable the Alexa channel, you must have or register for an Amazon Developer account beforehand.
- In Create a New Alexa Skill section, enter the required information in the respective fields. If you would like to display templates on Alexa supported devices, select Yes for Render Template option in the Global Fields section as shown in the illustration. Click Save to save your details to create a new skill and then Next to proceed.
- Now, from the Interaction Model tab, select Launch Skill Builder. You will be redirected to Dashboard section of Skill Builder. Select Code Editor tab from the navigation panel.
- In Code Editor, you need to define the intents and entities to be associated with your newly created skill. For this, navigate to Configurations tab of the Amazon Alexa channel page in the bot builder and download the JSON file containing intents and entities of all supported dialogs in this bot. Navigate back to the Code Editor section in Developer console and Upload the JSON file and click Apply Changes.
- Review and ensure that there are no errors in your code and click on Save Model and then click on Build Model.
Note: It takes 2-5 mins for the Model to be built. Any changes implemented to the built model should be followed by rebuilding the model.
- To enable webhook integration, you need to click on Configuration tab to navigate back to Developer Console.In the Global Fields – Endpoint section, select HTTPS as the Service Endpoint Type. Copy the Webhook URL provided in the Configurations tab of Amazon Alexa channel page in the bot builder and enter in the Default textbox. Click on Next to save changes and to navigate to SSL Certificate tab.
- In the ‘SSL Certificate’ tab, select the option ‘My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority’. Click on Next to save changes and to navigate to Test tab.
- Before you can start testing your bot on Alexa, you would need to complete the channel setup. Navigate to the ‘Configurations’ tab of the Amazon Alexa channel page, review the details and Select Yes and click on Save to enable Amazon Alexa Channel.
- Once done, you can now use the Test tab of your Alexa Skill to test your utterances against the integration. In the ‘Test’ tab,navigate to Service Simulator section and provide any intent utterance and click on Ask <skill-name> to test the utterance. If you get a successful response then the integration can be considered as success.
- Now, navigate to Publishing Information tab and provide all the required details for publishing your Alexa Skill on Alexa App and Save the details.
- Next, navigate to Privacy & Compliance tab and provide all the required details requested and click on Save. After completing these steps, Skills Beta Testing option will be enabled and this will allow you to invite your co-developers to test your app.
- When you are ready to submit your Skill to Amazon, click on Submit for Certification. Your skill will be visible on Alexa Skills on Amazon App Store after it is certified.
Editing the Amazon Alexa Channel
To edit the Amazon Alexa channel, hover your mouse over the channel to modify, and then click the Settings icon to display the command menu as shown in the following illustration.
Select one of the following commands to modify the channel:
- Disable/Enable – Click Disable to temporarily disable use of the Amazon Alexa for your Bot.To enable use of the Amazon Alexa channel, Click Enable.
- Delete – Click Delete, and then click OK in the Delete Confirmation dialog to permanently delete the Bot channel configuration.
Warning: This operation is permanent, and cannot be undone.