Amazon Honeycode

Objective

This document will demonstrate how easy it is to integrate Amazon Honeycode to the VoiceWorx platform and create methods to pull data.

Pre-requisites

  • An active AWS Account

You should have an active AWS Account. If you do not have it, you can create an AWS account at https://portal.aws.amazon.com/billing/signup#/start

AWS Accounts Include 12 Months of Free Tier Access

  • An active Honeycode Account

You should have an active Amazon Honeycode account. If you do not have an account, please follow the steps below:

  1. Goto https://www.honeycode.aws and click on “TRY FOR FREE” button.

  1. It should take you to the screen below. Fill out the relevant details and complete the registration process. You will receive an email asking to confirm the email address. Click on the link provided and you are

  1. Once the registration is complete, login to your honeycode account and you should land to the screen below:

  1. To get AWS Account ID, login to AWS console. On the top menu bar, click on your account name. You will find your Account ID under “My Account” submenu. Copy it.

  1. Now go back to your honeycode “Connect AWS Account” screen and paste it.

  1. Now you need to approve it on AWS Console.

  1. Go to AWS Console, search for “HoneyCode” and you will land to HoneyCode teams page where you can see the pending request. Select the teams account, click on “Actions” and click on “Approve connection”. Follow the instructions to approve the connection.

  1. Once you are connected, you will see AWS Account connected section on Teams page as shown below:

  1. To integrate with Voiceworx, you need to create one workbook on honeycode. Go to My Apps in the left navigation and Click on Create Workbook.

  1. Click on “Create workbook” button on the landing page and a popup will appear. Click “Start from Scratch”. You will be asked to put a name for workbook. Type “Contact Database” and click on “Create” button.

  1. You will be prompted to create a table. On the topbar, rename “Table1” as “Contacts”. Rename/Create column names as below:

    • Fullname

    • Phone

    • Address

  1. You can also enter a sample data in the workbook as this.

  1. Now you need to create an App for the workbook you created. For that click “Builder” menu on the left and click on “+” sign to create a new App.

  1. Click Build from scratch

  1. You will see an app interface as below:

  1. Now you will need two things to be able to connect your voiceworx with honeycode.

    1. WorkbookId

    2. AWS Credentials (App Key, App Secret and region)

  2. To obtain WorkbookId, goto app screen you just created. Right click on the screen and click on “Get ARN and IDs”.

Copy the Workbook ID from popup and note it down as shown below:

  1. To obtain AWS credentials for Honeycode, goto AWS console, search for “IAM” and click on IAM service.

You will land to IAM Dashboard. Click on “Users” link. You will be redirected to users list page.

On users list page click on “Add User” button as provide the details below.

User Name: “honeycodeuser

Access Type: Tick “Programmatic access”.

Click: “Next: Permissions

Click “Attach existing policies directly

Search for “honeycode

Tick “AmazonHoneycodeFullAccess

Click “Next: Tags

Click “Next: Review

Click “Create User

Now you will be able to access “Access Key ID” and “Secret access key”. Click “Download .csv” and store it safely.

Congratulations! You are now have everything to be able to connect to Honeycode with Voiceworx. Follow the steps below:

Steps

To proceed with these steps, you should have all the pre-requisites satisfied. If you are missing something, please go back and make sure you satisfy all of them.

Once done, you are ready to get started using VoiceWorx platform with Honeycode.

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 compulsory.

  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 Salesforce

  3. Create a custom skill in Voiceworx.

  4. Publish the skill

  5. Test the Alexa skill.

Setup connection to Honeycode

Login to the VoiceWorx portal at https://portal.voiceworx.ai

To Configure Honeycode, browse to: Integration > Connect System. Click on Add New Connection.

On the resulting pop up.On “Select Integration Category” dropdown, choose “Custom” and on “Select System Type” dropdown, choose “Amazon Honeycode” and click on “CONNECT SYSTEM” button as shown below:

Once you click on “Connect System” button, you will be redirected to the “Amazon Honeycode Instance Configuration” page and fill in the details as shown below.

Service Instance Name: “Amazon Honeycode

Consumer Key: Use “Access Key ID” from the csv file you downloaded.

Consumer Secret: Use “Secret Access Key” from the csv file you downloaded.

Region: “us-west-2

Click: “VALIDATE AND SAVE SETTINGS

You will be notified whether your connection is successful or not. If successful, you should see “Amazon Honeycode” integration in the list as shown below.

Create a custom App in Voiceworx

To create an app, browse to Custom Apps > Manage Apps and click on “Create New Custom App“ button, you should see a small popup screen as shown below.

Add Custom Skill by doing the following:

Name: Honeycode

Custom Skill Type: Search

Category: Default

Click: Save.

You should see a screen as shown below:

Create a Data Source

A Data Source connects the Skill with the integration. Once you have a skill created, you can go to Data Sources either by clicking on “Setup Data Source” or by clicking on “Data Sources” tab.

To create a data source, click on “Create New Data Source” button and you should see a popup screen as shown below

Add DataSoure by doing the following:

Name: Honeycode DS

Integration Configuration: Amazon Honeycode : Amazon Honeycode (make sure to select the previous integration created)

Click: Save.

Create Methods to interact with Honeycode

Methods allows you to fetch data from Honeycode tables and insert data.

As of the publication date of this document, the VoiceWorx platform supports following Honeycode methods,

  1. Search Table Data

  2. Query Table Data

  3. Batch Create Table Rows

  4. List Tables

  5. List Tables data

Depending on your requirement, you will have to use an appropriate method. This document will explain one methods with an example and rest of methods will be on the appendix section.

Let’s start with a use case.

Scenario/ Use Case (Contact Finder):

You are using Honeycode to store all the contact details of your friends and family members or contacts of your organization.

You want to find phone number of your friend Sam. Just create one record in Honeycode table you create using the name Sam. For this, you can use Query Table Data method as explained below.

Method: QueryTableData

This method requires just one parameter as explained below.

Parameters:

Parameter

Sample Value

Info

FilterFormula

=Filter(Contacts,"Contacts[FullName]=""{{FullName}}""")

This is a standard Honeycode filter formula query which you can use in different ways. Make sure that you include the ‘=’ sign as well for the sample value.

Other than these two parameters, you need to provide following standard inputs

Parameter

Info

Method Name

You can give any name. This name will be displayed in the methods list.

Request Type

QueryTableData

This is the method that you are using

Parameters

As explained in the previous table

Result Type

ListOfRecords (Auto Selected)

It indicates that the method can return one or more records

Record Limit

Numeric value (e.g. 10)

If Method is returning larger number of records, then you can limit this result by providing this value.

Record JsonPath

Each method returns data in json format and to pick any specific information from the json, we need to specify the Record JsonPath so Voice Worx platform will pick that data in consideration while displaying results.

Example: $.[*]

This selects all the records that is returned.

Empty Result Template

When the method does not return any data, this response will be generated. So we can specify something like:

“Sorry, I could not find the contact details”

Record Template

Let’s assume that the following json represents one record.

[

{

"FullName": "Sandeep",

"Phone": "9851032937",

"Address": "Kathmandu, Nepal"

}

]

In this example, Phone is at root level and can be accessed by {{Phone}}

So record template can be written as

Phone number of {{FullName}} is {{Phone}}

So, when a method is executed, this will be displayed as,

Phone number of Sandeep is 9851032937

Note:

Anything written in between {{ }} is represented as a json field and it’s case-sensitive.

{{Phone}} is not same as {{phone}}

Result Template

This indicates how method results should be represented.

Here you go, {{Records}}

Here, {{Records}} represents one or more records separated by a separator.

Sample Response:

[

{

"FullName": "Sandeep",

"Phone": "9851032937",

"Address": "Kathmandu, Nepal"

}

]

L,90k

After you’ve successfully completed the method, you can test to check the method functionality. Click on Save and Test, provide the parameters and click on Test. You shall see results as shown below:

Create Intents

In the top menu tabs, select “Intents” and “Create New Intent”. Then select or enter the following:

Name: FindDataIntent

Intent Type: Search

Intent Action: Execute Method

DataSource: Honeycode DS

DataSource Method: FindData

Click: Save

Create Slots

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: FullName

Slot Order: 1

Reprompt Message: what’s the contact name

Type: Full name

Custom Skill: Honeycode

Intent: SearchContactIntent

Click: Save

Create Utterance

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: find phone number of {FullName}

Custom Skill: Amazon HoneyCode

Intent: SearchContactIntent

Click: Save

Create Input

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

Name: FindDataInput

Custom Skill: Amazon Honeycode

Custom Intent: FindDataIntent

Data Source: Honeycode DS

Data Source Method: FindDataMethod

After the input has been created, we have to create Input Parameters against every slot in the method.

Add new Input Parameter and add the following details.

Publish to Alexa

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

External Skill Name: Contact Finder Honeycode Skill. (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: Search

Channel: Alexa

Skill Invocation Name: contact finder demo. (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.)

Uncheck the following: Require account linking, Auto Publish

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

Click: Save

.

In the top menu tabs select “Publish” then click “Publish to Alexa”.

Once in Publish Skill to Amazon Alexa select and do the following:

Selected Skill: Contact Finder Honeycode skill

Select Amazon Account: LWA Config

Select the LWA account setup by your admin or the one you set up in step 4 above.

Click: Publish To Alexa

On the resulting screen, ensure that a success message shows for the publishing steps before clicking the “Go To Alexa Skill”. If success message not shown, click “Go To Skill Publishing” to fix any issue shown in publishing result.

On the Alexa skill page, ensure “Full Build Successful” message is shown in bottom right corner before starting to test skill.

Go to “test” tab in the top menu, then below “test” tab change the skill test status from “Off” to “Development”.

Invoke skill by typing “open” followed by invocation name “contact finder demo” inserted in the publishing step in Voiceworx. If the invocation is successful, your configured welcome message will be displayed in the developer console.

Try with an utterance that you created. “find a contact”. You should see a response like one below, if your honeycode table has some data.

Congratulations!

You have successfully completed building a Custom Skill and publishing to Alexa.

Last updated