You can integrate your KB with private Alexa for Business skills to allow your users to ask their Alexa devices for updates on content in your KB. Custom skills can be designed for most basic operations, such as creating, updating, and deleting records, searching and reading data from existing records, counting records, and running actions.
To integrate with Alexa, first develop an Alexa skill for your business needs and then connect it to your KB in the Alexa Extension wizard. After you connect a skill to your KB, you can map system contacts with individual users to integrate their Alexa devices with the KB. Actions taken by an Alexa device are attributed to these users, or to the default user assigned in the integration settings, as a backup.
This integration requires an Alexa for Business account for your organization, and a developer account to handle skill creation. If you run on your own server, that server must be accessible online; must accept HTTP requests on port 443; and must support HTTP over SSL/TLS, using an Amazon-trusted certificate. Your web service's domain name must be in the Subject Alternative Names (SANs) section of the certificate. |
When you first set up your integration, you need to create an Alexa skill, link it to your KB, link your KB users to your Alexa users, and configure the skill itself.
To integrate with Alexa, you need to first create the Alexa skill you want to run with your system. At this stage, simply create and save an empty skill to generate a skill ID. Make sure to choose a blank template when prompted.
Refer to Amazon documentation if you need additional guidance on creating an Alexa skill.
When you've created one skill, integrate that skill with .
First, find the ID of the skill in the Alexa Developer Console:
Now that you have the skill ID, you can integrate it with your system:
You can connect users across systems to give users access to the correct records and information when they use Alexa.
With the skill linked to your KB, you need to finish creating the skill so it works. You can use this sample skill to compare to your own skills for syntax and structure: demo-skill.json
This section contains a general outline about how to create Alexa skills, and tips for working specifically with integration. For more details and guidance on working with Alexa skills, refer to the Amazon documentation. |
To set up your skill:
There are two supported methods for designing your intents:
[TableName]_[FieldName]_[Intent]
. FieldName is not always necessary, but TableName is necessary for all the supported intents. Note that logical table and field names should be converted from the default formatting, lowercase with underscores between words, to no underscores with the first letter of each word capitalized, so company_document becomes CompanyDocument.Use only the intent name and require the table and field information in slots. This makes the skill more flexible, but it increases the likelihood of Alexa acting on the wrong system location, or misunderstanding the user's request.
For more information about intents and slots, refer to the Amazon documentation. |
When you've determined your approach, name your intent, using[TableName]_[FieldName]_[Intent]
or simply the Intent name. Choose one of the intents supported by integration.
With the intent defined, you can proceed to defining slots for your skill. Some slots can be resolved with pre-defined Alexa slot types, such as defining an ID slot using the AMAZON.NUMBER slot type. Dates can use AMAZON.DATE, and text inputs can use AMAZON.SearchQuery. However, AMAZON.SearchQuery is not appropriate for all text inputs because it sends parsed text from the user request, which might not be an exact match for choices and linked fields. If possible, provide a custom slot type for choices and linked fields, including possible values and value IDs from .
If you chose not to use the prefix naming method for your Intents, make sure to accommodate table and field names in your slots. When those elements are accounted for, consider the recommended slots for your chosen intent, as well.
When you finish creating all the slots for your skill, configure the dialog settings for each slot:
Each intent also requires utterances. These are phrases that help Alexa recognize intent and slot values by defining common styles of phrasing expected from users. There aren't specific rules for utterances, but each supported intent provides examples. You can also refer to Amazon documentation for best practices.
For example, consider these four sample utterances for an UpdateFieldIntent: If a user tells Alexa to "update contract 100 to Expired," it uses Contract_Wfstate_UpdateFieldIntent with slot values id = 100 and wfstate = Expired. |
For skills, you need to set the Dialog Delegation Strategy to "disable auto delegation."
In the Permissions section, enable Customer Name and select the Full Name option. Also enable Customer Email Address. These are used to access the user's email and link the user to their corresponding account. When a user launches the skill, they are asked to give consent to share this information.
With these components complete, finish up your skill:
https://{host}/extension/alexa/connect/alexa/{KBID}
It's critical to enter your endpoint URL correctly. If you encounter problems testing your skill, double-check the endpoint URL entered here. |
When everything is ready, submit your skill. This process can take several hours. After the skill is submitted and verified, you can enable it for your organization. These steps are required every time you make changes to your skill.
You can test your skill in the Test tab, including the current published version and the working version, if you have changes under development. This tab can show you user requests, server responses, and device logs. When you test in-development versions, make sure to save and build your skill model before testing.
This section details each supported Alexa intent, including suggested slots and utterance examples.
This intent is designed to create records. Prefix naming is not required.
Prefix Naming: {TableName}_CreateRecordIntent. For example, Contract_CreateRecordIntent.
Slots:
Utterance examples for Contract_CreateRecordIntent:
Utterance examples for CreateRecordIntent:
Response:
{table} {id} created. For example, "contract 101 created." The record ID is saved in the Alexa session.
This intent is designed to read a record's field value. Prefix naming is recommended.
Prefix Naming: {TableName}_{Field}_ReadFieldIntent. For example, Contract_Wfstate_ReadFieldIntent.
Slots:
Utterance examples for Contract_Wfstate_ReadFieldIntent:
Utterance examples for Contract_ReadFieldIntent:
Utterance examples for ReadFieldIntent:
Response:
{table} {id} {field} is {value}. For example, "contract 101 status is Draft." The record ID is saved in the Alexa session.
This intent is designed to update a field in a record. Prefix naming is recommended.
Prefix Naming: {TableName}_{Field}_UpdateFieldIntent. For example, Contract_Wfstate_UpdateFieldIntent.
Slots:
Utterance examples for Contract_Wfstate_UpdateFieldIntent:
Utterance examples for Contract_UpdateFieldIntent:
Confirmation:
The user will have to confirm the request. Alexa will ask: “I will change {table} {id} {field} to {value}. Is this correct?”
Response:
{table} {id} updated. For example, "contract 101 updated." The record ID is saved in the Alexa session.
This intent is designed to delete table records. Prefix naming is not required.
Prefix Naming: {TableName}_DeleteRecordIntent. For example, Contract_DeleteRecordIntent.
Slots:
Utterance examples for Contract_DeleteRecordIntent:
Utterance examples for DeleteRecordIntent:
Confirmation:
The user will have to confirm the request. Alexa will ask: “I will remove {table} {id}. Is this correct?”
Response:
{table} {id} removed. For example, "contract 101 removed."
This intent is designed to count records by filter. Prefix naming is not required.
Prefix Naming: {TableName}_{Field}_ CountRecordsIntent. For example, Contract_Wfstate_CountRecordsIntent.
Slots:
Utterance examples for Contract_Wfstate_CountRecordsIntent:
Utterance examples for Contract_CountRecordsIntent:
Response:
There are {count} records in {table} Table with {field} {filter}. For example, "There are 10 records in contracts Table with status Draft."
This intent is designed to apply actions to records. Prefix naming is not required.
Prefix Naming: {TableName}_{Action}_ActionIntent. For example, Contract_Cancel_ActionIntent.
Slots:
Utterance examples for Contract_Cancel_ActionIntent:
Utterance examples for Contract_ActionIntent:
Response:
Action applied. The record ID is saved in the Alexa session.
This intent is designed to work with saved searches. Prefix naming is not required.
Prefix Naming: {TableName}_{SearchName}_SavedSearchIntent. For example, Contracts_MyDrafts_SavedSearchIntent.
Slots:
Utterance examples for Contracts_MyDrafts_ SavedSearchIntent:
Response:
Found {table} {ids}. For example, "Found contracts 101, 102."
This intent is designed to copy records. Prefix naming is not required.
Prefix Naming: {TableName}_CopyRecordIntent. For example, Contract_CopyRecordIntent.
Slots:
Utterance examples for Contract_CopyRecordIntent:
Utterance examples for CopyRecordIntent:
Response:
{table} {id} created. For example, "contract 101 created." The record ID is saved in the Alexa session.