Domain App using Internal Data

Goal

Our goal is to help users explore the functionality of the ixHello platform without requiring integrations with any external platform. We will create a Lex App named “Retail Demo”. Retail Demo is an app set aimed for retail customer and retail customer service provider. We will be using a Json data source and perform data retrieval operations on them.

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 E-Mail for signup across the 3 channels below. Step 1 -3 below are required.

  1. Ensure you Login with Amazon (LWA) account which is setup by your admin. If you are the account admin, you can follow this instruction to set it up.

  2. Create Content Categories, Content using the Json data sources.

  3. Create a custom App in ixHello.

  4. Publish the App.

  5. Test the Lex App.

Prerequisite

  • An active AWS AccountComment

CommentYou 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​CommentAWS Accounts Include 12 Months of Free Tier AccessComment

  • IAM Credentials with access to AWS LexComment

CommentAWS credentials are required to create a connection with Lex. This is going to be used while creating a Lex bot from the ixHello platform.Comment

  • A configured Amazon Connect instance If you want to use agent chat and voice, call in your webchat, you should have a configured and running Amazon connect instance.

    1. If you are new to Amazon Connect, you can start by creating a Free Tier Amazon Web Services account.​Comment

    2. Create a new instance of Amazon Connect and obtain a phone number using this official documentation from Amazon. Depending upon your location and the location of your target customers, you might need to perform some additional work here. Help from technical department might be required depending upon the scenario.Comment

    3. After creating the instance, Amazon Connect Home will look like this:

  1. An ixHello 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

For steps to create an ixHello account, follow the steps at https://docs.ixhello.com/ixhc/general/ixhello-create-account

Creating Content Categories and Contents

Contents can be in the form of text, media files (video, audio, image, pdf), Json data that are either uploaded to the ixHello platform or can be a public URL of the corresponding files. These can be accessed using Internal Data connection facility provided by the platform for using in app building. Content Categories allow the grouping of contents based on their domain similarity. For this tutorial, we will be uploading Json data files to ixHello, create Content using them, and later, these contents will be used in app building.

  1. To begin, login to the ixHello URL platform https://bots.ixhello.com/

On the left navigation menu do the following:

Click: Content

Select: Content Categories

  1. Click: Add New Category

  1. In the resulting popup, choose:

Enter Content Category: Retail Domain

Enter Description: Content category for retail domain,

Click: Save

  1. Now, let’s create content. On the side menu do the following:

Click: Content

Select: Content

Click: Add New Content

  1. The following pop up will appear. Enter details to create a content:

Content Name: Retail

Content Code: Retail

Content Category: Retail Domain

Text: Content for Retail Data Source

Select: Media

Media Type: Select JSON

Media Source: Select Upload File

Media File: For sample data, you can download Retail.json. Copy and the data sample in a notepad and save it as a json file. Name it as “Retail.json”. Click on Choose File and select “Retail.json” file from your system.

Click on Add button. This shall upload Retail.json to ixHello platform. Users are required to keep record of Content Name, Content Code and Content Category, for later use in the app building.

You can also select Media URL as the media source and provide a public URL of the media file.

For more information on creating a content using JSON File, you can refer to this document.

Creating Data Source

  1. To access the content created in Step 2, we require to create a connection configuration. On the side menu:

Click: Integration

Select: Connect System

Click: Add New Connection

  1. Enter the following details in the pop-up window:

Select Integration Category: Custom

Select System Type: Internal Content

System Instance Name: Internal Content DS

And click Connect System.

Create Custom App in ixHello

  1. To create a custom App in ixHello:

Click: Custom Apps in menu.

Select: Manage Apps

Click: Create New Custom App button

  1. Then complete the following steps:

Name: Retail Demo

Custom App Type: Search

Category: Retail Domain, same as the content category in Step 3.

Click: Save

  1. In the top menu select “Data Sources” tab, then “Create New Data Source”.

Enter the following in the fields:

Name: Retail DS

Integration Configuration: Internal Content: Internal Content DS.

Click: Save

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

Enter the following in the fields:

Name: GetProductInfoMethod

Request Type: GetJSONContents

ContentID: Retail. ContentID shall match the name of the content uploaded in Step 12.

Result Type: ListofRecords

Record JsonPath: $.productCatalog[?(@.productName=="{{ProductName}}")]

Empty Result Template: I'm sorry, I could not find your product.

Result Template: Here is what i found for {{Input.ProductName}} :{{Records}}

Record Template: Price : {{price}}, restock amount: {{restockAmount}}, discount : {{discount}} and tax: {{tax}},

  1. After the method has been created, let us test it.

  1. If you observe the following result in your Test Result tab, your method build is successful. You can now proceed to the next step. Otherwise, you might want to re-check your previous steps first. Since method defines the functionality of the App, this is a very crucial step.

  1. In the top menu select “Intent” tab and “Create New Intent”.

  1. Make sure to select the same method you created on Step 16.

Name: GetProductInfoInput

Intent Type: Search

Intent Action: Execute Method

Data Source: Retail DS

Data Source Method: GetProductInfoInput

Click: Save

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

  1. Note the Reprompt message is what Lex will ask if it can’t fill/resolve the person slot.

Name: ProductName

Slot Order: 1

Reprompt Message: what’s the product name

Type: Text

App: Retail Demo

Intent: GetProductInfoInput

Click: Save

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

Value: find product

Custom App: Retail Demo

Intent: GetProductInfoInput

Click: Save

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

Fill the following details:

Name: GetProductInfoInput

Description: (leave blank)

Custom App: Retail Demo

Custom Intent: GetProductInfoIntent

Data Source: Retail DS

Data Source Method: GetProductInfoMethod

Click: Save

  1. Add parameters for the Custom Input GetProductInfoInput.

The Parameter drop down shall select the corresponding parameter described in Method section.

External App Name: For instructional purposes we used “Retail Demo”, but this will be the name you create the app in Lex. Therefore, make it unique and different from the names of your other app in Lex.

Channel: Lex

Lex Invocation: For instructional purposes we used “retail customer service”. 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.

Publish to Amazon Lex

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

External App Name: Retail Demo (This will be the name of the app in Amazon Lex. Therefore, make it unique and different from the names of your other app in Amazon Lex.)

App Type: Search

Channel: Amazon Lex

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.

Once in Publish App to Amazon Lex select and do the following:

Selected App: Retail Demo

External App Name: Retail Demo

Amazon Lex Version: V2

Select Amazon Lex Account: Lex Integration Testing

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

Click: Publish To Amazon Lex

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

Query the bot with the Utterance "Find product" and then provide the contact-name of whom you would like to see the phone number, for ex: type Jeremiah. Bot will provide the response with the full name and the phone number.

Congratulations!

You have successfully created a Domain App using Internal data.

Last updated

Was this helpful?