Articles – Xenioo Wed, 11 Jan 2023 16:17:17 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.12 /wp-content/uploads/2022/02/cropped-badge_611x611-32x32.png Articles – 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
Easily integrate your chatbot with Salesforce /easily-integrate-your-chatbot-with-salesforce/ /easily-integrate-your-chatbot-with-salesforce/#respond Fri, 25 Mar 2022 14:22:15 +0000 /?p=10423 We all know how much of an asset a smart and well-designed customer support chatbot can be. Current usage and results statistics place at least 70% of the amount of level one customer questions that can be handled without real human interaction. More than 75% of adults today would prefer to exchange messages with a brand instead of waiting indefinitely in a phone queue. If your support workflow is ready to make the jump it is very likely that your ...

Read MoreEasily integrate your chatbot with Salesforce

The post Easily integrate your chatbot with Salesforce appeared first on Xenioo.

]]>
We all know how much of an asset a smart and well-designed customer support chatbot can be.

Current usage and results statistics place at least 70% of the amount of level one customer questions that can be handled without real human interaction.

More than 75% of adults today would prefer to exchange messages with a brand instead of waiting indefinitely in a phone queue.

If your support workflow is ready to make the jump it is very likely that your current setup is holding you back. A chatbot can become a new stream of information but also a new application to check and train for your support team.

In the following article, we’ll be looking at how we can integrate Salesforce, a widely used CRM platform that is also used for customer services and marketing automation.

We will be integrating Xenioo deeply into the Salesforce interface so that it will become a component and functionality, rather than just another external software.

Getting Started

The first things we need for our integration is, of course, a Xenioo account and Salesforce account.

You can signup for a Xenioo account right away to build and preview the bot we’re building in this post. When you’re happy with your build you can then choose the upgrade path you prefer to make your chatbot public.

Since we’re going to deeply integrate with Salesforce API, make sure that your Salesforce license allows external API. If not, you can still signup for a free developer account and complete the integration before choosing to fully upgrade.

Salesforce Connected App

With our Salesforce account created, we need to retrieve our account client id and client secret values that we will use in our API integrations.

To do so, from our Salesforce console, we must click on the Setup menu item you can find on one of the top right menus. The command will open the general setup page.

From the Quick Find menu on the right, type app and then click on the App Manager item on the left menu.

This will display the Lighting Experience App Manager view. From there we must click on “New Connected App”.

You can give your app the name you prefer as long as it is not taken. Set the contact email you prefer and scroll down to the API section.

Fill the Callback URL field with any URL you prefer (since we won’t be using it) and set the scopes of your connected app to at least “Manage User data via APIs (API)”. Since it is a test and we’re going to play around with multiple things we suggest you also add “Full Access (full)” to the list.

The general setup is done and we can now save our connected app configuration. You should be taken back to the list of connected apps. From there click on the “View” command for your app to access the newly created information.

In the API section of the details, you should find both Consumer Key and Consumer Secret fields which are in turn, client id and client secret required for every API call. Copy both values somewhere handy and let’s continue to Xenioo.

Building our Support Bot

Instead of starting from scratch for our support bot we will use a pre-made template and change it for our integration.

For our example, we will restore inside our account the free Advanced NLP Customer Care template that you can find in your Templates section inside Xenioo.

All templates are free to preview and use: we can just click on the “Use This” button to create a copy of the bot inside our account.

This support bot is already trained to reply to simple questions about the printer’s connectivity and general drivers setup of a sample company and is the perfect playground for our integration.

If you wish to delve deeper into the flow and logic used in this chatbot you can head to this blog post explaining the AI setup or here, where we talk about teams and escalation.

For our example, we are going to slightly change our fallback flow so that the bot will immediately ask the user if human interaction is preferred so that we head to the integration part right away.

Let’s suppose our bot has a conversation like this:

Now, if our customer asks for a human operator, what we want to do is first hand over the conversation so that the Xenioo bot engine will know to not interfere with the conversation.

After that, we can create a case in Salesforce so that our support personnel can be engaged.

The first step is very easily solved by using the Set Operator Chat State Action of Xenioo. This action, when executed in any part of the flow, will hand over the conversation to an operator.

Just note that when set on your flow interactions, this action may appear differently if you do not have the Pro-Team package enabled.

Salesforce API Integration

With the client id and client secret we just retrieved from our brand new Salesforce Connected App and our chatbot ready, we can now move on to the true API integration.

Xenioo can integrate with any public API by using the Call API Service Action you can find under the Integrations section of actions and operations menu.

This action is extremely flexible and powerful as it really allows for any kind of external call.

To use Salesforce API we need to first create an API token. We will do it with our very first API action:

There are a couple of interesting things going on in this call. First of all the URL of Salesforce is your own so make sure to use the base URL of your account.

The second part is the Payload. The token creation API needs to be invoked with a form POST and using Xenioo we accomplish this by selecting “From Encoded” mode. Also, Salesforce API still needs a user besides client id and secret. You can provide your own administrative user or create a user that can create an API token.

If this call succeeds, the result returned by the API will be stored by Xenioo in the “salesforce_token” variable you can see configured. The resulting data is a full JSON model similar to this:

{
     "access_token":"...DCadsfaqweSAKDSLklerdaoijwqeoif...",
     "expires":3600
}

We don’t need everything, we just need the access_token value. Thanks to Xenioo’s native support of complex JSON models, we can use our variable directly without resorting to any custom script: accessing the values of a JSON model is no different from accessing the value of a simple variable.

Now that we have our token we can add another API action and call the Salesforce Cases endpoint to create a new support case. Inside the Payload this time we are writing the full JSON model that Salesforce API expects.

See how the token was used by simply referencing the model value? This can be done everywhere, in any Xenioo action!

If we repeat the previous flow and we chose to talk to a human and we head to our Cases section inside Salesforce we will find the new case created with the data we just sent using our API.

The case can now be handled by the support team.

If we stopped here, our example would already solve many scenarios…but it would be a little too limited.

The biggest piece missing from this integration would be the fact that our support team has no way of contacting back the user and interacting in a real chat.

What we need to do is add a piece of the Xenioo conversation directly inside Salesforce. This way our support team can chat directly with the customer having the issue in real-time and be ready to answer any question without going back and forth with email and one-way messages.

Exporting the current conversation

To allow for our support team to get in touch with our customer in the very same conversation that created the case we need an incredibly powerful feature of Xenioo called Unique Conversation URL.

Using the Conversation URL Action Xenioo can generate a unique URL pointing to that single conversation and make it accessible for a given time window.

The URL is built so that it can be shared as a view-only or even as a take-over view where a destination operator can interact with the user.

While the URL will display a web view of the conversation, the real exchange happens from Xenioo to the real customer channel.

This means that our customers will receive the messages on the platform being used and that our operators do not need to engage on the same channel: our operators do not need to use a WhatsApp account or a Facebook account since they will just chat with users through Xenioo seamlessly.

Extending the Salesforce Database

Generating the URL is very straightforward but what we really need is a field where this information can be stored on Salesforce. To do so, we will need to customize the Cases table.

To edit our case table, we need to head again to the Setup section of Salesforce. This time, we’re going into the “Object Manager” menu you can see on the top.

From there we scroll down to find the “Case” object we need to edit.

In the menu that will appear, we click on “Fields & Relationships” and then on “New” to add a new field.

The name of the field is up to you, as long as it doesn’t already exist it will be fine. For our example, since it is going to handle the Xenioo Conversation Url, we’re going to call it “Xenioo Url”. Since Xenioo will create a fairly short Url, a field of text of 255 characters will be more than enough to hold all the data we need.

Once created, in the full fields list or in the field detail, take note of the Salesforce API field name. This is the real name of the field for Salesforce and it is the one we need to mention in our updates.

Now that our case has been modified all we need to do is do a little change to our flow in Xenioo so that also the URL is sent to our case. The Share Url action, when executed, will create a variable holding the unique Url value. We will send this to Salesforce.

If we create a new case from Xenioo and we go back to the detail page, we will find the shared URL set as expected.

Nice, but still not quite the type of integration we’re looking for. We cannot ask our operators to copy/paste the URL or anything like that. We do want the conversation to appear inside the Salesforce page.

Creating a Salesforce Component

To bring Xenioo inside Salesforce we need to create a Lighting Component that can be hosted inside a Salesforce page. This may sound difficult but in truth is fairly easy and once done, can be reused anywhere.

What we need to do to create our component is open the Developer Console window from Salesforce. From the menu there, select “New” and then “Lighting Component”.

The component itself is built around some kind of HTML/XML notation that merges standard HTML with Salesforce objects. We don’t really need much complexity since it is Xenioo doing all of the heavy liftings here. All we need from this component is to access the current case data and access the Xenioo Url field we just created.

Copy and Paste the component source below and your component is done:

<aura:component implements="force:appHostable,force:hasRecordId,flexipage:availableForAllPageTypes" >
    
    <aura:attribute name="record" type="Object"/>
    <aura:attribute name="simpleRecord" type="Object"/>
    <aura:attribute name="recordError" type="String"/>
    
    <force:recordData aura:id="recordLoader" fields="xenioo_url__c"
      recordId="{!v.recordId}" targetFields="{!v.simpleRecord}" targetError="{!v.recordError}"
    />
    
    <iframe style='width: 100%;min-height: 625px;border: none;border-radius:4px;' src='{!v.simpleRecord.xenioo_url__c}'></iframe>
</aura:component>

It looks complicated but it is not. We’re just telling the component we need the current record and that we’ll be reading the Xenioo Url value. From there we use the Url value to set the source for a simple iframe page. The iframe will display the Xenioo conversation Url.

Once the component has been updated we can save everything and close the Developer Console.

Changing the Case Page

If we head back to our case page, we can now add our Xenioo Lighting Component to the page. To do so, we can just click on the Edit Page menu you can see on the top-right menu. This action will activate the page editor.

You can place our Xenioo Lighting Component wherever you like. In our example, we’re setting it in an additional Tab of the details area. If everything we’ve done up until now is correct, our Xenioo component will be available on the left side of the page, under the Custom Components section.

Drag the Xenioo Lighting Component on the page, wherever you like. Don’t worry if you see any sad emoji icon in the target spot. It is just Xenioo telling you that there is no current Url for the conversation.

Once you are happy with how your custom page looks activate it and save everything to go back to the real case detail.

All there is to do now is just click on the Xenioo tab we’ve just created to access the component live.

And there it is! Our Xenioo conversation seamlessly runs inside a Salesforce case page. From there we can conversate with our customers, share files and handle our chat support case.

Wrapping Up

You can now integrate any Xenioo chatbot and conversation inside Salesforce Cases. Salesforce API let you exchange data with just about everything so now that you know the way there are no limits to the depth of your integration!

Any questions about the features explained in this post? Do you want to let us help with your awesome bot idea? Be sure to get in touch with the Xenioo team at team@xenioo.com or leave a message on our Facebook Group.

The post Easily integrate your chatbot with Salesforce appeared first on Xenioo.

]]>
/easily-integrate-your-chatbot-with-salesforce/feed/ 0
HOW TO build a complete Q&A Chatbot (Part 2) /how-to-build-a-complete-qa-chatbot-part-2/ /how-to-build-a-complete-qa-chatbot-part-2/#respond Wed, 30 Jun 2021 08:00:00 +0000 /?p=9232 This is the second part of two-part posts where I’m going to detail all the steps to build a complete Q&A chatbot. Thanks to Xenioo built-in NLP and Database features you’ll see how it is possible to realize such a powerful and smart chatbot without writing a single line of code. The Let’s 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 ...

Read MoreHOW TO build a complete Q&A Chatbot (Part 2)

The post HOW TO build a complete Q&A Chatbot (Part 2) appeared first on Xenioo.

]]>
This is the second part of two-part posts where I’m going to detail all the steps to build a complete Q&A chatbot. Thanks to Xenioo built-in NLP and Database features you’ll see how it is possible to realize such a powerful and smart chatbot without writing a single line of code.

The Let’s 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.

Let’s recap your Q&A chatbot

In our previous post, we completed the build of the first part of our Awesome Gym chatbot. Our chatbot is now capable of reply to general user questions about the Gym that are read in real-time from Xenioo Database.

In this second part, we’re going to add more features and tweak our account so that our customers can freely manage all the data and the conversations without accessing our flow design.

What we are going learn in this post is how to let our users:

  • Search specific body parts exercises
  • Ask a personal trainer for real-time assistance
  • Leave feedback on our chatbot service and collect statistical data
  • Configure Xenioo so that our customers can access conversations and data, but not other sections of the chatbot.

Ready? Good…Let’s start! 🚀

Building your Body Parts Database

Our previous post created an entity called ‘bodypart’ with all the body parts we knew. The entity, trained like that, was used in our Exercises intent to detect expressions like:

  • What are the best exercises for pecs?
  • How can I improve my biceps?

Our training worked great but we could still push it a little further. If we think about it, more often than not, customers have a clear idea of all of the possible terms that may be used referring to their products while we, the designers, may guess just a few.

What if we could somehow let our customers train our body entity without giving access to Xenioo AI? Let’s see how the database section can help again here.

First of all, let’s head back to the Database section of our chatbot to create a new collection as we’ve seen in our previous post. We’ll call it bodyparts and again, for now, it won’t be accessed using API.

Our new collection will need a field for our main part name (e.g. pectorals) and a field for all the synonyms we wish to use (e.g. pecs). We will add these fields to our Collection Fields list.

Once saved, our collection is ready to be used.

This time, let’s assume our customer gave us a typical Excel file with all of the data collected. This is usually a step where we need to find a way to quickly import our data into our database. Luckily for us, Xenioo Database supports CSV import right out of the box!

For our example, we’ve prepared a very simple Excel file that looks like this:

All we need to do, in order to import this data into Xenioo is make sure that the headers of each column correspond to the field we want to fill. Besides this, once saved as CSV file, we can click on the “Import Data” button and upload it directly to Xenioo.

Import happens immediately and as soon as Xenioo has finished parsing the source file we will be able to see our data in the collection view.

Training Entities from your Q&A Chatbot Database

Now that our data is ready and completed, we can move back to the AI section of our bot and change the way our entity is trained.

If you remember, in our previous post, we created our entity by manually configuring both names and synonyms. This is still something we can do and that works very well, but now we want to give our customer a form to handle that data and have Xenioo training reflect every change.

To connect our Collection Data to our entity we just need to go to the entities list, under the AI section of our chatbot, and double click on the entity we wish to change.

From our entity detail, we can then change the type from “Standard” to “Collection”. See how we can now select a specific collection as a source for our entity? Let’s pick the bodyparts collection. All we need to do now is let Xenioo know which field we wish to use for our value and which for our synonyms.

That’s it. Now, every time we edit, remove or add a new record in the bodyparts collection, Xenioo will mark our AI model for training.

Our customers can now maintain a dynamic part of our chatbot AI without even accessing it.

Building your Exercises Database

Now that our body parts entities are set we can move to our next topic: creating a comprehensive list of exercises that our users can browse.

Again, the basic idea here is to have a collection of data with a column that would be referencing our entity value. Using this approach, we can later use the entity searched by our user to query our exercise database and display all the data.

This is the list of fields we’re going to use for our exercises database:

Nothing special except for the last field which is particularly interesting. As you can see, the image field is of type “upload” and does exactly what you may think it does: allows our users to upload a file directly to the Xenioo storage!

This way, our customers will be able to add new exercises to the database and upload an explanatory image directly from the database interface without accessing our chatbot flow!

Moreover, since we do not want our database to be bloated by excessive attachments, Xenioo will gracefully handle these files by uploading them to your Xenioo storage, while storing a simple, short, reference inside the actual model.

For our example, we go ahead and create some example exercises. Each exercise has its own title, description and image.

Showing Exercises on your Q&A Chatbot

Now that our exercise database is ready, we can move back to the building part of our chatbot to create a flow that will display our search results.

Our previous post trained a general exercise search intent with some expressions that our users may use. Remember? We also trained the entities we just connected to our bodyparts collection.

Let’s head back to training & testing to see what our training intent results are. Let’s type something like “what are the best exercises for pecs?”.

This is exactly what we wanted: our entity is detected and we can use it as a variable to later query our exercise database. Let’s move to the Build section to create our flow.

The first thing that we need is a Database Query Action to query our exercises collection. Since our users will ask for a specific body part, we will add that as a filter.

Similar to what we did with our questions collection, what we’re doing here is filtering our Query using the value of the {{bodypart}} entity to filter on the bodypart field. What we want is that our exercises table gets filtered by the body part requested by our user.

But from where the {{bodypart}} parameter comes from? Remember how we just tested our Xenioo AI against a simple exercise question? As the expression is detected, every entity is automatically transformed into a Xenioo variable and can be used inside any action parameter. Dynamic parsing is one of the most powerful features of Xenioo.

Now that our exercise query is set up, we need some way of displaying the data contained in our results. Since we may have multiple exercises that can be related to the body part the user has searched, we could use a carousel to show them all.

We have multiple options here as we could set up a dynamic carousel using the query model or use scripting to create some totally new content dynamically. Since we want to keep our example fully no-code, we’ll be using the very best option: the Xenioo Database Carousel Action.

Let’s add it right after our Database Query and fill it with our data pointers:

What did we do there? title, description, and image are our exercise collection fields. We’re telling our action that it should take the values from the current query cursor and use them to fill the carousel parameters.

The Database Carousel Action will automatically loop on every record returned by the query and build a complete carousel for us.

But it wouldn’t be a carousel without at least one button. Since in our example we would like to give our users the option to talk to a trainer, we will be adding an “Ask Our Trainer” button to the action.

This is how our exercises flow will look after this change:

Time to try our chatbot. Let’s hit the preview button and see how it behaves:

Awesome right? We just built a chatbot capable of replying to questions, extracting information from them, and generate dynamic content that our customers can manage autonomously in an easy and streamlined form interface, without writing a single line of code!

If you know any other tool that let you build something like this, well, we’re all ears 😉

Hand Over the Conversation to a Gym Trainer

The next step in our flow is now to let user talk to our gym trainers.

As you may know, Xenioo supports teams and groups of operators that can manage support and conversations for one or more chatbots. All team members can benefit from a fine-grained permissions scheme and can work on multiple bots even from different accounts.

Team handling has been deeply discussed in previous articles so for our example we will be going in a slightly different direction, which is often the case in situations where we’ve multiple professionals who aren’t always connected to Xenioo for support.

We imagine our gym having 4 professional trainers. All our trainers can be addressed by our users and Xenioo will pick them randomly. Our professional trainers are not Xenioo users but they will still need to talk to our users, whatever the source platform they may use.

Our fantasy personal trainers are: Andrew, Mark, Michelle and Julienne.

Let’s see how we can build a flow that accomplish all the above.

First of all, when the user wants to contact a trainer, we need to pick one randomly. To do so, we can use a very handy Xenioo Action called Random Split. What this action does is firing a trigger if a specific chance threshold is hit.

Let’s have a look a this example:

What is happening here can be basically translated to: randomly execute any operation attached 50% of the time (so about 50 times every 100).

The action above is extremely useful when we need to create some kind of randomness (like when doing A/B testing, as an example) in our chatbot and in our example becomes extremely handy for selecting our trainers.

Let’s look at our final flow we are using to select our trainer:

As we have four trainers, we are building four Random Split actions with a 25% chance each. As a result, each time Xenioo will randomly pick one of the four trainers and use it.

We do not need to balance perfectly each Random Split: we could have some trainer with a 50% chance and some others with just 10%. Random Split chances are incredibly flexible.

Now that our flow is picking our professional trainer, we need to send an alert and initiate a chat with our users. How can we do this?

To send an alert we have multiple options: we can go from a standard mail message to an SMS to a Slack notification or even a custom API call. For our example, we will use a standard mail message as it doesn’t need any extra service as it is already built-in into Xenioo integrations.

Connecting your Users with Trainers

To connect our user to our trainer we will use one of the most interesting features of Xenioo: conversation sharing. Sharing a conversation means creating a unique web link that points to that conversation.

Clicking that link will open a conversation interface that will allow anyone to talk to our user.

We will add this action right before the email so that we will be able to use the link generated and send it in the body to our selected trainer.

Since we want to make sure that the conversation is quickly taken over, we will set validity of just 1 hour. Once the validity expires, Xenioo will automatically close the share.

Of course, we could choose to add all of our trainers as team members to our bot and have them overwatch the conversation section to reply to whoever needs help. Since in a gym, trainers tend to be hanging around helping users on the spot we preferred something different. Something that let our support group be away from computers and still be reachable.

Here is how our complete flow looks inside Xenioo builder:

This part is complete too and we’re now ready to try it live. Let’s publish our bot online and see how it looks on a web page.

As our user clicks on the button a mail is sent to our trainer with a share url. Our trainer can click on the link, even from the simplest mobile phone, and talk to our user directly:

Remember: the shared URL interface works for every channel!

Your user could be talking from Whatsapp, Facebook, or Instagram and your trainer would still be able to chat perfectly fine. As an added bonus, since privacy and information sharing is a (rightfully so) important topic these days, no contact is shared between the two-party: your trainer does not need to know the phone number or the Facebook handle of your user and vice-versa.

Collect Feedback from your Q&A Chatbot

Feedback from your customers is one of the most important things you should be collecting and analyzing. Knowing what your users think of your services and of your personnel is key to continuous improvement.

In our Super Gym example, we want to collect users feedback about our services with a very simple survey: how did our trainer do?

First of all, we need to set up our data once again. We need a collection that can handle all of the feedback that our users will send us. We will name our new collection Feedbacks.

This time we will enable API access: we will use it later for our data analysis.

Here are the fields we’ll be using for our feedback collection:

As you may know very well by now, we didn’t really need to define our fields as we’ll be updating this collection from the flow but it could be useful now and then to have a form available for fine-tuned edits.

Now that our collection is ready, we can set up a broadcast that can be triggered a couple of hours after our user asks to talk to the trainer. This will give our users time to evaluate the chat that just happened and leave a score and a comment.

To build our broadcast, let’s move to the Broadcast section of our chatbot and click on the “Create New Broadcast” button. Let’s call the broadcast “Feedback Collector”.

We can leave all broadcast options as they are for now except for the scheduling part: we need to set up an On Trigger broadcast. The On Trigger broadcast is executed whenever a specific condition is met for a specific conversation.

In our case, the trigger will be set to two hours after the selected_trainer variable is set. The selected_trainer variable is set when the user asks for a trainer, so it comes in handy here too for our trigger.

Here is how the Scheduling section of our broadcast looks when configured:

Once the scheduling is done, let’s move to the flow section of our broadcast.

As we contact our users again, we should first ask permission to continue with our questionnaire. If the user doesn’t want to give us feedback we’ll just leave it there.

If the user instead chooses to give us feedback, our flow will redirect to another interaction, asking first for a score and then for a free text message. Our flow will look similar to this:

Nothing we haven’t seen already in all our chatbots 🙂 The true difference here is what we’re going to add after the chatbot final message after the user replied to both our questions: we’ll save our variables to our feedback collection.

To save our variables, we’ll be using a Database Save Record Action. This action will store a new record inside a given collection with all the fields we wish to specify. Here is how our feedback saves could look like:

See what we did there? Once again, using Xenioo dynamic parsing we’re setting our collection fields using our direct values from the current conversation. Let’s see what happens for our user:

Analyzing Feedbacks of your Q&A Chatbot

As our gym works, our feedback starts coming in. Our feedback collection is filling up quickly and nicely.

The last thing we’re missing now is a way to analyze this data. What if we could do that using a standard web connection, without exporting the data every time and importing it into an Excel sheet or into some other tool? Once again, it’s time for Xenioo Database to shine!

Xenioo Database collections that can be reached by API can also be reached as a standard Web Data Source that can be integrated into most modern data analysis tools.

For our example, we’ll be using Microsoft Excel.

We need to create a brand new Workbook, click on the Data ribbon tab, and then click on the Get Data button. We must choose “From Other Sources” and then “From Web” from the data dropdown.

From the Excel Web Data interface, we can click on “Advanced” to see all fields. On the URL parts, we can copy/paste the feedbacks collection endpoint and change it slightly to become something like this:

http://app.xenioo.com/data/direct/feedbacks/*/*

On the bottom of the dialog we must input some of the API Keys related to our account and bot.

These parameters will be used by Xenioo to attach to a very specific chatbot and collection. Once configured, our Web Data interface will look similar to this:

Just remember that your account may be on a different Xenioo node. Instead of app it could be app02 or app03 etc. so make sure you’re using the correct address.

When everything looks fine, click on the Ok button to get an immediate preview of your data, extracted on the fly from the Xenioo Database.

If everything looks fine, just click the Load button to insert a reference to the data into the current Excel Sheet.

And this is it!

No more export and import but just immediate and always up to date data connections.

That’s right: this is not a one-time export: Excel will keep the connection referenced! From now on, all you need to do is open this Excel file and click on the Refresh button to update the data and download any additional records that have been added!

We’ve completed our chatbot will a heap of advanced features that would usually require days of front-end, back-end, and database coding without writing a single line of code!

What’s left? Hrm…Let’s see who’s the best trainer of our Super Gym with a simple Excel Chart!

Well, congratulations Mark and Michelle! Keep up the good work! 😂😂

Wrapping Up

Wow! This chatbot has surely been a ride to build and design!

Any question about the features explained in this post? Do you want to let us help on your awesome bot idea? Be sure to get in touch with the Xenioo team at team@xenioo.com or leave a message on our Facebook Group.

The post HOW TO build a complete Q&A Chatbot (Part 2) appeared first on Xenioo.

]]>
/how-to-build-a-complete-qa-chatbot-part-2/feed/ 0
How to build a complete Q&A Chatbot (Part 1) /how-to-build-a-complete-qa-chatbot-part-1/ /how-to-build-a-complete-qa-chatbot-part-1/#respond Sat, 29 May 2021 12:19:14 +0000 /?p=9038 This is the first of two-part posts where I’m going to detail all the steps to build a complete Q&A chatbot. Thanks to Xenioo built-in NLP and Database features you’ll see how it is possible to realize such a powerful and smart chatbot without writing a single line of code. The Let’s 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 ...

Read MoreHow to build a complete Q&A Chatbot (Part 1)

The post How to build a complete Q&A Chatbot (Part 1) appeared first on Xenioo.

]]>
This is the first of two-part posts where I’m going to detail all the steps to build a complete Q&A chatbot. Thanks to Xenioo built-in NLP and Database features you’ll see how it is possible to realize such a powerful and smart chatbot without writing a single line of code.

The Let’s 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.

Why building a Q&A chatbot?

The basic idea of a Q&A chatbot is to have a virtual assistant capable of giving information on a number of topics.

A healthcare Q&A chatbot could for example reply to a general health question. A Gym chatbot could be able to explain to users how some exercises work or how to adjust their diet.

While all of this may sound rather simple in the beginning, a complete Q&A chatbot can easily become very tricky, very fast. From users asking questions in the most disparate ways to answers continuously needing some kind of review, our chatbot may become quite cumbersome to manage in the long run.

Let’s see how we can Xenioo power to minimize all of the above and make a complete and manageable chatbot.

First, let’s see what we want from our chatbot:

  • It must be capable of understanding free-form questions such as “how do I…” or “How much…” etc. with minimal training;
  • When an unexpected question is received, it must be capable of training itself;
  • It must be capable of replying to a question with complex text;
  • Should be able of detecting similar topics and group them so that the user can define an open question;
  • It should stay, when possible, on topic. A question without an explicit topic should be inferred from the previous topic;
  • Answers must be managed by our customer without touching the chatbot design;
  • It must collect feedback on its performances so that we can easily check if users are happy with it;
  • It must have some way for our customer to check the performance based on users feedback;

Well…I guess this should be enough? 🤯 Let’s start!

Let’s start with a very basic flow

To start our chatbot, we create three simple blocks that we will later expand.

basic flow of Q&A chatbot

Just three Interactions as you can see.

The Start Interaction will just act as a welcome, where we greet our user. We can easily expand it later to differentiate the greetings based on our contact gym registration or when we want to promote some subscription offer.

The Answer interaction is empty for now but it will become the most important part of our chatbot later in this build.

Last, but absolutely not least, we have our Fallback Interaction. This is where your chatbot will fall back whenever something is not understood.

Instead of a fixed text, we’ve used a Random Text Action to pick a random line to make it look like there is a little variation in each reply.

Setting up questions for your Q&A chatbot

For our example, we choose to build a Gym Chatbot. Our example chatbot will be available to reply to our users about subscription, exercising, and general fitness advice.

Building a static flow chatbot is surely a simpler task, but for this example, we are going for the conversational route: we want our users to ask freeform questions and try our best to understand their intents.

The first thing we should do is make a list of all of the questions our chatbot can cover. These questions will become our “Intents”.

  • Opening hours
  • Costs and courses
  • Personalized plan
  • Frequency
  • Equipment
  • Exercises

Of course we can later expand our chatbot with many more intents but let’s start with these so that we get the hang of it.

Training your Q&A chatbot AI

When setting up our AI, each Intent should describe generally the intention of the user. Inside each intent, we will add expressions. The expression describes how we expect our users to communicate the intention.

As an example, the Opening hours intent may be expressed by our users as “at what time are you open?” or “can I come in the morning?” or “are you open on Sunday?”, and so on.

Training the Xenioo AI follows the very same concept. First, we create our intent and then we add our expression to it. So, following the example above, we can go to the AI section of Xenioo and add a new intent named “Opening Hours”.

create a new intent chatbot

All we need to do right now is just give it a name and make sure that our target language is selected. We can also add a description if we feel like it.

Let’s save so that our intent is created and we can see it on our intents list.

At this point Xenioo knows about the intent but has no idea of how we want it to be expressed. Double click on the intent row to access the intents creation settings. From there, you will notice a textbox saying “Users says…” which is were we can type our expressions.

Let’s type our first example: “at what time are you open?” and click on Add Expression or just press Enter. As you can see, the expression is added to the expression list and becomes now part of the chatbot AI training.

While very simple, our AI can already be tested. Let’s click on Train & Test to give it a spin. Typing the expression we just added and clicking on Evaluate Expression will create a result like this:

We used the very same expression and of course, it is detected with 100% confidence. That was easy but let’s try instead a differente expression, something we did not yet train: are you open on Sunday?

Trying the expression above gives us an interesting result. First, the sentence is different but not so much to be totally out of reach. It is nearly on a 50% match on the single expression we trained.

The second interesting thing, is that Xenioo recognizes Sunday as an entity: a word that can have multiple different values and that we can later use as a variable parameter. We did not train Xenioo to recognize the days of the week: these are built-in entities.

Near the Opening Hours intent name you can see a small plus button: if we think the sentence could be a good addition to our training, we can click on it and have the text automatically added to the list of expressions.

Try it now and see the results: Xenioo will re-train the AI and submit again the expression. It all green at 100% now!

Import and export training

Interactive training like the one we just experienced with Xenioo gives you a real-time view of your chatbot capabilities. You can literally see as your chatbot grows in its training and is more and more capable of detecting variations and different expressions.

As your chatbot grows more and more complex, it can also be useful to have a global overview of the current training and be able to manage multiple expressions at once. Sometimes, also, you may receive an external list of expressions from third-party tools or custom Q&A software that you just need to use in Xenioo.

To handle these cases, the Import and Export features have been created. From the Intents AI section we can export all of the current training into a standard CSV file that we can later import again as an update.

Let’s export our full training for the current Gym chatbot, that contains just a couple of expressions.

As you can see we have our expression on each line for our single intent. We can add more expressions by simply adding more rows.

There is of course no real need to do this in an Excel file as everything can be done interactively in Xenioo.

As you might see more often than not, your customer will have a very clear idea of all the questions made by his customers and will be more than happy to supply you with a list of possible questions.

Being able to just quickly drop these questions inside your NLP training will surely cut a good amount of project time!

As part of this example, we went ahead and completed the training for all of the other questions. You’ll find them as part of the full free Gym template training and, of course, you can also download our complete example file.

Here is a small extract, just to give you a general idea of the final results:

We’ve added some extra expression and activated two things that will become very important in the next steps: our intent key and the Auto Training.

Training entities

Entities can be seen as dynamic parts of an expression. Like parts of a sentence that can be easily changed with something else while still being relevant to the intent. Let’s look at the following questions:

  • What are the best exercises for biceps?
  • How can I improve my pecs?

Users here are expressing their questions about exercises that are best for specific body parts and both questions could easily have their target element reversed:

  • What are the best exercises for pecs?
  • How can I improve my biceps?

What we need to do here is not repeating again the training but tell the Xenioo engine that those are Entities and that while the question can stay the same, they can greatly vary.

Creating a new entity is very easy. We just double-click on the intent where the expression with entities is and then click on the word we wish to transform into one.

When Xenioo asks to define what the word is we can just give it a simple name like “bodypart” and press enter to confirm. We can then move to other words that we consider “bodypart” and set them as entities as well.

You will notice that the “Train & Test” section is now highlighted with a hint mark: this is Xenioo telling us that our model needs a re-training to apply all of the new entities.

If we move to that section, we can see how our training has gone. Let’s try one the above test questions:

As you can see our results are now extended with Entities. From now on Xenioo will recognize our entities and automatically assign them to variables during the chatbot flow.

We can now not only detect what the user is saying but also extract information that can later be used to differentiate our chat and be used to present more precise results.

But what if our entities are more than the ones we used in our training expressions? Body parts are a lot more than just those two we just trained.

To add more words we can move to the Entities section where we will find our “bodypart” entity. Double click on the entity to access its details and add more words to the ones we already trained.

Xenioo AI Engine also supports synonyms: variation of words that will point to a single value. In our previous example, pecs could also be pectorals but both express the very same target.

Here is our bodypart entity, fully trained:

Again, no worries: you will find the fully trained AI for this example as a free template in your Xenioo account!

First testing of your Q&A chatbot

Although we simply trained our AI, we can already go and test our chatbot. Let’s go back to our chatbot build section and start our preview:

Q&A chatbot template example

Well, our chatbot does not know what to answer right now but questions are already triggering the Interaction we created and this is exactly what we wanted.

Configuring answers

Now that our AI is trained, we are ready to start building our answers database. Until now, when building chatbots with a big number of possible replies we had two options:

  1. Create a huge number of interactions. Basically one interaction for each answer.
  2. Create some sort of back-end service, capable of servicing the text of our answers based on our intents.

The first option does not need any external service but may be considered only if we have very few answers. As the answers grow it may become very difficult to manage your chatbot.

Option two has all the flexibility and room for growth we may need, but it will cost money as you will need some development for your backend, database service, and some kind of hosting.

Luckily, Xenioo has thought to option number 3: what if the database engine was fully built-in in your chatbot tools? That would be a terrific value and merge the best of both previous options!

Building your Q&A chatbot answers database

To start using Xenioo Database all we need to do is just head to the Database section of your chatbot tools. If our account has an active Database Package we will be presented with the option to create our very first collection.

chatbot database

What is a collection? A collection is basically a set of records that contains the same set of data. If we were to draw a comparison, we could say they are database tables (even if they are a lot more than that, but let’s just stop at this for now).

In our example our very first collection will be named “answers” and to create it we just need to click on the big “Create your first data collection” button.

The most important part of our collection is the name. Once we’ve given a name to our collection it cannot be changed later so choose wisely! All other fields instead can be changed whenever you wish.

Let’s leave our API Access off for now: we don’t need this collection to be accessible by any external service and we will come back to this option later.

Let’s move to the Collection Fields section.

From here we can define the fields we want to manage in our collection. This where we really move away from the basic “Table” concept: Xenioo Collections do not need to have any pre-defined structure. Since they are based on a Document Storage Database, you can have any field you want and can insert whatever record you wish.

What we do in our Collection Fields section is basically just tell Xenioo what are the fields we would like to see in our web view, when we access the collection and how we would like the fields to be presented, when we want to interactively create or edit a record.

So, for our answers collection what fields should we need? I would say a question_key field, that would allow us to join the answer to the trained intent question and of course, an answer_text field that will store our answer.

That should be enough for now.

Let’s add a new field by just clicking on the Add Field button.

Here is our first field. Remember: Xenioo Database collections are not bound to these fields as a table. We are just defining the fields we want to handle: we can later change them or even delete them and any data will stay in our records.

As you can see we can specify, for each of our fields a Value Edit Mode. This is great because Xenioo is capable of dynamically building an edit/insert form for us based on this information!

Since the answer may be quite long, for our next field we will choose the “Long Text” Value Edit Mode.

After we finished adding our second field, we can save everything and complete our very first collection. Right away, we will see the default database page change accordingly.

create new data collection

Filling your Q&A chatbot answers

Now we have our collection we can go ahead and click on the View Data button and access our data. See how we can immediately see our view with the fields we selected?

Of course, our collection is empty but we will change this right away! Let’s click on the Add Record button. We are skipping the Raw Json approach for now (we’re getting back to that in a short while!) and go straight to “Add new record with form”.

The form above has been dynamically built for us by Xenioo, based on the collection fields we’ve defined. Right away, we can notice two things:

  1. The form automatically displays and enforces mandatory rules, as we configured in our Collection Fields. Remember that our collections are dynamic and enforcing values applies only to this form: we can insert arbitrary JSON values in our collection.
  2. Xenioo automatically adds an _id field to our form. The _id field is used to uniquely identify our record and is not mandatory. If you leave it empty, a unique id will be created for you, otherwise, a new record will be created with that _id. If a record with that _id already exists, it will be overwritten.

Now that we have our answers collection and form ready, all that remains to do is, well, write some answers.

Let’s start with the Gym opening hours.

See what we are doing here? Our question_key is equal to our intent key! This means we can later relate our question to our answer!

Our imaginary gym has also a swimming pool and a specialized therapist and both have different opening hours. We’re going to add them too as different records in our collection, always using OPENING as our question_key.

As you can see, interactively adding and editing records is as easy as using any backend you could have built by yourself, except this one didn’t need a line of code!

Under the hood

While we browse our database collections using views and tables, Xenioo manages all of the Database contents using raw JSON.

Under the hood, everything is expressed as JSON.

If you feel more familiar with standard JSON format or you feel like creating more complex record structures such as arrays of data you can always access the original collection document using the Add As Raw JSON or the Edit JSON button you find on every row.

Clicking on any of the row we have just added and choosing to edit as JSON will open the record edit dialog with a full JSON view.

You’re free to edit your records, changing the existing fields value or add any other kind of structure you may need. As long as it is a valid JSON, the data will be saved in the collection.

Improving your Q&A chatbot flow

Now we have both our questions and answers set up, we can go back to building section of our chatbot. Is time to upgrade our very simple Answer interaction.

What we did on the previous step on our collection was adding multiple records for the very same question. We did this because we wanted to show multiple bubbles to the user instead of a single big wall of text. In our flow we want to cycle on all possible answers we’ve set in the database and show a bubble for each of them.

The first thing we need to do is add a Query Collection Action to our Answer Interaction.

The Query Collection Action will execute a query on our collection based on one or more filters we can add. We just have one single filter that would be the value of the last detected intent key.

Our configured Query Collection Action will look like this:

What we are saying in this action is, basically: get data from the collection answers, where question_key equals to the current value of the last detected intent key. Note how the intent key is not explicitly set but rather referenced using Xenioo Dynamic Parsing.

An interesting thing about the Database Query Action is that, let alone, it does basically nothing. If you ever used an API Call Action or even a Firebase action, you may remember how we always somehow refer to a variable that should contain our query results.

Since Xenioo collections may potentially deal with hundreds of thousands of records, this would be impractical. What Xenioo does instead is just exposing a Move Next Action that can let you cycle on all records in a visual and intuitive fashion.

flow editor builder

Let’s see what we’re doing in this flow, step by step:

  1. We are accessing our collection, filtering by our last intent key
  2. We are then moving to a looping interaction. Using the Move To Next Record Action, we are basically looping on all the records returned by the previous action.
  3. For each record, we are using the cursor_current_record variable to access specific fields on the current record. Since we’re doing a query on our answers collection to display answers we will use cursor_current_record.answer_text (the collection field we created, remember?)
  4. When the Move Next Record Action triggers a no more records event, we move to the Completed interaction.

The one above is the most readable version of a record loop but nothing is stopping you from doing everything in a single interaction using another great feature of Xenioo called Bookmarks:

flow example

Bookmarks are basically stop marks that can later be used to rewind the conversation flow to a specific point. In the example above we’re doing exactly the same thing but we’re always going back to the Bookmark to loop on all our records. More concise and exactly as efficient, but maybe slightly less readable.

Final Q&A chatbot question test drive

Let’s spin a new preview of our chatbot to see it in action.

Q&A chatbot template

How neat was that? We just created a dynamic content chatbot capable of displaying data based on free text questions. Xenioo is truly the ultimate no-code chatbot platform!

Until next time…

This is it for now. Our chatbot will be completed in our next post, where we will see how to build a dynamic carousel. Contact our personal trainer for real-time suggestions and collect our user’s feedback!

Any question about the features explained in this post? Do you want to let us help on your awesome bot idea? Be sure to get in touch with the Xenioo team at team@xenioo.com or leave a message on our Facebook Group.

The post How to build a complete Q&A Chatbot (Part 1) appeared first on Xenioo.

]]>
/how-to-build-a-complete-qa-chatbot-part-1/feed/ 0
How to Build Your Chatbot Library To Dramatically Speed Up Chatbot Creation /how-chatbot-library-speed-up-creation/ /how-chatbot-library-speed-up-creation/#respond Thu, 11 Mar 2021 13:37:01 +0000 /?p=7260 Chatbots (or chatbot library) creation has undergone all the phases related to product development. The very first chatbots seen in the wild, years ago, would be handcrafted, finely developed to suit exactly a single specific need. While intriguing from a certain point of view a one-to-one approach is not suitable for a multiple customers scenario. Time to market and costs would turn away all but the most dedicated clients. Not much later came tools like Xenioo. With Xenioo, chatbots are ...

Read MoreHow to Build Your Chatbot Library To Dramatically Speed Up Chatbot Creation

The post How to Build Your Chatbot Library To Dramatically Speed Up Chatbot Creation appeared first on Xenioo.

]]>
Chatbots (or chatbot library) creation has undergone all the phases related to product development.

The very first chatbots seen in the wild, years ago, would be handcrafted, finely developed to suit exactly a single specific need. While intriguing from a certain point of view a one-to-one approach is not suitable for a multiple customers scenario. Time to market and costs would turn away all but the most dedicated clients.

Not much later came tools like Xenioo. With Xenioo, chatbots are created at a much higher level. Single components with a single purpose are reused in multiple chatbots. This approach dramatically cut the costs of creation and personalization while maintaining a high level of customization.

As the market keeps growing and clients’ requests become more and more complex, Xenioo enters its third phase: full chatbot reusability. You are not just reusing a single component from the Xenioo library. You are creating a personalized library of actions and reusing fully functional parts of a whole chatbot without needlessly duplicating your work.

The Restaurant Chatbot

The restaurant chatbot is just our perfect example because it keeps things real and relatable while allowing us to touch all of the main characteristics of a chatbot:

  • A welcome section, presenting our restaurant
  • An AI training section, where our restaurant customers can place their food orders
  • An external data integration where we can retrieve our menu
  • Some form of calendar and table reservation
  • Confirmation of our order with integrations and alerts
  • Well-timed broadcasts to get back to customers who have a reservation or are waiting for a delivery

Building a chatbot like this can take time (hint: you can start from our free restaurant template!) but thanks to Xenioo clone, backup and restore features you can easily transform it into your very own template. When another customer needs a restaurant chatbot you can just reuse the whole chatbot again. Just change here and there the necessary data (the name probably as well as the menu) and you’re good to go.

Everything looks good. You acquire more customers and more restaurant chatbots are cloned and delivered.

This process works just fine. Until it doesn’t. Now you have ten different chatbots to maintain: changes and fixes need to be done on all chatbots. Updates and training must be done multiple times.

It is time to transform your chatbot into a product.

chatbots

Building your own chatbot library

The first step toward the generalization of your chatbot flow would be to create a general-purpose library of smaller components that can be reused in a number of other chatbots. It is not different from the concept of “library”, “module” or “component” we already know when talking about software development.

With Xenioo this is made possible by a single powerful action: the Include Interaction Action. This action will dynamically include any interaction from any other chatbot in your account in the current interaction.

Let’s take a look at the following interaction, inside a chatbot we will name “Global Library”:

chatbot library

What we do is pretty simple: we collect our user email, we update our backend CRM with the email information and send an automatic message to confirm it.

Imagine building your own library of standard components to dramatically speed up chatbot creation!

Later, we start building a new chatbot and we need exactly that kind of action. Thanks to Xenioo, we do not need to duplicate or copy everything again: we can simply reference that interaction inside our interaction! So instead of doing everything again piece by piece, we just use our Include Interaction Action:

include chatbot library

What happens is that Xenioo works his magic here and when the chatbot runs, that interaction is automatically retrieved from the bot “Global Library” and used inside our new chatbot! If you update the original interaction inside “Global Library” you just need to publish again the chatbot using it to update the included actions.

Standard Q&A flows, complex integrations or cloud functions with your own business logic. Imagine building your own library of standard components to dramatically speed up chatbot creation!

The Clone Master concept

Dynamically including parts of other chatbots can surely step up your chatbot game but what if we wanted to reference a whole chatbot? Our Restaurant Chatbot can surely benefit from a global pool of interactions but all restaurants chatbots are basically the same at their core.

What if we could create some kind of “referenced clone” of a chatbot? A chatbot that inherits all interactions, actions, AI training, and broadcasts from a master bot? That would be super cool right? Well, Xenioo got you covered again.

By simply adding the “Clone Master” package you enable yet another advanced Xenioo feature that will change the way the “Clone” button of your chatbot works.

Once the package is activated, as you click on the “Clone” button of your chatbot you’ll be presented with a choice.

The first one, “Full Clone”, is still the standard way of cloning you’ve probably already used in Xenioo: the whole chatbot is cloned and becomes a full, detached copy of the chatbot.

Selecting “Reference Clone” instead, will activate the Clone Master feature. Clicking on it will do a number of important things:

  1. Will transform the current bot into a Clone Master
  2. Will create a brand new bot, configured as a reference of the Clone Master

Looking at your chatbots from the My Bots you will immediately notice the two new chatbot types:

The first one, with a crown icon, is our Clone Master. The other one, with a chain icon, is our referenced clone.

Let’s see how they behave!

The Clone Master Chatbot

Besides being the Clone Master, our Restaurant chatbot hasn’t changed much. We are free to update and change things as we like just like any other chatbot. We can train AI, add new broadcasts and Audience as we please.

Our Clone Master can be published just like any other chatbot and can be alive on any channel we like. The only notable change: on the build section, inside the publish toolbar we can notice a new icon.

The new button can be seen as an additional publish. When we publish our chatbot we update the live version of it on all channels. When we use the update button on a Clone Master bot, we publish all of the updates to all of our referenced children.

You now have a Clone Master bot where, as an example, you could update or fix orders flow and then update all the same flows on all your referenced children.

We have just moved from a chatbot to chatbot, action to action single approach to an industrialized, agency level distribution.

Your Clone Master is your product and you’re distributing updates for all your customers!

chatbot clone master

Your Referenced Clones Chatbots

As you access any of your referenced clones chatbots you will notice how different they appear.

All of the chatbot interactions, intents, expressions, broadcasts, and audiences will be locked. Remember: all of these functionalities are now inheriting their data from our Clone Master.

create a chatbot library

But of course it wouldn’t be so very useful if we couldn’t change anything. We will need, at some point, to personalize our chatbot and this is where our “Detach” function comes in.

On any feature that is currently inheriting from our Clone Master you’ll notice a Detach command. Using the detach command will break the inheritance and transform the data to local data that can be changed at will.

Remember: only the specific feature is detached. Everything else stays referenced! This means that you can change specific behaviors to cover customer-specific requirements but you can still everything else work like in the Clone Master.

Does your customer need a different payment flow? Wants the training to be done differently? That is perfectly possible without losing all of the other functions that your restaurant chatbot has!

Best of all, your referenced clone is still a full chatbot: conversations, reports, publishing, and settings are all independent and can be freely configured without breaking any reference to the Bot Master.

To Sum Things Up…

Wow! We’ve just discovered how to really create and manage an army of chatbots! We are now ready to enter a whole new level of chatbot creation where you can really build a product, instead of a one-time solution!

Do you have any question about this features? Do you want to let us help on your awesome bot idea? Be sure to get in touch with the Xenioo team at team@xenioo.com or leave a message on our Facebook Group.

The post How to Build Your Chatbot Library To Dramatically Speed Up Chatbot Creation appeared first on Xenioo.

]]>
/how-chatbot-library-speed-up-creation/feed/ 0
How To Build A Slack Bot To Efficently Manage Your Timesheet /build-slack-bot-automated-messages/ Sun, 07 Feb 2021 19:25:34 +0000 /?p=4887 In this Slack bot tutorial we’re going to cover how we can use a chatbot and a conversational flow to efficently and frictionless record the time spent by each person of your team. When the Xenioo team started growing steadily a long time ago, two tools became the staple of our internal communication and company life: Slack and the timesheet. Being mainly remote, our team found Slack to be invaluable for communication and immediate sharing of information, ideas and content. ...

Read MoreHow To Build A Slack Bot To Efficently Manage Your Timesheet

The post How To Build A Slack Bot To Efficently Manage Your Timesheet appeared first on Xenioo.

]]>
In this Slack bot tutorial we’re going to cover how we can use a chatbot and a conversational flow to efficently and frictionless record the time spent by each person of your team.

When the Xenioo team started growing steadily a long time ago, two tools became the staple of our internal communication and company life: Slack and the timesheet.

Being mainly remote, our team found Slack to be invaluable for communication and immediate sharing of information, ideas and content. Our timesheet, that came later, is now a key indicator of where we’re putting more effort or where we’re bleeding precious time.

Given this premises, and given our company focus, it was just a matter of time before a full timesheet chatbot would be pitched and green lit.

We all agreed that the key points for us would be:

  • the chatbot would be accessible on Slack like any other user
  • the chatbot would use Xenioo AI engine to let everyone enter their timesheet with a conversational approach
  • the conversation should pose as little friction as possible, tolerating user typing mistakes and vagueness

Setting up the timesheet

As we all know that the primary purpose of a timesheet is to record how much time each person of a team is allocating on different projects. Truth be said, often timesheet applications are so cumbersome that more often than not, team members would ask to open a project named “Timesheet filling” to allocate the time wasted using them.

To make sure that it wasn’t the case for us, we went on a quest to find the easiest and leanest timesheet application available. Eventually, we found Harvest to be the best for us. It is clean, focused and has a good number of API ready to use for our integrations.

Once our account was created, we proceded to create our projects and add all the team members.

harvest integrations

Training Slack bot AI

The key point for our training was the idea that each user could enter their daily timesheet in a conversational fashion. No buttons or clicks but users saying things like “I’ve worked all day on Xenioo” or “I’ve been all the morning on ProjectX” and so on.

To achieve this kind of results we started setting up our intent with some very generic expressions. For example where we would use a generic “project” word when we expected the user to specify the project name.

The result would be a number of expressions like:

  • I’ve worked on project all day
  • I’ve just finished 2 hours of work on project
  • …and so on
start to create a slack bot

Our project word is of course an entity.

The challenge here would be to dynamically detect our project entity with the actual project name. The idea of having our entity pre-trained with all projects was quickly discarded though. In fact , projects and teams come and go and we didn’t want to keep going back to Xenioo to adjust configurations every time.

Thankfully Xenioo helped us tremendously here as we just changed our project entity type from standard to Wildcard.

Wildcard entities are special Xenioo entities capable of wrapping around any text inside the trained sentence and extract any dynamic content.

As we hit the training section we immediately saw this was exactly the right idea!

Even with some very basic training, Xenioo AI engine was already capable of detecting our dynamic project names and let us use them later in our flow.

What we were missing now was some kind of time information.

Users would most of the time say something like:

  • I’ve worked on project all day!
  • I spent the whole afternoon on project 🙁
  • 9 hours on project! can you believe that?

So we had not just information on the project but also some kind of (sometimes) general information about duration.

May we assume all day would be 8 hours or the whole afternoon to be 4? We just needed to extract that information too, so back to training!

We gave to all time information a first pass using Xenioo contextual entities creation:


Of course, we needed a little more complexity as we wanted to have as little changes as possible so that, on the flow, we would just need to check for a small number of variations.

To do this, we moved to direct entity edit. There we specified how our time information would be using synonyms and grouping.

Our very simple initial setup would look something like this:

So saying half a day or afternoon or morning would always be referred and transformed to half a day while all day or whole day to a complete day.

As you can see, we did not check for numbers. Xenioo engine automatically detects numbers in both figure and textual form so we’re getting those for free!

Our next test after some more training lead to a very satisfactory result. Time to hit the design flow!

Creating Slack bot flow

Where do we start to create a Slack bot on Xenioo?

Being a fully conversational chatbot, our flow would have very little (let’s say no) buttons. It need an initial “Project” interaction that would receive our AI trigger with project and time.

Once the interaction was created, we just configured our trained intent so that it would redirect automatically as soon as the expression was detected.

The first thing we want to do next, in our interaction, is to call Harvest API. In fact, we need to retrieve the list of all projects.

Unfortunately, Harvest doesn’t have a project search API. For this reason, we will need to actually download the whole list of projects. However this helps us in another way: we can leverage Xenioo comparison engine to find matches inside typos and misspells.

But first things first. Let’s start with the REST API call we needed to get our projects, which was quite easy to setup:

This call will basically retrieve all the projects that are available on Harvest as a structured json.

If successful, our variable that you can see named harvest-data, will contain the full json reply. It would look something like this:

{
  "projects": [
    {
      "id": 27664097,
      "name": "Xenioo",
      "code": ""
    }
  ]
}

What we’re looking for is the id and the name fields.

What we can see from the structure is that we’re receiving (of course) an array of projects.

Now we could use a Cloud Scripting Action to get the json from the harvest-data variable, transform it into a complete object and use a “for cycle” to check all the names. However, that would have hidden inside a script some important logic.

We decided instead to fully use Xenioo dynamic parsing and action capabilities to create a fully designed loop.

Creating a no-code loop in Xenioo

The fundamental idea of a no-code approach is that you are still doing what you would do by writing lines and lines of code but using a high level designer.

It is not quite different from designing your software using a meta-language, although in this case we’re using a graphical designer.

The first thing we need to do is initialize a looping variable. With great creativity, we’re going to call it loop. We’re setting loop to zero as we will be starting from the very first project and we will move away to enter the real loop right away.

Now, inside our loop we need to check if the project name is somewhat matching with the project our user has mentioned.

We’ll be using Xenioo dynamic JSON parsing and text comparison capabilities to check exactly the contents of the current entry.

The ingenious thing happening here is that Xenioo dynamic parsing is recursive. Therefore first {{loop}} will be replaced with its current value and then, using JSON dynamic parsing, we will be able to evaluate the value of name for the current project.

The value we want to check is the current value of project, the wildcard entity we’ve used in our AI (everything is coming together!).

Last but not least, we’re telling Xenioo comparison engine to accept an 80% similarity, which gives space to some typos and misspells.

If the project is found, we move to the project found interaction. If not, we increase our loop variable value and go back to the beginning.


Of course, we do not want to have loop go higher than the count of projects. To avoid this, we also add that check, using the Length keyword of Xenioo JSON dynamic parsing.

Our loop is done and completed in a true no-code fashion! What we’re missing now is to check that our conversation has all the data we need.

Handling incomplete chatbot requests

As you start working with user requests that are not coming from a fixed flow, you will quickly realize two very important things:

  1. Users may (and quite often will) use expressions you would never think of.
  2. Users may (and quite often will) split their request into multiple steps.

The first one is a matter of continuously training your AI.

You can surely do a great initial job (even more if you have already a good number of examples to import for AI pre-training). However, be ready to get back to check sample conversations or interactively re-train your AI using Xenioo real-time AI logs.

Of course, the more your chatbot will become capable of handling users request, the less you’ll need to come back to train your AI.

The second one, instead, means that while a user may say “I’ve worked all day on Slack”, another user may say “I’ve worked on Slack”. The first user has given us both the information we want: time and project. The second one, just the project.

To handle these cases, we need to check, in our flow, if everything has been extracted by our AI. If not, we need to ask the user to complete the information supplied.

Since the entity handling the time is called timeslice, we will check for that.

how to create a dialog flow chatbot


But what if our user fully specifies a number of hours? We said in the beginning, that Xenioo would automatically detect and create numeric entities parsed inside the user sentence. In this case timeslice, as we have defined it, could be empty, but we can still have a number.

Let’s make sure we also handle these cases too.

flow editor of xenioo

Once we’ve all of our data ready, we can simply call Harvest Time Entry API to add our work to the timesheet.

And what would be a full day of work without some motivational quote? Let’s add some of them too, making sure they are always random.

Our flow is done and ready for prime time!

slack bot flow on xenioo

Activating your Slack bot on the Workspace

To activate our chatbot on our Slack Workspace we must head to our Workspace Administration pages. Just make sure your Slack account has all the required administration privileges and move to the Apps area.

From there create your Slack App.

how manage slack api

Since Slack apps can be many things, we will need to specify we’re creating a Bot application. Give your Slack App a fancy name and save everything.

On the left menu, you should see a “Oauth & Permissions” link. Click on that and make sure to copy the Bot User OAuth Access Token value you see.

chatbot permission token slack


The token you’ve just copied is the only value you need to specify when publishing the Slack bot.

Let’s go back to Xenioo as we’re ready for publish now. Let’s pick the Slack channel, paste our token and click on publish.

That’s it! As soon as your chatbot is online, you’ll receive the very first start message on your Slack Workspace.

Your chatbot is alive and kicking!

how a slack bot works

To Sum Things Up…

Phew! That was a nice run, wasn’t it? So now you know how we internally manage our team timesheet using Xenioo and Slack.

In this post we also understood how to write a no-code loop, how to effectively train our AI in conversational chatbot by both direct expressions and import and how we could attach to external services using API.

Do you want to do something similar for you team and create a Slack bot? Then I’ve got very good news for you! This chatbot is now available for free among tens of other free Xenioo templates. Just sign up now and start building!

The post How To Build A Slack Bot To Efficently Manage Your Timesheet appeared first on Xenioo.

]]>
How To Create A Discord Chabot For Game Searching /how-to-create-discord-chatbot-for-game-searching/ Mon, 04 Jan 2021 09:31:39 +0000 /?p=3713 In this article we are going to explain how to create a Discord Chatbot with Xenioo technology. But why should we create it? Well, because Discord is currently one of the fastest growing chat communities all over the world. With 250 million users accounts and an average of 15 active million users daily it is becoming the platform of choice for a staggering amount of communities. Xenioo just added full support for Discord as a brand new channel! Designing our ...

Read MoreHow To Create A Discord Chabot For Game Searching

The post How To Create A Discord Chabot For Game Searching appeared first on Xenioo.

]]>
In this article we are going to explain how to create a Discord Chatbot with Xenioo technology. But why should we create it? Well, because Discord is currently one of the fastest growing chat communities all over the world.

With 250 million users accounts and an average of 15 active million users daily it is becoming the platform of choice for a staggering amount of communities.

Xenioo just added full support for Discord as a brand new channel!

Designing our Discord Bot

The target functionality for our Discord chatbot would be:

  • Wait for a trigger keyword from any user on a channel
  • Search game information on an API service
  • Present our results to the group

Thanks to Xenioo multi-channel designer, designing our Discord chatbot is exactly like designing any other chatbot so let’s start by the keyword trigger.

What we want is to catch any sentence starting with &search so that our chatbot is invoked only on specific requests by our users.

designing discord chatbot

The above screenshot shows how this is easily done by simply using a Global Detection based on a Text Expression.

We could push it further and train our AI to detect free text search but a simple keyword is perfect for our current example.

When the bot detect the keyword, we want to extract only the part of the search that interests us. To do that we simply remove the &search keyword and trim spaces from the final text.

building discord chatbot with Xenioo

The last message we added is just a small test we can use to check that our user_search variable really contains only the text for our lookup.

Integrating with a gaming API service

Now that we have the search text for our user we need a gaming API service that can provide us with information. For our example we picked RAWG, one of the top players in this business.

new and trending games searching

After acquiring an API Key for their service we need to integrate the URL method in Xenioo by using the standard API Action in our design.

how to create a discord chatbot

Our action will invoke the RAWG service submitting the user search and will store the resulting data into the search_results variable.

From there, using Xenioo Dynamic Parsing we can immediately check if we received any result.

how to create a discord chatbot

As you can see in our variable check we can directly refer to JSON variables as they were properties of our search_results variable: the count field, contained in the json can be specified simply as search_results.count.

The same way we notify the user with zero results we want to make sure that search is sufficiently refined.

Let’s add add another Variable Switch Action. It will checks if there are too many games found.

If our search results are in an acceptable range we display a result card to our user with a nice screenshot and some additional details.

Again, here we use direct Dynamic Parsing to refer to the model entry at index 0 (zero) without using any code at all.

how to create a discord chatbot

Discord does not support carousel cards but Xenioo will automatically translate the content to the next best thing: Discord Embedded Content.

A nice thing about Embedded Content is that it supports a nice view of multiple values that can be used to a good effect here and is fully supported by Xenioo.

Now that was quick! Our chatbot is ready and all we need to do now is publishing it on Discord.

Creating a Discord Chatbot

Creating a bot on Discord is a very simple process made of a few steps.

First of all we need, of course, a Discord account and with that login to the Discord Developers Portal. Once we’ve logged to our account we just need to create a new Application. Give it any name: it won’t be the name of the bot on Discord.

After you created the application, just click on the “Bot” menu option and create a new bot.

how to make a chatbot for discord without code

This time, give it a name you like and it will be the name that all users will see. Right below the bot name you’ll see the Token area: click on the copy button and go back to Xenioo.

On Xenioo, click on the publish button and the select discord. On the Auth Token field paste the token you just copied from the Discord bot page.

how to make a chatbot for discord without code

Since we’re on this page it would be a good idea to add a message filter for this bot.

Why? You can add your Discord bot on channels with hundreds of thousands of users and it wouldn’t be of any use to just parse every message: we can just get any message starting with a & (since our only command now is &search).

Save and click on publish. Your bot is online! Time to invite the bot to your channel.

Inviting the Discord chatbot

Your chatbot can live in any number of channels. Discord approach to bot is very interesting: you share an invite url for the bot that anyone can visit. As they visit the link they will see the option to add your chatbot to their server.

To build our invite link let’s go back to the Discord application page and select OAuth2 on the left menu. Scroll to the bottom in the scopes section click on “bot”.

how to make a chatbot for discord without code

An additional permissions area will open up. Select the basic permission for our bot following the ticks below:

how to make a chatbot for discord without code

Your invite link is now ready. Click on copy and share your awsome game searching Discord chatbot to the world!

how to make a chatbot for discord without code

To Sum Things Up…

We’ve just seen how easy it is to integrate Xenioo new Discord channel and create a stunning Discord chatbot with it.

You can find this chatbot template in the Xenioo Template page of your account. Don’t yet have a Xenioo account? Just create one for free here!

Do you have any question about this chatbot? Do you want to let us help on your awesome bot idea? Be sure to get in touch with the Xenioo team at team@xenioo.com or leave a message on our Facebook Group.

The post How To Create A Discord Chabot For Game Searching appeared first on Xenioo.

]]>
How to create a basic WhatsApp Chatbot /how-to-create-a-basic-whatsapp-chatbot/ Wed, 18 Nov 2020 17:50:28 +0000 /?p=3519 WhatsApp is one of the most used messaging channels in the world and WhatsApp chatbot is the new revolution around the corner. In fact, WhatsApp has over 2 billion users around the globe. But did you also know that you can automatically chat with your customers via WhatsApp? That you can have one-on-one conversations with your customers, at scale? If you didn’t, it is possible. And in this article, I will explain what WhatsApp chatbots are, why you need to ...

Read MoreHow to create a basic WhatsApp Chatbot

The post How to create a basic WhatsApp Chatbot appeared first on Xenioo.

]]>
WhatsApp is one of the most used messaging channels in the world and WhatsApp chatbot is the new revolution around the corner.

In fact, WhatsApp has over 2 billion users around the globe.

But did you also know that you can automatically chat with your customers via WhatsApp? That you can have one-on-one conversations with your customers, at scale?

If you didn’t, it is possible.

And in this article, I will explain what WhatsApp chatbots are, why you need to use them, and how you can create one yourself using Xenioo.

YouTube Video

What is a WhatsApp Chatbot?

A WhatsApp chatbot is an automated conversation partner on WhatsApp.

Usually, when you chat on WhatsApp, you are chatting with another person. But with chatbots, this is different. Because you are not talking with another person, but with a computer.

The benefits of a WhatsApp Chatbot

Because you can automatically talk with your (potential) customers, you can have one-on-one conversations, at scale.

This means that your chatbot can have personalized conversations with each one of your users and it could be talking to thousands of people at the same time.

So, what are the benefits of such a WhatsApp chatbot?

First of all, a WhatsApp chatbot can have a significant impact on your customer service. For example, you can drastically reduce your customer service costs. Your customer service probably handles a lot of standard questions every day and it is proven that 80% of these questions can be easily answered by a chatbot. Besides, your chatbot can reply in seconds to customers’ questions instead of hours (or even days). Moreover, your chatbot is always available. Instead of using live chat where a customer needs to wait on an available live chat agent, you can use a chatbot that is always ready to respond to questions.

Secondly, you can boost your sales by using a WhatsApp chatbot. With a chatbot, you can directly sell your products to your customers and let them pay via the chatbot. Think of it as like an eCommerce store inside your chatbot. Another way would be to promote your products and services via the chatbot.

The third benefit of chatbots is that they can automatically qualify your leads, which is especially useful for B2B companies. In most B2B companies, there are some qualification rules to determine whether a lead could become an actual client. They ask questions like:

  • What industry are you in?
  • How many employees does your company have?
  • What is your role inside the company?

But often these questions are asked by humans. But why would you not automate this? The chatbot can ask these qualification questions and if the lead is qualified, he/she will be forwarded to a sales agent (that can close the sale).

So in short, a chatbot:

  1. Can have personalized conversations, at scale
  2. Drastically reduce your customer service costs
  3. Can reply to your customers in seconds
  4. Is always available for your customers
  5. Increase your sales
  6. Automatically qualify your leads

Why WhatsApp is the best platform to engage users

So now we know why we need to use a chatbot, why should we put it on WhatsApp?

As said before, WhatsApp has over 2 billion users worldwide.

From these 2 billion users, 1.6 billion access the app on a monthly basis. This results in 65 billion WhatsApp messages that are sent on a daily basis.

With so many people on one channel, it is safe to assume that your customers are also using it.

And you need to be on the channels where your customers are.

Different types of chatbots

In general, there are two types of chatbots:

  1. Standard-guided chatbots
  2. Pure conversational chatbots

Or you can have a mix of both (probably the best way).

Standard-guided chatbots

Standard-guided chatbots are chatbots that are mainly based on rules. These chatbots often use buttons to guide the user to a specific part of a conversation. Also, the user often cannot talk freely to the chatbot, because the chatbot is not smart enough to handle it.

Benefits of standard-guided chatbots

  • Good for qualification of leads
  • Control of the conversation flow

Drawbacks of standard-guided chatbots

  • Falls short when users want to ask questions freely
  • Can lead to frustration

Pure conversational chatbots

Pure conversational chatbots are more advanced types of chatbots. They can understand the intent of the user and the context of the conversation, by using Artificial Intelligence techniques. With these types of chatbots, the user can ask anything they want, and the chatbot probably often provides a good answer or redirects the customer to a live chat agent.

Benefits of pure conversational chatbots

  • More natural conversations
  • Chatbot can understand the intent of the user
  • Chatbot can understand the context of the conversation
  • Users can ask more advanced questions

Drawbacks of pure conversational chatbots

  • Higher costs, because of Artificial Intelligence techniques
  • Development of the chatbot takes longer

Create your First WhatsApp Chatbot

So, now we know why we need to use a WhatsApp chatbot, let’s create one ourselves using Xenioo.

And as an example, we will create a chatbot for a Pizza restaurant.

First, go to the Xenioo console and log in with your account credentials.

(If you don’t have an account yet, you can create one here).

When you are logged in, you can click on Create New Bot:

This will automatically create a standard chatbot flow for you, which should look like this:

So, let’s start by editing the name of this flow to “Welcome Message” by clicking on the gear icon on the top-right corner. Then, you can just type in “Welcome Message” and hit Save

Before we are proceeding, I recommend that you already create three chatbot behaviors in Xenioo. You can do this by clicking on the Add new behavior icon in the top-center:

What are these chatbot behaviors? These are for:

  • Ordering a pizza
  • Making a reservation
  • Showing the menu

Now, head back to the Welcome Message behavior and go to the Start Interaction. You can just change the text by clicking on the element and type in a new message in the right panel and clicking on Save:

Then, we need to make three buttons for the Order pizza flow, Make a reservation flow and Showing the menu flow.

We can do this by clicking on the gear icon of the start interaction and then clicking the Add new action

Here, you can select the Quick Reply Button:

Next, you can set the text of the button with Button Title and set the “Go To Operation”, which will move the conversation to another interaction:

NOTE: WhatsApp doesn’t support showing buttons. Instead, the buttons are shown as plain text as “If you want to go to the menu, type in 1”. 

Now you can do the same for the Making Reservation button and Menu button, so it looks like this:

Before we move on, I want to tell you about two awesome features of Xenioo regarding buttons.

The first one is called the “Alternate text”, which displays an alternate text for text-based channels (such as WhatsApp). 

So one a more visual channel (like Facebook Messenger), Xenioo will show the Button Title, but if you have set the “Alternate Text”, this will be shown on WhatsApp:

With this example, the button on Facebook Messenger will show ‘Menu’, while on WhatsApp it will show “See our menu”.

The second feature is called “Trigger Text expression”. Let’s say the user chooses not to use the buttons, but instead just types in “menu”. Then, your chatbot will break (because he is not familiar with that). This feature fixes that, so if the user types in “menu”, it will go to the appropriate flow:

Now, let’s first create the ‘easy’ flows: Make a reservation and showing the menu.

The Make a reservation flow is also pretty straightforward for this tutorial, just tell the user that they can make a reservation via a phone call or your website:

With the menu, we need to change the text and add the File Download action:

If you select this, you can set the URL of the your Restaurant menu:

So the Menu flow looks like this:

Next, we are going to do the more advanced part: Ordering a pizza.

Before we are going to deep dive into this flow, start by creating five interactions and name them like this:

  • Check on toppings
  • Check on size
  • Pizza with topping and size
  • Pizza confirmation
  • Start over

You can do this by clicking on the Add new interaction icon in the top-center:

And naming them accordingly by just clicking on them and changing the Name:

Now, head back to the Start interaction of the Order pizza flow and start by asking a question:

NOTE: We will handle the response to this question later on in the NLP part, so don’t worry about that now 😉

Next, we are going to set the actions for the “Check on toppings” interaction. This interaction will check whether the user has typed in a topping. If the user has filled in one, we will move on to the next interaction and otherwise, we will go back.

We can do this by selecting a Variable Switch as action (Under the ‘Flow’ section):

And check whether the topping has any value:

By the way, ‘topping’ is a variable name I created. You can just type in a variable name and click on “Add new variable” and Xenioo will automatically create it.

Accordingly, we need to determine what happens if the topping has a value. And we can do this by clicking on Add operation and select the Go To Bot interaction:

The Go To Bot interaction will redirect the conversation flow to the next interaction (Check on size):

But what happens when the user didn’t type in a valid topping? Then, they will go back to the previous question (using another Go To Block action):

With the next interaction (Check on size), we are doing a similar thing, but then we check on the size of the pizza, instead of the topping.

So, we will add a Variable Conditional Switch to this block that checks on the size:

If the size already has a value, we continue with the “Pizza with topping and size” interaction, and otherwise we are going to ask a question.

NOTE: Now, you might be thinking “Huh, but we didn’t ask for the size, yet?” That is completely true! We will cover this in the next section where we will handle the NLP part of our chatbot 😉

Now, let’s create the question that asks for the size of the pizza. You can just add the Text action and type in “What size pizza do you want?”:

Then, we need to add three buttons for “Small”, “Medium” and “Large”, which all go to the next interaction. For each of the buttons, click on Add Operation and select Set User Variable (under Profile):

We can use the Set User Variable to change the variable size to small:

NOTE: Don’t forget to also add the Go To action, which makes sure the flow goes to the next interaction (“Pizza with topping and size”)

Now, you can do the same for the Medium and Large buttons, so it looks like this:

Lastly, we need to ask whether the user is satisfied with the chosen toppings and size of the pizza. You can do this by adding a Text action and two buttons for Yes and No.

Afterwards, you can connect the buttons to the right interactions. If the user is not satisfied with the pizza, the chatbot can start over again by connecting the “Start over” interaction with the first interaction.

Because we already covered all the things you need to know to do this, I assume you can handle this yourself 🙂

Here is the final flow of the Order pizza behavior inside Xenioo:

Use NLP to make your chatbot smarter

What we’ve created now, is what you would call a standard-guided chatbot.

But, as you might remember, we still need to handle the input for the toppings and size of the pizza, so that people can just type in what pizza they want.

We can do this by using the NLP feature of Xenioo

Thus, let’s start by creating an intent. An intent is an action your user wants to do, such as ordering a pizza. So let’s create an intent for exactly this.

In Xenioo, you need to go to the AI section and then click on Add intent:

Here, you can type in the name of the intent and click on Save:

Next, we need to give the chatbot certain training phrases, so it knows when this intent is triggered. You can do this by just typing in phrases and hitting Enter:

Then, we need to make sure that the chatbot understands the difference between a veggie pizza and a mozzarella pizza. We can do this by using entities

Entities are useful facts the user is saying, such as the size of the pizza or the kind of topping they want. In Xenioo, you can just click on one of the words and tell Xenioo it is a size:

And you can do the same for toppings:

You can extend these entities, by going to the Entities section, click on the three dots and choose for “Edit”:

Here, you can extend the entity values. For example, for topping you add more toppings, such as:

  • Beef
  • Sausage
  • Bacon

And we can also do that for the size entity:

But, how are we sure that this is actually working? By using the Train & Test feature of Xenioo. You can just type in a sentence and Xenioo will give you the matched intent and entities:

There is just one last thing, how do we use this inside our chatbot flow?

Go back to your Order Pizza behavior and choose for the Start interaction. There, insert a new action called NLP Input (under Input):

Then, you just need to make sure that if it matches the Order Pizza intent, that it automatically goes to the “Check on size” interaction:

Chatbot Fallback: What to do if the chatbot doesn’t understand the user

But what happens when the chatbot doesn’t understand the user?

Then, you need to make sure that there is a human that can ensure a good user experience.

And I have written a full guide on this, that you can read here.

Deploy your chatbot on WhatsApp

Now we’ve created our complete WhatsApp chatbot inside Xenioo, we can deploy it on WhatsApp.

And Xenioo does provide a lot of direct integrations with WhatsApp service providers.

One of them is Kaleyra Cloud, which is the one we are going to use in this tutorial, and one of those providing WhatsApp Business API integration.

So, if you don’t have an account on Kaleya Cloud yet, I recommend you to create one

First, we need to go to our chatbot in Xenioo and click on Publish:

Here, you can choose for WhatsApp (Click on Settings under WhatsApp):

Then, we can select Kaleyra Cloud as our provider:

As you can see, we need some information of Kaleyra to get this to work, so let’s get it.

If you log in at Kaleyra, go to Developers and click on Create API Key:

Then, a pop-up opens and you can give it a title and click on Save:

If everything went good, you must get the following confirmation:

NOTE: I recommend to click on “Download” to make sure that you have stored your API key securely (we need this in the next steps).

Next, we need to go to Channels → WhatsApp → Click on Manage:

Then, choose for Configuration and click on Add number:

Here, you need to specify the number you are going to use on WhatsApp and the incoming URL (which is the “Hook URL” inside Xenioo):

Then, if we go back to Xenioo, we need to fill in our:

  • Sender phone number
  • API Key
  • Account SID 

If you have done this, you can click on Save:

And that’s it! Now, your chatbot is working on WhatsApp!

How it looks on WhatsApp

And here is how it looks on WhatsApp:

That’s it

That’s it! That’s how you create a basic WhatsApp chatbot with Xenioo.

Next article we’ll continue with that basic chatbot enhancing it with new options and make it ready for production.

Have any comments or would like to discuss Xenioo and chatbots?

Join the Facebook group and let us know!

The post How to create a basic WhatsApp Chatbot appeared first on Xenioo.

]]>
4 Effective Way To Deal With Your Chatbot Privacy And Data Safeness /4-effective-way-to-deal-with-your-chatbot-privacy-and-data-safeness/ Sun, 04 Oct 2020 11:26:39 +0000 /?p=2998 When dealing with sensitive conversations we all know how important is to protect your users privacy and keep their information safe. And that’s why we wrote this article, to speak about chatbot privacy policy. Chatbots are becoming ubiquitous and people are getting more and more used to trust them with private information, personal preferences and sometimes even account passwords and data. Users may (and will!) share sensitive data during their conversations. How you handle this data and manage your trust ...

Read More4 Effective Way To Deal With Your Chatbot Privacy And Data Safeness

The post 4 Effective Way To Deal With Your Chatbot Privacy And Data Safeness appeared first on Xenioo.

]]>
When dealing with sensitive conversations we all know how important is to protect your users privacy and keep their information safe. And that’s why we wrote this article, to speak about chatbot privacy policy.

Chatbots are becoming ubiquitous and people are getting more and more used to trust them with private information, personal preferences and sometimes even account passwords and data.

Users may (and will!) share sensitive data during their conversations. How you handle this data and manage your trust relationship with you users is now of the utmost importance.

In the following sections, we’ll see how Xenioo provides all the tools you need to guarantee privacy and data safeness.

1. Why you should use the chatbot privacy opt-in

If your chatbot is processing user data or sending offers related to your products you may need to ask consent. Additionally, you will need to make it to guarantee that your user choice cannot be altered in any way.

While it is still on your flow to honor any kind of privacy setting the user has requested, it has been proven that a chatbot asking for privacy permissions tends to put most users at ease with any conversation.

Out of the box, Xenioo offers a full privacy opt-in action, built exactly for this purpose.

setup chatbot privacy

Placing this action at the first step of your chatbot will automatically create an opt-in request for privacy standard permissions.

User choices will enable specific conversation privacy flags that cannot be altered in any way by you and that secure the exact user response.

chatbot privaci opt-in input

Users may (and will!) share sensitive data during their conversations.

2. The right to be forgotten

Additionally, your chatbot may offer your users the power to exercise their right to be forgotten.

The right to be forgotten is the right to have private information about a person be removed from Internet searches and other directories under some circumstances and it applies to chatbots too. Your users may ask you to forget them and remove any conversation exchange you’ve had with them.

Again, Xenioo got you covered with a simple and effective action.

right to be forgotten chatbot privacy

By using this action in any point of the conversation, or by using it directly from your conversation command center, you will instruct Xenioo to delete each and every information collected about the active user.

After this command is executed no information about this user will remain on any of the Xenioo services.

Please note that deleting user data is different from allowing your users to change their privacy preferences. In the first case you’re literally wiping any data that Xenioo has about your contact while in the latter you would ideally show again the privacy opt-in to allow changes in usage preferences.

3. Hiding conversations data

Everything your user says to your chatbot is recorded and readily made available in the conversations section.

Every operator that can access the conversation section to give support can potentially see variables, inputs and detailed profile information.

While flow information like chosen product or current coupon points (just to name a couple) may be relevant from a support standpoint, there may be many other cases where information should never be disclosed, even to users that should help your customers.

Chatbots are becoming ubiquitous and people are getting more and more used to trust them

If this is your case, you can use the fine-grained users permissions granted by the PRO Team package. You can hide conversation variables from your support team.

They will still be able to access and see any (and only) assigned conversation, but they won’t be able to access variables, tags and privacy settings in any way.

people privacy

4. Volatile conversations

In some cases the data of shared during a conversation may be so sensitive that in no way it should be persisted.

No trace of the conversation should remain on Xenioo for any reason at any given time. Moreso, the conversation should not even temporarily be saved on any Xenioo medium as if it never really existed but temporarily, on Xenioo memory.

Only the chatbot and the user should know about this conversation and nothing should remain after the conversation is finished.

How can this be possibly achieved? By using Volatile Conversations.

Volatile Conversations are created using “Forget User” action we’ve seen previously and by enabling the “Enable user activity until deletion”.

Putting this action at the very beginning of your chatbot will force Xenioo to run all the conversation in memory without ever saving anything anywhere.

The conversation is considered offline after about 5 minutes the user has said anything. Xenioo will just flush all the data from memory and totally forget it ever happened.

If the user comes back it will be threated as a brand new user, never seen before.

Chatbot privacy and data safeness: Wrap Up

We’ve just seen a good number of different privacy options that can cover all of the possible needs your chatbot can have.

Whatever are your requirements, Xenioo is capable of fully supporting your conversational design and comply with your privacy policy rules.

Or not? Does your chatbot have requirements that Xenioo is not yet covering? Join our Facebook group and let us know!

The post 4 Effective Way To Deal With Your Chatbot Privacy And Data Safeness appeared first on Xenioo.

]]>
How To Increase Your Chatbot Conversion Rate /how-to-increase-your-chatbot-conversion-rate/ /how-to-increase-your-chatbot-conversion-rate/#respond Wed, 22 Jul 2020 10:13:44 +0000 /?p=2944 If your chatbot target is to create potential leads or groups of people interested in one or more products you are well aware of how lost conversations represent a good percentage of your contacts. This article was written for this reason. To explain how to increase your chatbot conversion rate. A lost conversation is when a user leaves before signing up for your service or completing the questions you’ve prepared. How can we get back to the user sometimes later ...

Read MoreHow To Increase Your Chatbot Conversion Rate

The post How To Increase Your Chatbot Conversion Rate appeared first on Xenioo.

]]>
If your chatbot target is to create potential leads or groups of people interested in one or more products you are well aware of how lost conversations represent a good percentage of your contacts. This article was written for this reason. To explain how to increase your chatbot conversion rate.

A lost conversation is when a user leaves before signing up for your service or completing the questions you’ve prepared.

How can we get back to the user sometimes later to try to reconnect? Let’s read on and learn how you can easily do it with Xenioo.

First interaction to improve Chatbot Conversion Rate: “Hello? Is There Anybody Out There?”

One of the first options we can use to get back to our users is a broadcast. A broadcast is basically a scheduled push that can be set to be sent to a specific time, date and time or even on demand.

Let’s consider a very simple chat flow like this one:

first interaction to improve chatbot conversion rate

This flow, on Whatsapp (as an example) lead to a conversation like this:

First interaction preview

After this, our user leaves the conversation. Since we want to detect these cases, the first thing we need is a way to check if the user has passed our question. We are using a tag action for this and changing the flow as follows:

tag waiting answer to improve chatbot conversion rate

Basically what we are doing is set a WAITING_ANSWER tag before the question and remove it right after. This way we know that if a conversation has a WAITING_ANSWER tag then the user is waiting at the input, otherwise the flow has completed and we’ve our email.

Setting Up Your First Broadcast

What we need to do now is create a broadcast that now and then checks for all users that still have the WAITING_ANSWER tag and contacts them to check back. Using broadcasts you are basically creating a “Scheduled Task” that your chatbot can execute every specific interval.

To reach our goal we can easily create a On Interval broadcast that loops every 1 hour and is directed to only a specific audience, like in the picture below.

Since we don’t want to check back to all users every hour we make sure to create and select a specific user that can be quickly generated using the Broadcast Audience Creator. The resulting filters will look similar to this:

creating chatbot audience

Once the basics are down we can move to the Design section of the broadcast, where we can lay down the part of the flow that handles the reconnection. The broadcast design is identical to the general chatbot design and in fact, you can do here everything you can do in your normal chatbot.

After saving (and enabling!) the broadcast we can go ahead and test our reconnection with our previous conversation. When the time you’ve chosen for your broadcast is triggered, Xenioo will automatically send your message to the user.

At this point our user is back in the game and its again up to us to re-engage the conversation so that it is lead to our desired conclusion.

Wait! We can do Better to improve our chatbot conversion rate

While our previous example is simple and effective, it has a couple of flaws that will become very clear as more users are reached and more time is spent online by our chatbot.

  1. The broadcast is executed at a specific time, regardless of when the user abandoned the conversation. A user that left the conversation 5 minutes ago would be contacted together with someone who left it an hour ago. It would be better to have a relative time for every single user.
  2. After the broadcast, there’s no way for the user to go back to the flow that was executing. Even if we get back to the user we’re not moving back to the question that is important for us.

Let’s address point one immediately by simply changing our broadcast type on-flight: from a simple On Interval, we switch to an On Trigger one.

On Trigger broadcasts are one-to-one user broadcasts that are triggered by a specific user action. While audience rule are still applied to this broadcasts only one user will be receiving it based on its conversation triggers.

For example, for our bot, we can select a trigger that starts 20 minutes after Last Interaction. This configuration means that after 20 minutes from the last time a user wrote something the trigger will start. This is just perfect for us because it’s exactly what we need. If our user goes idling for more than 20 minutes we go and try reviving the conversation.

“On Trigger” broadcasts are always targeting a single user in a single conversation but you can still use audiences to filter for a very specific user variable or tag so that even if the broadcast is triggered it is not sent.

What Was The Question Again?

Our second bullet point is little trickier but still very doable.

What we need to do first is split our flow into two parts like below:

We have basically moved all but one action to another interaction and linked them with a Go To Action. All of this can be done very quickly by simply dragging and dropping the desired contents. It has only one purpose: to have a single, repeatable interaction to be invoked later by our broadcast. We will see very soon why.

In our broadcast, we are changing the flow so that the user can be asked if there’s still a chance to complete our flow and if the answer is yes we can now redirect to the Ask Email interaction.

The user will see again the question (which is fine as we’re giving some context to the request) and will be back from where the conversation was left.

This is how our final conversation may look like:

improving chatbot conversation rate preview

A much better result. User is reconnected with a brief interaction and the chatbot is capable of reconnecting back to where the user left. A good user experience overall and a good way of pushing to all your idling contacts.

If you look at the conversation it now becomes clear why we did the initial split into two interactions. We can now redirect the user to the initial step of the question. And repeating the brief explanation text that gives context to the question.

I Wish I Had Just One Question Like You!

Yes, of course! Chatbots are rarely a matter of just one question and if you have more than two, or three? Or twenty? Having so many questions may make building this kind of approach really difficult.

But once again, we have a neat solution.

For any case when you need to redirect to a dynamic point in the conversation that you really don’t know beforehand you can use a bookmark action.

A bookmark action will basically put a bookmark (how unexpected! ;)) on the current interaction. After the bookmark action is executed you can use any Go To Action to redirect there in any part of the flow.

Lets expand our initial example to a more complex one. With multiple questions, we could design our chatbot to be something like this:

visual builder flow

As you can see, the flow isn’t actually much more complex. It is just a bunch of questions one after another but we have now added a Bookmark action on top of each interaction. Now we know exactly where the user is stuck.

The change in our broadcast design is even easier.

All we need to change is the tiny Go To option from “Absolute” to “Bookmark”. What will happen is that Xenioo will automatically redirect the user to the last dynamic bookmark position.

chatbot conversion rate final step

And that’s it! We have now our full reconnection flow with personalized followup and dynamic question redirection. Now we are ready to boost our lead generation and improve our chatbot conversion rate.

Time Is Of The Essence

Privacy settings and platform-specific limitations may be stopping your reconnection plans. Reconnecting with users after a long while may catch them by surprise in an unpleasant way.

Some platforms like Telegram or WhatsApp will not stop you from doing so. But others like Facebook may try to ban your page for attempting mass contact outside of Message Delivery time windows.

Improving chatbot conversion rate: Wrap up

We just did a deep dive into some of the most interesting features of Xenioo and we saw some tips to improve chatbot conversion rate.

In this post, we’ve been highlighting both its power and flexibility. You should now have the basics for adapting your chatbot flow and create an even better chat experience.

If you are not sure about the best way to check back to your users or how to create a chatbot like this or even how to comply with different platform’s rules, feel free to contact our team at team@xenioo.com or leave a message on our Facebook Group.

The post How To Increase Your Chatbot Conversion Rate appeared first on Xenioo.

]]>
/how-to-increase-your-chatbot-conversion-rate/feed/ 0