Tutorials – Xenioo Wed, 11 Jan 2023 16:06:21 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.12 /wp-content/uploads/2022/02/cropped-badge_611x611-32x32.png Tutorials – Xenioo 32 32 HOW TO build a complete food delivery chatbot (Part 1) /how-to-build-a-complete-food-delivery-chatbot-part-1/ /how-to-build-a-complete-food-delivery-chatbot-part-1/#respond Wed, 11 Jan 2023 16:06:19 +0000 /?p=9902 In our previous How To Build post series, we’ve detailed how to build a complete Q&A chatbot using Xenioo AI engine, database, and flow capabilities. In this first of two-part posts where I’m going to detail instead all the steps to build a complete Food Delivery chatbot. Thanks to Xenioo’s built-in AI, Database, and advanced Conversation features you’ll see how it is possible to realize such a powerful and smart chatbot without writing a single line of code. The How To ...

Read MoreHOW TO build a complete food delivery chatbot (Part 1)

The post HOW TO build a complete food delivery chatbot (Part 1) appeared first on Xenioo.

]]>
In our previous How To Build post series, we’ve detailed how to build a complete Q&A chatbot using Xenioo AI engine, database, and flow capabilities.

In this first of two-part posts where I’m going to detail instead all the steps to build a complete Food Delivery chatbot. Thanks to Xenioo’s built-in AI, Database, and advanced Conversation features you’ll see how it is possible to realize such a powerful and smart chatbot without writing a single line of code.

The How To Build posts series aims to show how a complete chatbot can be built using all of the available Xenioo features with the highest possible detail. By the end of each post, you will gain insight into basic and advanced Xenioo functionalities and be ready to try more complex approaches. All of the additional material used for these posts and the complete chatbot are made available here for download or inside the Xenioo templates section.

The case for a Food Delivery Chatbot

During the last two years, we’ve witnessed tremendous growth in e-commerce chatbots. By either working as “on the side” consultants or being the first line of sales, these chatbots are for all intent and purpose driving thousands of product sales. The Food industry, and in particular the home delivery services part of it, has definitely embraced this trend by acquiring all the good aspects of this kind of revolution:

  • Your chatbot can work with multiple customers simultaneously. You’re not missing any more phone orders because customers find a busy line and stop waiting;
  • If your restaurant is also serving seated customers, no one needs to answer any call and get distracted from regular service;
  • Orders are written clearly and checked multiple times by your customers. No more wrong orders because of over-the-line misunderstandings or badly written notes;
  • Your customers can update orders anytime, even after placing them, instead of calling your restaurant multiple times;
  • Doing some kind of promotion? Reaching out to your previous customers would be a lot easier than putting out paper fliers no one is reading.

If you feel like your business could benefit from one or more of these improvements keep reading as we’re going to build the definitive food delivery chatbot!

Building our chatbot

The first step for building a successful chatbot is to have a list of the main features we’ll need to implement so that we know how to set up our flow. A food delivery chatbot needs to be capable, at the very least, to:

  1. Take orders from customers using a free dialogue approach;
  2. Allow customers to review, edit and confirm their orders;
  3. Take direct payment from our customers;
  4. Get customer location to set up a delivery route;
  5. Engage with our delivery personnel, dispatching orders and routes;
  6. Let the customer check the order state;
  7. Collect service feedback after the order has been delivered;
  8. Signup our customers for a promotional campaign so that we can engage them with new offers;

Not a bad list of features right? Now let’s see how we can tackle all of these points with Xenioo: let’s create a brand new chatbot in our account and let’s start building!

Creating our Food Menu

In order to allow our chatbot to get orders we need to first create some kind of menu. Our menu will contain all of the information about each and every food served by our imaginary restaurant.

To create our menu we will use all the power of the Xenioo Database feature: we’ll store in our menu collection all of the information we need to display, search and categorize the food we sell.

Let’s head to the Database section of our brand new chatbot and create a new collection named “menu”. We will be adding to menu items data such as name, description, price (obviously!), image, and, since we’re at it, also possible intolerances that our customers may be worried about.

Using the group property of our collection fields we’ll make sure to split our data into different sections so that Xenioo will build a nice data-entry form for us, without writing a single line of code. Once our collection is created we can head to the add new button and select “Add new record with form” to start our data entry.

Xenioo has automatically built for us a complete data entry form with the right input control for each of our fields. Boolean fields are shown as checkboxes, numeric fields have already set decimals or whole numbers and file type fields can manage your attachments and automatically store them in your account storage. All we have to do now is add all of our menu items.

As we have seen also in our previous Let’s Build Post, records can be exported and imported directly using simple CSV files. This makes it incredibly easy for you to manage your data: if you happen to have already a menu in an excel format or, later on, if you wish to maintain your whole food offering using excel. Better yet, if you do not wish to create collection fields manually, you can just import your CSV file directly and Xenioo will import all columns as fields and do all the heavy lifting for you.

Using Xenioo granular users permissions activated by the Pro Team package, it is also possible to create a user that can access only the Database section of the chatbot. Just imagine building a chatbot for your restaurant customer and then giving them a full back office to let them maintain their own data. How much development time would software like this take usually?

Training our NLP Model

Once we’re happy with our menu data we can move on to training our NLP model. What we’re going to do next is basically teach Xenioo how to handle the different requests that may come from our customers. To do this, the first thing to do is to move to the AI section of our chatbot and create a brand new intent.

Within a chatbot, intent refers to the goal the customer has in mind when typing in a question. For our restaurant, the very first intent will be “Food Ordering”.

Let’s go ahead and create the intent by clicking on the add intent button. All we need to do now is just give it a name and click on Save. We’ll be back later to add more details.

Once our intent is created let’s double-click on it to move to Expressions editing. In an intent, expressions are the utterances we’re expecting our customers to use to express their goals. We can set up some typical examples now and fine-tune our training later, even while our chatbot is live.

For our restaurant, a Food Ordering intent may have expressions such as “I want a pizza” or “I would like two margherita and a blonde beer” and so on. Let’s add some typical expressions to our expressions list.

You don’t really need to think of all of the possible ways your customers may order food. Just write some of the most typical and the Xenioo engine will be capable of understanding also expressions that diverge from what you’ve entered.

Of course having our chatbot understand our customer’s expressions is just half of the job: what we really need is to understand what exactly they are asking for. Is it a pizza? If so, what pizza? Do they want a beverage? What exactly do they want to drink?

The information that can be found inside an expression is called Entity. An entity represents a value that can be extracted from the expression and later used by your chatbot. For example in the expression “I want a pizza margherita” what we really need to know is that the required pizza is Margherita and that our customer wants just one.

Usually, we would just go ahead and click on the parts of the sentence that may represent our entities but since we already built our menu we could make things even faster and use our database as an entity list. Let’s move to the Entities section and create a new entity called “food” where we say that the data is coming from our collection.

All that we need to do here is select our collection and pick which fields we would like to represent the possible entity name and the possible synonyms of our entity. Once we’re done with the creation we can just hit save to confirm our entity.

Now, all we need to do to make Xenioo apply our entities to our expression is head to the Train & Test section. After a very short while, Xenioo will finish modeling our expressions. If we go back to our Food Ordering intent and double-click on it we’ll see how our expressions list has changed.

As you can see now some of our words are highlighted. That is Xenioo showing that some of the words are now recognized as entities. It means that the values that will be found will be made available to our chatbot during the flow.

Let’s try our NLP training by clicking on the Train & Test section again. On the input box, to test our training, we type “I’m eating a margherita and a cold blonde”. Press enter or click on Evaluate Expression to see the results.

The sentence is way different from any other we’ve been training but still, Xenioo manages to get a 61% score best of all, as you can see, we get our food recognized automatically. If we were in a real conversational situation, $food and $food2, our entities, would be available to our chatbot as standard variables, ready to be used in any part of the flow.

Speaking of flow, it is time to move to the build section and start creating our chatbot!

The post HOW TO build a complete food delivery chatbot (Part 1) appeared first on Xenioo.

]]>
/how-to-build-a-complete-food-delivery-chatbot-part-1/feed/ 0
TUTORIAL #9: Using Cloud Scripting to drive chatbot results /using-cloud-scripting/ /using-cloud-scripting/#respond Fri, 08 Dec 2017 17:37:42 +0000 https://www.xenioo.com/?p=556 Now that we have learned how to call external API services and use the results in our chatbot, we can step a little further and alter the API results to create completely new content. In order to do so, in this lesson, we are going to use Xenioo’s Cloud Scripting Action, and directly change and create content dynamically. You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot ...

Read MoreTUTORIAL #9: Using Cloud Scripting to drive chatbot results

The post TUTORIAL #9: Using Cloud Scripting to drive chatbot results appeared first on Xenioo.

]]>
Now that we have learned how to call external API services and use the results in our chatbot, we can step a little further and alter the API results to create completely new content.

In order to do so, in this lesson, we are going to use Xenioo’s Cloud Scripting Action, and directly change and create content dynamically.

You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start!

YouTube Video

An artist lookup service

For this example, we’re going to build a very simple artist lookup service.

To do so, we’ll be using the iTunes public search API that can be found here. The API is very easy to use and has a good amount of parameters.

First we are going to use an Input Action to get the artist’s name from the user and then the API Service Action to retrieve the data and store it in a variable.

This time the service will reply with a standard 500 error when no artist is found: to handle this, we will use a Variable Switch Operation to redirect the chat flow to another interaction whenever the user submits an artist that does not exist. If the call is successful, we will store the results into a Xenioo variable.

Multiple Results

Sometimes API calls will return complex results that are difficult to handle with a single variable. The call we are using returns a complex object with multiple information, so a simple variable would not suffice. Furthermore, to make our example more complex, we would like to display the results in a carousel, with multiple cards for multiple collections or albums. The general idea is to let the user say the name of an artist, and display the latest two albums found.

To do so, we need to retrieve the results, as we are doing, and then split them into multiple variables that can be assigned to our cards properties: an easy job for Xenioo’s Cloud Script Action.

Let’s Rock

Simply put, Xenioo Cloud Script Action will execute standard JavaScript code on Xenioo’s cloud servers.

The Xenioo JavaScript runtime has all of the usual JavaScript goodies, and then some: each script action can access Xenioo global conversation, user and messaging objects. This means that at any point, you can alter the conversation state, add or remove variables and generally control the flow by pure coding.

Going back to our artist lookup, what we need to do now is to get the API result variable, transform the JSON into a real JavaScript object and create as many variables as required with all the values we need.

Once we know the iTunes API model it is just a matter of a couple of lines of code.

Once we have all the variables we need we can create a Carousel Action and assign them to all the properties we want to fill.

The title of the carousel can be the Album title, the subtitle can be the track name and the image can be the Album art.

Putting it all together

Once all our components are in place, we’re ready to give our bot a test run.

Submit your favorite artist and see how Xenioo automatically handles everything to deliver our result. Also, take a moment to look at how simple our design is for such a complex result!

In this lesson, we’ve learned how to use Xenioo’s Cloud Script Action to manipulate data and API results to create a simple lookup service.

As with all our lessons, you can find the chatbot sample in your Xenioo account so that you can import it to further experiment and learn.

The post TUTORIAL #9: Using Cloud Scripting to drive chatbot results appeared first on Xenioo.

]]>
/using-cloud-scripting/feed/ 0
TUTORIAL #8: Integrating external API services /integrating-external-api-services/ /integrating-external-api-services/#respond Wed, 06 Dec 2017 14:22:39 +0000 https://www.xenioo.com/?p=532 Now that we’ve learned all the basic aspects of the Xenioo chat flow design, we’re ready to further extend our chatbot by reaching out to external services. In this lesson we will learn how to call an external API service, extract specific data from the results and display it in the chatflow. You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example ...

Read MoreTUTORIAL #8: Integrating external API services

The post TUTORIAL #8: Integrating external API services appeared first on Xenioo.

]]>
Now that we’ve learned all the basic aspects of the Xenioo chat flow design, we’re ready to further extend our chatbot by reaching out to external services.

In this lesson we will learn how to call an external API service, extract specific data from the results and display it in the chatflow.

You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start!

YouTube Video

Adding the API Service

Besides service specific actions (like MailChimp and SendGrid Actions), Xenioo provides a generic, multipurpose API Action that we can use to call an external service.

To add a new API integration, we just need to select an interaction and click on “Add Action”. In the Available Actions dialog, under the Integration tab, select “Call API Service”.

The new action will then be added to your interaction ready to be configured.

To keep this example simple, we’re going to skip services with a sign-up and API key and go straight for a public, immediate one.

We found Pokèapi: a free public API endpoint that can reply to a RESTful GET call with details about a named Pokémon. A standard GET call to something like http://pokeapi.co/api/v2/pokemon/pikachu will return a full JSON with details about Pikachu and its abilities.

How awesome is that? Let’s use it!

As you see, besides specifying the service full request URL, we can also select a property to be extracted from the resulting JSON and a variable where we want the value to be stored.

Notice how the JSON property is fully specified based on the model structure: Xenioo is going to extract the object at index zero of the abilities collection and read the property name of the sub-object ability.

Making it dynamic

The action we have just configured is going to retrieve the data about our Pokémon but it will always be the same.

We want the user to tell us what Pokémon to search, and dynamically display our results. To do so, we need to place a Generic Input Action like we’ve already configured in our previous lessons and make our call dynamic, using variables.

We will utilise the user input in our API call so that each call will be based on what the user says.

The important bit here is the service reply: a fully compliant RESTful request will usually reply with a 404 code (Not Found) as the requested record is not found.

This is not always the case however, and Xenioo allows you to fully control it by just using a built-in variable called ‘last_api_message’. By checking the contents of this variable after the API call, we can tell the user that a Pokémon does not exist, or display its abilities.

There we go! After setting up our interactions and personalizing the reply interactions, we’re ready to test drive our Pokémon look-up chatbot.

Sync or Async

API Calls may take a while to complete as some services may be slow or congested.

Xenioo’s approach to an API call is two-fold: if your API call has no child operations, the call will always be done asynchronously. If the API call has at least one child operation, the call will always be synchronous.

In the first case, the chatbot conversation will move forward while Xenioo completes the API call while in the second case, the conversation will hold until Xenioo has completed the API call.

In this lesson we’ve learned how to implement an API call to an external server and use the call results in our chatbot conversation.

As with all our lessons, you can find the chatbot sample in your Xenioo account so that you can import it to further experiment and learn.

The post TUTORIAL #8: Integrating external API services appeared first on Xenioo.

]]>
/integrating-external-api-services/feed/ 0
TUTORIAL #7: Creating a split-test driven conversation /creating-split-test-driven-conversation/ /creating-split-test-driven-conversation/#respond Mon, 04 Dec 2017 22:29:11 +0000 https://www.xenioo.com/?p=522 Now that we’ve learned how to manage our chatbot flow through Variables and Xenioo’s Natural Language Processing engine, in this lesson we will move forward to learn a different way to manipulate our chatbot conversation: random split-testing. You can follow our lesson directly from the video below. At the end of the article you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start! Splitting the conversation path During ...

Read MoreTUTORIAL #7: Creating a split-test driven conversation

The post TUTORIAL #7: Creating a split-test driven conversation appeared first on Xenioo.

]]>
Now that we’ve learned how to manage our chatbot flow through Variables and Xenioo’s Natural Language Processing engine, in this lesson we will move forward to learn a different way to manipulate our chatbot conversation: random split-testing.

You can follow our lesson directly from the video below. At the end of the article you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start!

YouTube Video

Splitting the conversation path

During marketing or product testing, it is normal to do a split-test.

A split-test is basically a way to randomly redirecting the user to different content, and verifying which content leads to more conversions, contacts or lead generation.

For example, a chatbot conversation can use this kind of approach to check which questions are answered more frequently by a user, which ones are skipped, and which conversation path leads to a better conversions rate.

Using the Random Split Action

By now, you should know that Xenioo always goes beyond the basics to offer you the best possible result and flexibility. The Random Split Action is a typical example.

With any bot, just click on an interaction where you want to create a split, and then click on “Add Action”. On the “Available Actions” dialog, select the Flow tab,  and then “Random Split”.

As you will see, the Random Split data is only a slider where you can set the split threshold: the true power of this action comes from all the operations you can add to alter your chatbot’s behavior, and later analyze the path taken.

Notice how by default, Xenioo will create a Tag Operation that you can use to set a tag based on the activation of the split and a Go To Interaction Operation that will move the conversation to another interaction if you so wish.

These are as always optional: feel free to delete them and build the split test outcome as you please.

Advanced Split-Testing

Each split you add to an interaction is calculated as a single action. This means that you’re not limited to A-B splits, as you can easily create A-B-C splits or even further complicate your scenario to do multiple cascading split testing.

Also, since the Random Split Actions and Operations just trigger a dynamic set of sub-operations, you can create very complex scenarios with random message picking, or multiple casual paths.

In this tutorial we’ve learned how easy it is to setup a split-test enabled chatbot flow using Xenioo.

As with all our lessons, you can find the chatbot sample in your Xenioo account so that you can import it to further experiment and learn.

The post TUTORIAL #7: Creating a split-test driven conversation appeared first on Xenioo.

]]>
/creating-split-test-driven-conversation/feed/ 0
TUTORIAL #6: Changing conversation flow using variables and tags /changing-conversation-flow/ /changing-conversation-flow/#respond Sat, 02 Dec 2017 13:33:40 +0000 https://www.xenioo.com/?p=501 In our previous tutorial, we learned how to create a bot that uses Xenioo’s Natural Language Processing engine to detect and react to user input. In this lesson we will expand the example further by creating different switches that alter the chat flow, thereby ensuring that our pizza order is complete. You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example bot ...

Read MoreTUTORIAL #6: Changing conversation flow using variables and tags

The post TUTORIAL #6: Changing conversation flow using variables and tags appeared first on Xenioo.

]]>
In our previous tutorial, we learned how to create a bot that uses Xenioo’s Natural Language Processing engine to detect and react to user input.

In this lesson we will expand the example further by creating different switches that alter the chat flow, thereby ensuring that our pizza order is complete.

You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start!

YouTube Video

The missing entities

As we complete our NLP configuration and test our bot we can notice one simple detail: some phrases we accept may contain the pizza size, some others may contain information about the topping and sometimes, we can get both.

This situation can happen very often when dealing with free user input: each user will express an intent differently and may place an order (or anything else in your chatbot) in just a partial way.

“A large one!” or “One with onions” are human valid answers to our pizza ordering tutorial chatbot. 

Xenioo Conditional Actions can help you manage these situations by checking the values of your variables, and redirecting the user to a relevant interaction.

Conditional Switches

Variable and Tag Conditional Switch Action are among the most powerful Xenioo actions: they allow you to create switches in the conversation that can redirect the chatbot to other interactions, based on the content of a variable or on the existence of a tag.

Going back to our initial example, we’ve already seen how our NLP will store all detected entities into variables.

In our pizza ordering chatbot, we have two variables available: size and topping. Let’s add a check for both.

In our chatbot designer, let’s add a new interaction that we will call “Order Check”. Once created, click on the Add Action button to add a new action. From the Available Actions menu, select Variable Condition from the Flow tab.

We will check for size first. In the Variable Name just type size and in the criteria menu select ‘Empty Or Unset’. Notice how the criteria value field disappears as you select this type of criteria: there’s no need to specify a check value in this case.

Now we need to add an operation that, if size is empty or unset, will move our conversation to an action that can ask the user for this value. Let’s add a Go To Interaction operation to the Variable Condition Switch action.
Use the plus button attached to the Interaction menu to create a brand new interaction and save everything to confirm the connection.

Completing the Order

In the target interaction we are going to ask the user to tell us the desired pizza size.

We can create a specific NLP Intent to detect more complex replies (and we encourage you to experiment!) but for our example, we will just use a simpler Generic Input Action.

This action can filter a user input based on a simple regular expression. Since we’re accepting either small, medium or large, we’re going to specify a very simple expression and grouping for these values: (small)(medium)(large).

It’s as simple as that!

Now as the user can complete this information, we may go forward a step to ensure that the toppings are selected using the very same technique.

The checking approach is up to you: you can either have a step that checks all variables and redirects accordingly or have a step by step check, like in our video example.

Xenioo Actions and Operations allow for a great deal of freedom for you chatbot.

With this tutorial you’ve learned how to switch the flow of your chatbot conversation based on variables and user input and witnessed how incredibly powerful the Xenioo Actions and Operations architecture is.

As with all our lessons, you can find the chatbot sample in your Xenioo account so that you can import it to further experiment and learn.

The post TUTORIAL #6: Changing conversation flow using variables and tags appeared first on Xenioo.

]]>
/changing-conversation-flow/feed/ 0
TUTORIAL #5: Detecting user input using NLP /detecting-user-input-using-natural-language-processing/ /detecting-user-input-using-natural-language-processing/#respond Fri, 01 Dec 2017 16:03:27 +0000 https://www.xenioo.com/?p=486 Now that we’ve explored just about all of the possible contents that our chatbot can display, is time to move a little behind the scenes and discover the sheer number of customization and automation features that Xenioo offers. In this less we’re going to configure and train our first AI-driven content, and apply it to a simple chatbot. You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot ...

Read MoreTUTORIAL #5: Detecting user input using NLP

The post TUTORIAL #5: Detecting user input using NLP appeared first on Xenioo.

]]>
Now that we’ve explored just about all of the possible contents that our chatbot can display, is time to move a little behind the scenes and discover the sheer number of customization and automation features that Xenioo offers.

In this less we’re going to configure and train our first AI-driven content, and apply it to a simple chatbot.

You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restore the example bot into your account for playback and testing. Let’s start!

YouTube Video

Intents and Expressions

Working with Xenioo AI components is very quick and easy. The first main element, is the Intent: an Intent generally describes a user’s intention to express something.

To have an actual example, let’s create our first intent: we want to accept pizza orders from our users!

Go ahead and create a new Intent by clicking on the “add intent” button. Call the intent as you please: it is just a descriptive name and can be changed anytime. Nobody but you will see this name.

Once your intent has been created, it is time to click it on and go to the Expressions List. An Expression is a phrase that can be associated with the Intent. In our example, a phrase like ‘I would like a large pizza!’ may very well define (although not completely) a pizza ordering sentence.

Go ahead and add as many phrases defining placing an order, as you can.

Language Entities

Once you’re happy with all your expressions, it is time to go ahead and define entities.

An Entity is a word (or a group of words) that you want to be automatically detected and extracted from your expressions.

When the Xenioo AI Engine detects an expression with enough confidence it will also automatically extract any defined entity and make it available in your chat flow.

As we’re going to see in our tutorial, this is an incredibly powerful feature that opens an unlimited number of flow and interaction possibilities.

To create an entity simply click on a word of an expression. A small popup will appear, asking you to define what the word is.

In our example, since we’re accepting orders, we may click on any topping name and define it as “topping”. And we may click on any small, large or regular and define them as “size” for our pizzas.

Once you’ve selected all the entities you want to go ahead and add a new Expression.

See how Xenioo has automatically detected any Entity you’ve written? That is the NLP Engine running and learning as the list grows.

You can test your intents anytime by just selecting the “Train & Test” section. From there you can write any phrase you like and verify in real-time how the Xenioo AI Engine detects different Intents and Entities.

Using NLP in your chatbot

Once you’re happy with your NLP training, you can move back to the Build menu to implement the AI in your chatbot.

Select your default interaction and add a new Action: this time, we’re using an NLP action, under the Input tab.

Configuring the action is straightforward: just select the intent you would like to be detected and define the minimum confidence to assume detection. The default proposed confidence of 80% is usually fine.

That’s it! From that point, your chatbot will stop the flow and wait for the user input. If your Pizza Order intent is detected, your flow will continue. If not, the chat flow will continue looping until the Intent is detected.

Putting Intelligence near Artificial

If that was all we could do with NLP there wouldn’t be very much to help us in our Pizza Ordering bot.

Detecting an order is just the very first step: what we need to do really is also check what the user has ordered. Xenioo Actions and Operations can allow us to extend the NLP Action to suit our needs.

Instead of simply making the flow go on, we can use a Variable Condition Switch Operation to check the value of topping and switch the flow accordingly.

As you see, we can use any detected Entity to switch our chat flow and really react to our user input. There are no limits to the number of switches and conditions that you can make based on Xenioo variables!

Wrapping up

In this tutorial, we’ve learned how to configure and use the Xenioo AI Engine and the Natural Language Processing Engine.

In the next lesson we will push it further by asking our user to complete the order if anything is missing.

As with all our lessons, you can find the chatbot sample in your Xenioo account so that you can import it to further experiment and learn.

The post TUTORIAL #5: Detecting user input using NLP appeared first on Xenioo.

]]>
/detecting-user-input-using-natural-language-processing/feed/ 0
TUTORIAL #4: Using button groups, cards and carousel /using-button-groups-cards-carousel/ /using-button-groups-cards-carousel/#respond Fri, 01 Dec 2017 14:44:17 +0000 https://www.xenioo.com/?p=471 In this fourth Xenioo tutorial we are going to explore some advanced content actions. While in the previous tutorial lesson we displayed multimedia content rather plainly,  in this lesson we’re going to use our media resources in a more dynamic way. You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start! Button Cards ...

Read MoreTUTORIAL #4: Using button groups, cards and carousel

The post TUTORIAL #4: Using button groups, cards and carousel appeared first on Xenioo.

]]>
In this fourth Xenioo tutorial we are going to explore some advanced content actions. While in the previous tutorial lesson we displayed multimedia content rather plainly,  in this lesson we’re going to use our media resources in a more dynamic way.

You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start!

YouTube Video

Button Cards

The first component we will be checking out is the Button Card Action.

This action will display a variable amount of text (it will be split into multiple lines if necessary), as well as multiple buttons all grouped in a single frame.

We’ve already seen Quick Action Buttons but these buttons are different in two ways: first, they’re going to appear attached to the text content and second, they can be more than just a Postback to the bot.

You can, in fact, have Url buttons, that will redirect the user to another website, Phone buttons, that will activate a phone call or Share buttons that will activate the sharing of the content.

Much like we’ve seen in our previous lessons, Xenioo utilizes a component approach: the Button Card action contains only the basic properties and all the required content can be attached by adding more operations.

Go ahead and add more buttons to your Buttons Card.

Notice how the list of available operations changes? Xenioo will always filter your available actions and operations based on the most suitable, that way, you always have the content you need readily available without confusion.

Carousel

A carousel is an horizontal list of cards that can be shuffled to display different content. Ideally, each cart contains a different item that the user can browse from left and right.

Each card of the carousel can contain an image that will take most of the space, a title, a description and up to three different buttons.

As you will see in the video, with Xenioo you can build the carousel card by incrementally adding multiple components to create the exact final result you want. 

To simplify things, remember that you can expand and collapse each action and sub-operation by just clicking on each corresponding icon in the properties panel.

Items List

Lists are another multiple content display mechanism.

Instead of displaying images and buttons shifting from right to left, an Items List Action will display all items in an ordered table with smaller images and buttons. While the carousel may be ideal for bigger, image related content, the list is surely more suitable for a products list or a basket recap.

There’s no real limit to the number of items that can go in a list but keep in mind that the user may have limited vertical space in the chat area.

Choosing your buttons

While Postback and Url buttons are supported on all channels and platforms, Phone and Share buttons are not.

A Phone button used on a desktop browser chatbot may activate a Skype call or some kind of messaging client but it is most likely to be blocked, ruining the user experience.

Conversely, a Share button is only supported by Facebook messenger, and will not be visible when using the same chatbot through browser or Slack.

Be mindful of these limitations when designing your card’s content with multi-platforms in mind.

Wrapping up

Knowing what type of content container is available for your chatbot is key to a meaningful information display.

In this lesson, we’ve learned how you can display content in advanced and dynamic ways. 

As with all our lessons, you can find the chatbot sample in your Xenioo account so that you can import it to further experiment and learn.

The post TUTORIAL #4: Using button groups, cards and carousel appeared first on Xenioo.

]]>
/using-button-groups-cards-carousel/feed/ 0
TUTORIAL #3: Displaying multimedia content in the chat /displaying-multimedia-content/ /displaying-multimedia-content/#respond Thu, 30 Nov 2017 15:42:32 +0000 https://www.xenioo.com/?p=436 This time, after having managed to ask our user’s email address, we will display media content in our chat. Xenioo Actions currently support every kind of media attachment possible, and in this lesson we’re going to try them out. You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start! Using Media Actions First ...

Read MoreTUTORIAL #3: Displaying multimedia content in the chat

The post TUTORIAL #3: Displaying multimedia content in the chat appeared first on Xenioo.

]]>
This time, after having managed to ask our user’s email address, we will display media content in our chat.

Xenioo Actions currently support every kind of media attachment possible, and in this lesson we’re going to try them out.

You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start!

YouTube Video

Using Media Actions

First of all, let’s create a brand new chatbot. As always, Xenioo will create a blank Behavior and a simple Interaction with just a text action.

We don’t need any text action this time, so let’s just delete it. We now have an empty interaction that we can use. So select the interaction, and add a new action: the action we need this time is an Image Action and you can find it under the “Content” tab of the Available Actions dialog.

Once the Action has been added, you may notice two options: “From Url” or “Upload To Storage”.

These two options are common on every media or resource-related content and allow you to choose how you would like to add content to your bot.

If you have an external resource, like an image Url, you can click on the “From Url” button and specify it in the textbox that appears. If instead, you wish to upload it to Xenioo servers, you can select “Upload To Storage” and upload it directly from your local drive.

In our example, we will be uploading an image directly from our drives. Supported image formats are GIF, JPG and PNG.

Depending on the size, Xenioo may need to resize the image to fit the chat window size.

As you can see, Xenioo will display the media content directly in the designer area.

Now let’s create a new Interaction and add a Video Action. Video Actions are similar to Image Actions, but as the name suggests, they are meant for displaying videos.

Like images, videos can be selected from an URL or from your local storage.

Once you’ve created a Video Action, you may want to add an Audio Action that will display a standard sound player widget in the user chat or a File Action that will allow the user to download a file.

Local Storage or Url

As you’ve seen, in all these actions you can choose to upload your content from your local drive or choose to attach it from an Url.

The second option does not download the file to Xenioo servers. Instead, the link you’ve provided will be used when running the chat. If you later change the content on the source Url, it will also change in the Xenioo chat window.

Xenioo storage may be limited (or not available) depending on your active Xenioo subscription. If storage is not available, the “Upload To Storage” option will be disabled.

Building for Facebook

If you’re specifically targeting Facebook when creating your bot with Xenioo there a two things to keep in mind:

  • Facebook treats media files and downloadable files as chat ‘attachments’. These files are uploaded to Facebook servers every time the chat has to display them.
    These files will remain as resources in the user chat and will not be dynamic, like in the webchat.
  • The limit for any kind of attachment is 2MB. You may circumvent this limit on Xenioo webchat by using an external Url, but when switching to Facebook chat, these elements will simply not appear in the user chat.

Wrapping up

In this lesson we’ve learned how to add multimedia content to our chatbot and display them interactively in our chat area.

As with all our lessons, you can find the chatbot sample in your Xenioo account so that you can import it to further experiment and learn.

The post TUTORIAL #3: Displaying multimedia content in the chat appeared first on Xenioo.

]]>
/displaying-multimedia-content/feed/ 0
TUTORIAL #2: Asking a question and reacting to the reply /asking-question-reacting-reply/ /asking-question-reacting-reply/#respond Fri, 24 Nov 2017 10:32:52 +0000 https://www.xenioo.com/?p=407 In the previous lesson, we configured a very basic bot with a simple quick button interaction. In this lesson we are going to complicate things a little bit: we want to ask the user a question and then make the bot react accordingly. Xenioo supports many different built-in questions such as phone number, email and open, configurable actions that can be used to ask the user just about anything. For this lesson, we are going to ask for an e-mail ...

Read MoreTUTORIAL #2: Asking a question and reacting to the reply

The post TUTORIAL #2: Asking a question and reacting to the reply appeared first on Xenioo.

]]>
In the previous lesson, we configured a very basic bot with a simple quick button interaction.

In this lesson we are going to complicate things a little bit: we want to ask the user a question and then make the bot react accordingly.

Xenioo supports many different built-in questions such as phone number, email and open, configurable actions that can be used to ask the user just about anything.

For this lesson, we are going to ask for an e-mail address.

You can follow our lesson directly from the video below. At the end of the post you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start!

YouTube Video

Setting up your new chatbot

First of all, let’s create a brand new chatbot.

As always, Xenioo will create a blank Behaviour and a simple Interaction with just a text action. Let’s click on the designer background to activate the Behaviour settings: from there we can click on the “add new interaction” button and add two more interactions.

We want to ask the user their email and modify the flow if the user gives us a correct address or just move ahead if he decides to skip the question.

So let’s call one interaction “Thank you” and the other “Going On”. In the “Thank you” interaction we can change the text to thank the user for giving us the email while in “Going On” we can go on with the normal flow.

Configuring the Email Input

Let’s go back to the first Interaction and add a new action.

This time we browse to get the Input section, and then pick an Email Input Action. Once selected, the Action is automatically added to the Interaction: we can click it on to see the properties available.

While powerful, the Email Input Action stays simple: all the validation is done by Xenioo so that you do not need to worry about getting bad addresses.

All you may want to do is change the validation reply with something you like and decide if you want the user to opt-out of your question.

With some questions, it may be a good idea to allow the user to go on. Every Xenioo Input Action allows you to do so: as the email input has a default setting of Never. However, you can change it to an Intent (using NLP), or using simple text.

Let’s use some simple text right now and specify ‘no thanks’ in the reply textbox.

Right away, the Input Action has added a Go To Interaction Operation: this operation will be triggered as the user gives a correct reply (in our case, gives a valid email address).

Select the Thank You interaction as the target: notice how Xenioo shows that the action, when successful, goes to the Thank You Interaction.

Question Opt-Out

In our configuration, if the user types ‘no thanks’, the successful reply never gets triggered and the interaction can move on.

Let’s put a message after our input and an immediate Go To Action, directed to the Going On Interaction. As the user uses the Opt-Out, the flow will continue back from the input block and immediately jump to the Going On Interaction.

Using Variables

The Email Input Action, like all other input actions, will automatically store the results of a user input into a variable.

Variables, like Tags, are stored at the user level and will remain forever, even if the user connects to the bot at a later time.

Everywhere in a Xenioo bot, you can reference these variables to change the flow conditionally, or simply display different data.

This is a very powerful Xenioo feature that we will discover in depth over the next tutorials.

Wrapping up

While simple, this example shows how incredibly easy it is to create conditional choices based on user input and to use them right away.

In the next lesson, we are going to explore the media capabilities of the chatbot using images, videos, audios and files.

As with all our lessons, you can find the chatbot sample in your Xenioo account so that you can import it to further experiment and learn.

The post TUTORIAL #2: Asking a question and reacting to the reply appeared first on Xenioo.

]]>
/asking-question-reacting-reply/feed/ 0
TUTORIAL #1: Creating your very first chatbot /creating-first-chatbot/ /creating-first-chatbot/#respond Tue, 21 Nov 2017 23:04:40 +0000 https://www.xenioo.com/?p=380 Welcome to our first Xenioo tutorial. The purpose of this small lesson is to help you better understand Xenioo’s inner workings, and guide you to create your awesome chatbot. Today we are going to take our very first steps, and following this lesson, you’ll be able to create your first chatbot with some standard chat text and buttons. A very simple chat flow to introduce you to the very basics. You can follow our lesson directly from the video below. ...

Read MoreTUTORIAL #1: Creating your very first chatbot

The post TUTORIAL #1: Creating your very first chatbot appeared first on Xenioo.

]]>
Welcome to our first Xenioo tutorial. The purpose of this small lesson is to help you better understand Xenioo’s inner workings, and guide you to create your awesome chatbot.

Today we are going to take our very first steps, and following this lesson, you’ll be able to create your first chatbot with some standard chat text and buttons.

A very simple chat flow to introduce you to the very basics.

You can follow our lesson directly from the video below. At the end of the post, you will find a Xenioo bot file that simply restores the example bot into your account for playback and testing. Let’s start!

YouTube Video

Creating a Chatbot

Right after login, you’ll be in your account dashboard.

It’s a little empty so we can start by creating our first chatbot. Just click on the Add New Chatbot button to create a brand new chatbot.

Xenioo chatbots are organized in three simple concepts: Behaviours, Interactions and Actions.

From the bottom going up, an Action is a specific element like a text or a button. Everything is performed by either the user or the chatbot.

Multiple actions are grouped into a single Interaction.

Multiple interactions define specific bot Behaviour.

For example, a Behaviour may be a “Support And Feedback”, an interaction may be “Ask about a problem” and may contain actions like “Ask for input”, “Evaluate Input” and any flow decisions.

Using standard Text Actions

Our very first chatbot already contains a behaviour called ‘New Behaviour’ with a single interaction called ‘Bot Interaction’.

Our interaction contains a single action: a Text Action. This is one of the simplest actions you can add to your chatbot and represents a simple chat text bubble.

Although very simple, this is already a working chatbot and can already be previewed. You can activate the preview panel on the right side of the window and click on the “Refresh Preview” button to see your chatbot in action.

Remember: anything you do in the designer window can be immediately tested thorugh the preview panel.

Now click on the interaction text: the panel on the right will switch to the action properties section. Go ahead and change the text to whatever you like. Once you’re done, click on the Save button to apply your changes.

If you get back to the preview panel, you can test your update right away.

Xenioo employs a draft/publish approach to every chatbot as a whole.

Feel free to change everything , as you can rest assured that the published version of the chatbot, the one your contacts are using, remains unaffected.

Creating a simple flow

A typical example of a standard chatbot flow is to present one or more buttons that can move the conversation to other interactions.

What we want to do now is create a simple button that once clicked will move the user to another interaction.

First of all we need to create a new Interaction that will be our next step in the chat flow. To do so, we can click on any free spot of the designer area: this will show the current behavior details in the properties panel.

On the panel, we can click on the ‘Add Interaction’ button. A new interaction will appear in the designer. Let’s click on the new Interaction and change the default Text Action text.

Each new Interaction will contain a Text Action by default. You can easily delete it if you wish to build it differently.

Now that we’ve created a new Interaction, we want to connect the first one to this one with a simple quick button. To do so, let’s click on the interaction header: the interaction property panel will display the interaction data.

Click on the “Add Action” button to display the available actions dialog. This dialog will display all the actions that can be added to the current interaction.

For this first chatbot, we are going to use a Quick Reply button. Move to the “Content” tab of the actions dialog and select “Quick Reply”.

Once the new action has been added to the interaction click it on to display the details.

A Quick button has a button text (that is displayed to the user) and a default Operation that moves the conversation to another flow on the user click.

Operations are smart tech used by Xenioo to heavily personalize each component and we will see a lot more of them in the upcoming lessons.

For now, let’s select the target behavior and interaction in the “Go To Operation”, below the Quick Reply Action data. Select “New Behavior” as behavior and “New Interaction #3” as interaction. Click save to confirm everything.

As you see, Xenioo is now displaying an arrow representing the flow connection between the two interactions.

The more complicated your bot becomes, the more this diagram will be fundamental to understanding the chat flow experienced by the user.

Let’s go back to the preview panel to give a spin to our chatbot.

As you can see now you have a button in your chat: click it and the chat flow will be moved to the new interaction. That’s it!

Wrapping up

In this first lesson we’ve learned the fundamentals of every Xenioo chatbot: Behaviours, Interactions and Actions and we’ve created a very simple chat flow.

In the next lesson we will see how to ask a question to the user and react to the answer!

As with all our lessons, you can find the chatbot sample in your Xenioo account so that you can import it to further experiment and learn.

The post TUTORIAL #1: Creating your very first chatbot appeared first on Xenioo.

]]>
/creating-first-chatbot/feed/ 0