LUIS^Teneo in 10 minutes

Congratulations! You are about to discover what Teneo is all about and the core concepts behind it. The 'LUIS^Teneo' section will get you started with the Teneo platform together with LUIS. They provide step-by-step instructions for building intelligent chatbots in Teneo.

Once these are done we will show you more on:

Team console

You've just signed up and gotten your hands on your fresh Teneo developers account; if you haven't logged in yet, please log in using your sign-up credentials.

Once logged in, you are greeted by the Team console. The team console is divided into three main areas.

  • In the Environment tab, you can download the studio client and see the status of your environment.
  • The Bots tab allows you to quickly see which chatbots are in your Studio environment.
  • Finally, in the Teams tab, you can invite your colleagues to your team.

When your environment is ready, the status will change to 'Starting'. A download and a Studio browser link will appear.

  • For PC users we recommend downloading the Studio client by clicking on the download link.
  • For Mac or Linux users, we recommend using the Studio client on a browser by selecting the Start Studio Client button.

    We highly recommend the use of Google Chrome for the browser option.

    Follow the setup instructions for the Studio client.


Your first step into Teneo Studio

Now that you've managed to open Teneo Studio, it's time to get to work. Let us start with entering Studio:

  1. Fill in your username and password. The login credentials are the same as for the team console.
  2. Click 'Login'.

Once logged in you will be greeted by the main solution window. Here, you'll find the solutions you have recently worked on and the solutions you own.

  1. Click on the 'Solutions' link in the purple menu to the left to get into the solutions view.

In this view, you can see all the solutions available to you in this environment. A solution can be thought of as a container where all the bots' knowledge is stored.

As you can see, there's already a solution called 'Longberry Barista' available to you. Each team gets this pre-built solution which can act as a reference solution when you're building your own bot. Let us take a look inside:

  1. Select the solution.
  2. Click on 'Open' above the solutions field.

In this section, you can find meta-information about the solution, such as when it was built, when it was last updated, and when it was last published.

Connect your LUIS application to Teneo

Now it's time to build a bridge between your LUIS solution and Teneo. This will make your solution to bypass Teneo's native classifier together with it's classes inside Class Manager and instead use LUIS native intent classifier.
The first step is to add LuisPredict.groovy to your solutions file resources. This .groovy file contains the needed code to make this possible.

  1. While inside the Resources section, select 'File' located at the top.
  2. Use 'Add' on the upper right to add the .groovy file. Alternatively, you may drag and drop it.
  3. Change the Published Location to /script_lib.
  4. Hit 'Save'.

Prepare your LUIS application

It's time to visit the LUIS application to collect some details which later will be used to connect this LUIS application to your Teneo solution. But first, we'll need to import intents to our LUIS application. When you created your solution, you based it on the 'Longberry Baristas' template solution which comes with many prebuilt flows and intents. To make sure LUIS is aware of these intents, we'll need to import them into your LUIS application.

  1. Download this file and store it somewhere safe.
  2. Create a new LUIS application by pressing the dropdown menu beside the 'New app' button.
  3. Select 'Import as LU' and choose the LU file you downloaded.
  4. Press the 'Train' button located at the top right corner. This will train the intent and score the examples.
  5. Once the training is done press 'Publish' at the top right corner. This so Teneo can retrieve it.

Once the application is created and trained it's time to collect some details, so we can add them to your Teneo solution later. You can temporarily store them in a text file.

  1. Select 'MANAGE' located on the top right bar.
  2. Select 'Settings' from the sidebar to the left store the following value:
    • App id.
  3. Select 'Azure Resources' from the sidebar to the left.
  4. You should arrive to this page, and store the following values:
    • Primary Key
    • Endpoint URL.

Screenshot from Azure LUIS site

Prepare your Teneo solution

Now it's time to prepare our Teneo solutions by adding a Global Variable and a Global Script.

First, we'll add a global variable called luisPredict to the solution. This variable should contain the api keys of your LUIS application. Before we add the variable to the solution, let us prepare its value. Copy the following code and populate it with the values you collected from your LUIS application above:

new LuisPredict('primaryKey','endpointURL','AppId')

The result should look something like this: new LuisPredict('12345678910abcd',''', 'dcba019876543210')

Now, let's add the global variable:

  1. Select 'Globals' in the purple bar on the left-hand side, and then select 'Variables'.
  2. Click 'Add'. A panel for specifying the new variable appears on the right-hand side.
  3. Name the variable: luisPredict.
  4. Set its value to the string you created above.
  5. Hit 'Save'.

Now, let's update the global Pre-Matching script:

  1. Select the 'Scripts' tab at the top.
  2. Select 'Pre-Matching'.
  3. Click on the 'Edit' button in the top right and add the following groovy line into the editing window luisPredict.predict(_).
  4. Hit 'Save'.

Your first conversation

Being able to have a conversation with your chatbot is a crucial part of the development process to ensure that everything is working as intended. Luckily, you don't have to go far to test your chatbot in Teneo, let us use the 'Try Out' to order a coffee!

  1. To the right in the explorer window, you find the Try Out.
  2. Chat away!
    Perhaps you could try a conversation like this:
    • Hello!
    • I would like to order a cappuccino
    • John
    • Goodbye

Publish your bot on Teneo Web Chat

There are multiple ways of interacting with a chat bot, such as through an app, on a website, or in your car. Let us publish the Longberry barista solution so that we can have a chat with it through Teneo Web Chat.

  1. To enter the backstage view, click the ‘Solution’ button in the upper left corner.
  2. Select the 'Publish' button, this will take you to the publish page for your bot.
  3. Click the 'Manage' button and in the dropdown choose 'Publish' under 'Latest'.
  4. You might see a warning Publish to 'Default env' stopped with warnings appear.
    warning when trying to publish
    This is nothing to worry about, the warning is shown when you publish your solution for the first time or when you have made certain global changes. To proceed, just check the checkbox 'Perform full application deployment on try again' and click the 'Try again' button.

Congratulations, you have just made your first solution available online! The next step is to interact with it. There are two ways to interact with a newly published solution, you can either interact with it through a test page or a chat widget. We are going to show you how to try out your bot through the chat widget, Teneo Web Chat.

  1. Once published, click on the blue 'Open' icon. This will open the Teneo Web Chat in a new browser tab.

    Teneo Web Chat is also available in the Bots section in your team console. You need to publish the bot from Teneo Studio before using it.

  2. Click on the blue icon in the bottom right corner to open up the Teneo Web Chat window.
  3. Strike up a conversation with the bot, like:
    • Hi!
    • I would like to order a flat white
    • John
    • Goodbye

The chat widget that you just tested is known as Teneo Web Chat. This widget can be embedded in websites and supports rich media such as buttons, cards, quick replies, and much more!

If you want to try out your published solution via the test page, click ‘Open’ in the publication confirmation pop-up. If you have already closed it, you can click the URL shown in the ‘Publish’ window instead. This will open a test page where you can try out your bot.

Your first step into a flow

Currently, the 'User wants to order a coffee flow' grabs the coffee type when we mention it in the first input. Sadly, this is not the case with names. Our goal with the next few steps is to fix that.


User: I want to order one flat white, my name is John.
Bot: Ok, what name shall I note for the order?

User: I just told you, my name is John!
Bot: Thanks for your order, John. Your flat white will be ready for pickup in 5 minutes.


User: I want to order one flat white, my name is John.
Bot: Thanks for your order, John. Your flat white will be ready for pickup in 5 minutes.

Now let us explore how these conversations are possible!

Let us go back to Teneo studio and edit that flow, and the option to store the name in the first input while ordering coffee.

  1. Open the flow 'User wants to order a coffee'. This is located inside the 'Flows' folder.
  2. Click on 'Edit' in the top left corner in the flow window. This will bring you into the edit mode of the flow.
  3. Select the trigger node 'Order a coffee?', this will open the trigger configuration panel to the right.
  4. In the panel on the right, scroll down to 'Data Actions', click 'Add' and hover over 'Entity' from the drop-down menu. Paste in the following entity, PERSON.
  5. Click on 'Add Mapping' below the entity name.
  6. Now use the drop-down menu below to determine the source 'sPerson' and the target 'userNameForOrder'. This transfers the value from the source and merges it to the target.

Now it's time to specify when the output should be skipped:

  1. Select the 'Ask for name' node, this will open the output configuration panel to the right.
  2. In the middle of the output configuration panel, you will find the 'Skip Conditions' field, click on 'Add' to create a skip condition.
  3. Paste userNameForOrder into the 'Skip Conditions' field. This will be evaluated to true if the variable is set and to false if the variable is empty.
  4. Now use the drop-down menu beside 'Select a target' to determine how the flow processing should go on. In this case, it should be 'Get user name'.
  5. Hit 'Save'.

Republish and test your flow

Now that we have updated the flow we need to republish to make the changes available online.

  1. Head back to the Solution window and click 'Solution' in the top left corner.
  2. Select the 'Publish' button, this will take you to the publish page for your bot.
  3. Click the 'Manage' button and in the drop-down choose 'Publish' under 'Latest'.
  4. Once published, click on the blue 'Open' icon. This will open the Teneo Web Chat in a new browser tab.
  5. Click on the blue circle in the bottom right corner to open up the Teneo Web Chat window.
  6. Let us test if the changes we've made work. Open up Teneo Web Chat and paste in the following line: I want to order one flat white, my name is John.

Congratulations! You have now experienced a small glimpse of what Teneo is capable of.

What's Next?

Now that you have had a brief introduction to the Teneo platform let us continue with more info about working with LUIS^Teneo.