# Custom App Series - Step 3 - Publishing to a Channel

## **Objective**

This document will demonstrate how to publish a custom app to Lex from the iX Hello platform.

## **Introduction to API**

After an app is configured in the iX Hello platform the app can be published directly to the AWS Developer Console without having to write code or configure anything in Lex.

## **Goal**

Our goal will be to show how to publish a custom app from the iX Hello platform to AWS Developer Console.

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

1. [Sign up for AWS account](https://console.aws.amazon.com/lex/) (Part of pre-requisites)
2. [Sign up for iX Hello platform](https://portal.voiceworx.ai/Account/Login?ReturnUrl=%2F) (Part of pre-requisites)
3. [Setup connection to Amazon Lex](https://docs.ixhello.com/ixhc/apps/lex-publishing-auto-manual)
4. [Setup connection to the external web API](https://docs.ixhello.com/ixhc/general/use-cases/contact-finder-with-rest-api)
5. [Create a custom app in iX Hello.](https://docs.ixhello.com/ixhc/general/ix-hello-studio-mode)
6. Publish the app
7. Test the Amazon Lex app.

## Publish to Lex

1. To publish to Lex, use top menu tabs, select “**Publish**” then click “**Add App Publishing**”.

![](https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fvoiceworx-ai-api%2F-Mkb7M5p7ulyOXkt_jQt%2F-Mkb7Z2P51Juw8zjJcMm%2F0.png?generation=1632744129372604\&alt=media)

2. Then input or select the following:

**External Skill Name**: ContactFinder. (This will be the name of the skill in Lex. Therefore, make it unique and different from the names of your other app in Lex.)

**App Type**: Search

**Channel**: Amazon Lex

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

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FXMhET70eYctMJg4TquPN%2Fimage.png?alt=media&#x26;token=af883aca-567b-4350-b43b-193cc1e9506b" alt=""><figcaption></figcaption></figure>

| Input             | Explanation                                                    |
| ----------------- | -------------------------------------------------------------- |
| External App Name | This is the name of the app. You can give name of your choice. |
| App Type          | It should be “Search”                                          |
| Channel           | Must be “Amazon Lex”                                           |
| Channel Sub Type  | Lex V2                                                         |
| Auto Publish      | Keep it selected                                               |
| Welcome Message   | Should be auto populated.                                      |
| Re-Prompt Message | Should be auto populated.                                      |
| Help Message      | Should be auto populated.                                      |
| Goodbye Message   | Should be auto populated.                                      |
| Fall Back Message | Should be auto populated.                                      |

3. **Publish to Lex**” and this will initiate the publish process. The following results screen will appear as shown below.
4. The results screen has an option to go to the “**Go To LexV2 aPP**” or “**Go Back to App Publishing**”.

**Selected App**: ContactFinder (Name of the App to be published in Lex)

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FnFYSAowiLAB3E9H7aIiB%2Fimage.png?alt=media&#x26;token=b56b52a3-b3f9-4d5b-bffd-523b6272211a" alt=""><figcaption></figcaption></figure>

1. Select Amazon Lex Account, If not present then click "Add New Lex Account".
2. Afer selecting Lex Account, Click “**Publish to Lex V2**” and this will initiate the publish process. The following results screen will appear as shown below.
3. The results screen has an option to go to the "Test Lex Bot" or "**Go to LexV2 Console"** or "**Go Back to App Publishing".**

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FyiGJGFyzortyL3QAvFlc%2Fimage.png?alt=media&#x26;token=b9201465-47f4-40fe-a72b-81357853c77c" alt=""><figcaption></figcaption></figure>

For each intent defined in your app, the success screen will show two rows as seen in the above screenshot.

## Test the app on Amazon Lex

1. On the app publishing results page, a *Go to LexV2 Console*, will appear as shown.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FiK3o9RIuU01xvMlHGXvH%2Fgo%20to.png?alt=media&#x26;token=c193b20e-0124-44fd-ac63-92e25212bb5a" alt=""><figcaption></figcaption></figure>

1. Click on it, you will be redirected to the newly created Lex bot on the AWS console.
2. On the Amazon Lex bot page, ensure “**Build Completed**”. If not completed, then the bot will be unable to test. Once in Lex, you should land on this screen.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FzGy3gY5PbAVwAFAEsndt%2Fimage.png?alt=media&#x26;token=5fe7c8a2-8b20-4624-a85a-cf122ea80adc" alt=""><figcaption></figcaption></figure>

1. Make sure it’s displaying the correct app name at the top left and then click “**Test Chatbot**” option at the right side. Click “**Text Chatbot**” then the test bot screen will appear as shown below.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FymxrtHcqc2ZIuxubqabq%2Fimage.png?alt=media&#x26;token=c5bdd48e-562e-46ff-ae87-dd7688d34a8b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F3N61Zx52AeHD3JUy9oqo%2Fimage.png?alt=media&#x26;token=18a04aaf-1551-4aec-9c1f-dc6ca8feb697" alt=""><figcaption></figcaption></figure>

1. Start testing by writing utterance in the chat area and lex will connect to the app configured in the iX Hello platform. At this time a relevant response will be received.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2Fj6a9NeD57YofsQh27bZc%2Fimage.png?alt=media&#x26;token=cff3c8b3-813e-4a7c-ba8a-90c8bbafaa14" alt=""><figcaption></figcaption></figure>

Congratulations!

You have successfully completed an app Custom Skills Series - Step 3 publishing to the AWS-Lex console.
