Templates – Xenioo Wed, 11 Jan 2023 16:06:21 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.12 /wp-content/uploads/2022/02/cropped-badge_611x611-32x32.png Templates – 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
Learn How To Create A Telegram Group Chatbot /learn-how-create-telegram-group-chatbot/ /learn-how-create-telegram-group-chatbot/#respond Thu, 14 Feb 2019 14:13:26 +0000 https://wp.xenioo.com/?p=993 In a previous tutorial, we saw how to create and deploy a Telegram chatbot using Xenioo. While we did cover the basics of single and group conversations and the concept of bot privacy, we didn’t go into the depths on how to fully manage a Telegram group chatbot. This time we are going to see exactly this: we will create a very simple chatbot that will act as a group manager and moderator. Telegram Group Chatbot Privacy Mode When building you ...

Read MoreLearn How To Create A Telegram Group Chatbot

The post Learn How To Create A Telegram Group Chatbot appeared first on Xenioo.

]]>
In a previous tutorial, we saw how to create and deploy a Telegram chatbot using Xenioo.
While we did cover the basics of single and group conversations and the concept of bot privacy, we didn’t go into the depths on how to fully manage a Telegram group chatbot.

This time we are going to see exactly this: we will create a very simple chatbot that will act as a group manager and moderator.

Telegram Group Chatbot Privacy Mode

When building you chatbot using the BotFather, you will notice multiple configuration options where you can change the name, the avatar and some other settings.

One of these options is /setprivacy and can be used to turn on or off “Group Privacy”. What is it exactly?

  • With Bot Privacy OFF, your chatbot will receive every message that is sent to the chat by any user. If you have a hundred thousands users in your group, Xenioo will receive all of the messages and process them.
  • With Bot Privacy ON, none of the messages sent by any user will reach Xenioo. Only messages starting with the symbol ‘/’, or direct mentions of your chatbot, will be received.

By default, Bot Privacy is ON and for our example, we will leave it as it is.

As we said, we are going to create a Group Manager and we do not want, for now, to check all users messages.

Reacting to Chat Commands

As explained, with group privacy turned on, we will be receiving only chat messages starting with a ‘/’. A typical use of these commands are /help or /about but you can just handle whatever command you like.

Using Xenioo global bot operations you can handle these commands very easily and make sure that they are always triggered whatever the status of your chatbot.

set up the telegram group chatbot response at chat commands

In our chatbot sample, the /hep command will reply with a very simple bubble proposing two different commands.

Whatever text starts with a ‘/ ‘ symbol inside a Xenioo text will be transformed into a link command inside the Telegram Bubble.

The user can write the command or just click on the command link inside the bubble to invoke your chatbot again.

test how chatbot responses

see the telegram group chatbot answer in preview

Users coming and going. Manage them with your Telegram Group Chatbot

As soon as you add your Xenioo chatbot to a Telegram group you will start receiving events related to every user joining and leaving.

Each event will trigger chatbot populating specific variables you can use in your flow to react and eventually welcome.

Managing variables and messages have been covered in multiple articles so we will be focusing now only on which variables are available to you whenever your chatbot is invoked in a Telegram Group.

VariableValore contenuto
telegram_new_users_countContains the number of new users added. If the value is equal to zero, no user has been added.
telegram_new_user_<num>Contains the full username of one of the users that just entered the group where <num> represents the index number of the user.
telegram_new_user_<num>_typeContains the type of user that just joined the group where <num> represents the index number of the user. The value can be either USER for a normal user or BOT for a bot.
telegram_user_leavingContains the full username of the user that just left the group.
last_userContains the full username of the last user that sent a text or a command in the group chat .

Users can be added massively with a single invite so make sure to always check for the correct number indicated by the telegram_new_user_count variable.

On big groups, it is not uncommon to have tens of users joining altogether. Using Xenioo variable manipulation capabilities you can create a simple loop very easily.

xenioo visual builder

On the other hand, users leaving can be multiple but never massive as removal is immediate and never simultaneous. Variable telegram_user_leaving value is always related to a single user and your flow will be called for each user.

Overseeing users behavior

Another important aspect of managing groups is overseeing users behavior.

If your group runs with specific policy, for example, a chatbot can be a very effective way of enforcing it. Xenioo gives not only the tools to detect user text but also to kick them from the group.

The first thing to do is turn off group privacy on your bot: this will allow Xenioo to receive and process each and every message that goes in the group.

After this, you can easily create an NLP intent containing all of the expressions that you do not want your users to use.

The expressions can vary from simple, even single word entries to more complex sentences covering different topics. The Xenioo NLP engine will automatically train itself and detect also texts that are different but express the same intent.

Once you’re satisfied with your intent, we can link it to our global chatbot operations and attach it to an interaction.

set up npl of your telegram group chatbot

As you can see from the diagram our approach is to give the user up to 3 warnings before taking on final action.

User warning count has its own variable and chatbot will be able to take note of count even after months. You can go ahead and reset counter once in a while using just a broadcast.

Having a high number of users may require a more complex and database oriented approach but for our example, it is going to be just fine.

Your Personal Group Manager

We’ve just seen how building a Telegram Group Manager bot with Xenioo is incredibly easy and flexible.

Want to try it right away? There’s a free template built exactly like this example and ready to be used for your project in your account.

Do you have any special request or requirement for your Telegram group? Let us know in our community group or just drop a line to our team!

The post Learn How To Create A Telegram Group Chatbot appeared first on Xenioo.

]]>
/learn-how-create-telegram-group-chatbot/feed/ 0
Come creare un chatbot per moderare un gruppo Telegram /come-creare-un-chatbot-per-moderare-un-gruppo-telegram/ /come-creare-un-chatbot-per-moderare-un-gruppo-telegram/#respond Thu, 14 Feb 2019 14:13:26 +0000 https://wp.xenioo.com/?p=993 Scopri come utilizzare Xenioo per creare un semplice e versatile chatbot per la gestione e moderazione di un gruppo Telegram. All'interno disponibile anche il template gratuito da riutilizzare nel proprio account Xenioo.

The post Come creare un chatbot per moderare un gruppo Telegram appeared first on Xenioo.

]]>
In un nostro precedente articolo abbiamo visto come creare e pubblicare un chatbot per Telegram usando Xenioo.

Abbiamo spiegato le basi di come gestire una conversazione singola o di gruppo ed i concetti legati alla privacy del bot, ma non siamo entrati nel dettaglio di come poter gestire un gruppo su Telegram attraverso un chatbot.

L’obiettivo di questo articolo è proprio questo: vi mostreremo come creare un semplice chatbot che funzioni come gestore e moderatore di un gruppo Telegram.

Impostare la privacy di un gruppo Telegram

Nella creazione del chatbot attraverso il BotFather, avrai notato come è possibile configurare una serie di opzioni come il nome, l’avatar e molte altre ancora.

Una di queste opzioni è la /setprivacy e può essere impostata per abilitare o disattivare la “Group Privacy“.

Ma cos’e’ la Group Policy di Tegram?

  • con la Group Policy OFF (disabilitata), il chatbot riceverà ogni messaggio inviato dagli utenti. Se il tuo chatbot ha migliaia di utenti nel gruppo, Xenioo riceverà e processerà tutti i messaggi inviati da ciascuno di essi.
  • con la Group Policy ON (attivata), nessun messaggio scritto dagli utenti in chat raggiungerà Xenioo. Gli unici messaggi che verranno ricevuti e processati da Xenioo saranno quelli che iniziano con il carattere ‘/’ oppure menzioni dirette.

Per impostazione predefinita, la Group Policy è impostata ad ON ed è quindi attivata.

Per il momento lasceremo l’impostazione della privacy predefinita, in quanto non ci interessa ricevere tutti i messaggi degli utenti per gestire i comandi nel gruppo. Vedremo successivamente come disattivarla quando dovremo configurare il nostro chatbot per funzionare anche da moderatore del gruppo.

Rispondere ai comandi ricevuti in chat

Come descritto nel paragrafo precedente, con la Group Privacy attivata, il chatbot riceverà solo i messaggi che iniziano con il carattere ‘/’. Chiameremo questi messaggi “comandi”.

L’utilizzo tipico di questi comandi è per richiedere aiuto (/help) oppure informazioni aggiuntive (/about), ma è possibile creare e gestire qualsiasi tipo di comando.

In Xenioo è possibile creare i comandi nella sezione Global Bot Operations del chatbot. Infatti, ogni operazione inserita nella Global Bot Operations viene sempre processata indipendentemente dallo stato del chatbot ed in qualsiasi punto della conversazione utente.

Per impostare il comando è sufficiente inserire (/help) nel campo Control Expression di una operazione Text Parse. Questo tipo di operazione cattura l’input dell’utente e reagisce se il testo corrisponde ad una specifica espressione regolare.

Nel nostro caso ci si aspetta che l’utente scriva esattamente il testo /help ed il chatbot risponderà con un semplice messaggio proponendo quello che sono gli altri comandi disponibili.

Inoltre ogni testo che inizia con il carattere ‘/’ viene trasformato da Telegram in un comando cliccabile. L’utente può quindi attivare il comando sia scrivendolo nella chat, sia cliccando direttamente sul link del comando.

Gestire gli utenti in entrata ed uscita dal gruppo

Nel momento in cui si aggiunge un chatbot ad un gruppo Telegram, Xenioo comincerà a ricevere una serie di eventi relativi agli utenti che si iscrivono oppure lasciano il gruppo.

Ognuno di questi eventi viene intercettato dal chatbot e Xenioo valorizza delle specifiche variabili che possono essere poi utilizzate all’interno del flusso, per esempio per dare il benvenuto agli utenti oppure salutarli nel momeno in cui se ne vanno.

Abbiamo già discusso come utilizzare le variabili per gestire il flusso in articoli precedenti, quindi per ora ci limiteremo a vedere nel dettaglio le variabili che sono disponibili quando il chatbot è collegato ad un gruppo Telegram.

VariableValore contenuto
telegram_new_users_countNumero di nuovi utenti aggiunti al gruppo. Se è uguale a 0, nessun utente è stato aggiunto al gruppo.
telegram_new_user_<num>Nome utente completo dell’ utente aggiunto al gruppo, dove <num> rappresenta l’indice della lista di utenti aggiunti complessiva.
telegram_new_user_<num>_typeTipo di utente che si è appena aggiunto al gruppo, dove <num> rappresenta l’indice della lista di utenti aggiunti complessiva. Il valore può essere USER per un normale utente oppure BOT per un bot.
telegram_user_leavingNome utente completo dell’utente che ha appena lasciato il gruppo.
last_userNome utente completo dell’ultimo utente che ha inviato del testo o un comando nella chat del gruppo.

Qando si gestisce un gruppo Telegram bisogna tener presente che gli utenti possono essere aggiunti massivamente con un singolo invito. Dal momento che il bot viene chiamato quando uno o più utenti sono stati aggiunti al gruppo, diventa quindi necessario verificare correttamente il numero indicato dalla variabile telegram_new_user_count.

Sfruttando la capacità di Xenioo nel manipolare le variabili, è possibile creare facilmente dei blocchi per gestire questa casistica, come è possibile vedere nell’immagine sottostante.

Al contrario, la rimozione di un utente dal gruppo è immediata e quindi mai si verificheranno rimozioni massive di utenti contemporaneamente. La variabile telegram_user_leaving è sempre relativa ad un singolo utente e il bot verrà chiamato una volta per ogni utente che lascia il gruppo.

Moderare il gruppo

Un aspetto importante nella gestione di un gruppo è la supervisione del comportamento degli utenti. Se per esempio il gruppo adotta delle regole specifiche riguardanti il linguaggio non permesso, il chatbot si presta come una soluzione ideale per verificare che queste vengano fatte rispettare.

Xenioo permette non solo di rilevare e processare ogni testo scritto dagli utenti nel gruppo, ma consente al chatbot di rimuovere automaticamente dal gruppo gli utenti che non rispettino per esempio quelle determinate regole.

La prima cosa da fare per sì che il chatbot funzioni da moderatore del gruppo è quella di disabilitare la Group Policy, disattivandola come abbiamo visto nel paragrafo iniziale. Questo permetterà a Xenioo di ricevere tutti i messaggi inviati dagli utenti nel gruppo.

Il passo successivo è quello di creare una serie di intenti NLP contenenti tutte le espressioni che non si vuole vengano utilizzate all’interno del gruppo (parole volgari, argomenti politici, etc…)

Le espressioni possono variare da una semplice sentenza, anche a singola parola, fino ad arrivare a sentenze complesse che coprono diversi argomenti. Il motore NLP di Xenioo sarà in grado di imparare automaticamente da queste espressioni e quindi capace di individuare anche testi che sono differenti ma esprimono lo stesso intento.

Una volta creati gli intenti, possono essere utilizzati all’interno delle Global Bot Operations collegandoli ad una interazione che si occuperà di gestire la risposta del chatbot.

Come è possibile vedere dall’immagine, l’approccio che abbiamo usato nel chatbot di esempio è quello di dare all’utente 3 avvertimenti prima di essere rimosso dal gruppo. Ogni avvertimento viene gestito con una specifica variabile per utente ed il chatbot sarà in grado di ricordarsi del conteggio anche dopo mesi (oppure si potrebbe implementare un meccanismo per il reset del contatore degli avvisi usando un broadcast).

Se il gruppo da gestire contiene un numero molto alto di utenti, potrebbe essere necessario implementare una soluzione un poco più complessa e basata su database, ma per il nostro chatbot di esempio l’approccio scelto è più che sufficiente.

Ricapitolando…

In questo articolo abbiamo visto come creare un chatbot per gestire e moderare un gruppo Telegram con Xenioo sia estremamente semplice e flessibile.

Vorresti provarlo subito? Questo chatbot è disponibile come Template gratuito all’interno di Xenioo, ti basta entrare nel tuo account per poterlo utilizzare.

Hai delle richieste specifiche per il tuo chatbot Telegram? Non esitare a contattare direttamente il nostro team oppure scrivi alla nostra community Facebook!

The post Come creare un chatbot per moderare un gruppo Telegram appeared first on Xenioo.

]]>
/come-creare-un-chatbot-per-moderare-un-gruppo-telegram/feed/ 0
A complete news chatbot: creating GamerNewsBot with Xenioo (Part 2) /complete-news-chatbot-creating-gamernewsbot-xenioo-part-2/ /complete-news-chatbot-creating-gamernewsbot-xenioo-part-2/#respond Wed, 21 Feb 2018 10:49:46 +0000 https://www.xenioo.com/?p=643 In the previous entry of this two parts story, we’ve seen how we can create the very first steps of our news chatbot. We’ve created the basic flow that will allow our user to check what we’re offering, subscribe and do a little small talk. Now that our user has made our small tour and decided to subscribe, we need to make sure that the news are pushed regularly: in Xenioo, this is made trough a broadcast. Broadcasts are complete ...

Read MoreA complete news chatbot: creating GamerNewsBot with Xenioo (Part 2)

The post A complete news chatbot: creating GamerNewsBot with Xenioo (Part 2) appeared first on Xenioo.

]]>
In the previous entry of this two parts story, we’ve seen how we can create the very first steps of our news chatbot. We’ve created the basic flow that will allow our user to check what we’re offering, subscribe and do a little small talk.

Now that our user has made our small tour and decided to subscribe, we need to make sure that the news are pushed regularly: in Xenioo, this is made trough a broadcast.

Broadcasts are complete Xenioo Behaviors that can be scheduled and sent back to users anytime. There is no limit to the number of broadcasts you can create but keep in mind that, if using Facebook as a channel, there will be specific rules that you should follow to avoid unwanted usage reports.

When choosing when and how to send, you have multiple options: you can send a broadcast based on a trigger like the last time the user interacted with your chatbot or whenever a tag or a variable changes its value or, in this case, at a specific interval.

Since we are going to have a lot of news but we do not want to pester our users, we will be choosing a 3 hours interval broadcast.

A good approach to news push is avoiding too much info too frequently: we do not want our users to walk away.

Another very important parameter of all our broadcasts must be the target audience. While sometimes broadcasts are meant to be sent to anyone, most of the times you want to target a very specific segment of your chatbot contacts: using Xenioo, these segments are called Audiences.

Using Audiences you create a multilevel filter that will dynamically select your users based on variables, tags and connection times.

With GamerBot, we have created a flow where we are asking the user if he/she is willing to receive news now and then and we stored the reply in a variable: we are going to use that variable to create an ad-hoc Audience.

Since Audiences are dynamically evalued eveytime they are needed, new users subscribing to the chatbot will automatically fall in this filter.

There is really no limit to the number of different group you can create by combining multiple filters based on usage. Letting the users specify multiple conditions and then create a broadcast based on that becomes trivial with Xenioo.

Now that we’ve setup our global broadcast parameters, it is time to design its chat flow. Xenioo broadcast design follows the very same principles of the standard chatflow design and of course, the very same flow interface.

Using the same components you’ve been using to design your chatbot you can now create the contents that will be pushed to our users. GamerBot uses a fairly simple broadcast flow, build around a single interaction: most of the job is done by the RSS Feed Reader Action.

Xenioo RSS Feed Reader Action can read one or more RSS feeds and return the first unread item. GamerBot uses a grouped approach but you can easily split the feeds into multiple actions to push many different news simultaneously or create one specific broadcast for each feed.

If you are looking for this last option, I would suggest to design the first broadcast and the use the very handy ‘Clone Broadcast’ command you can find near each broadcast in the main view list.

Looking at the feed action we see two awesome things: first, there’s nothing taking care of what feed item is new or not.

All RSS feeds you specify are automatically managed by Xenioo engine to ensure that each user receives only those feed items that are new and users coming later to the chatbot will enter the news flow without receiving older entries.

This is a very powerful feature that makes creating a feed reading chatbot a breeze.

The second thing you can see is how easily a very common feed problem is managed: not all the feed images are available in every entry.

Sometimes there are no images or sometimes they are specified in a non-standard way. To avoid sending an update without an image, we use a conditional switch based on the RSS image field: if the field is empty, we just set the value to a default image.

A very simple yet incredibly powerful feature: how many times did you struggle with this kind of problems while building your chatbot? Those days are long gone!

So now we’ve our broadcast and we have our up to date news feed. All we need to do is displaying it to the user!

Like any other action consuming or producing data, the RSS Feed Reader Action automatically adds runtime variables to our chatbot. Using these variables makes the creation of a content a very simple task.

We have chosen a carousel card because we can have a title, a description and a nice image all in a nice package. All we have to do is use our RSS variables to fill Xenioo Card Container Action fields.

And its done! Incredible how fast and easy it has been? Well you can go check GamerBot yourself live or just create your by using it as a template: the full bot is available right now as a premium template for all subscribers!

The post A complete news chatbot: creating GamerNewsBot with Xenioo (Part 2) appeared first on Xenioo.

]]>
/complete-news-chatbot-creating-gamernewsbot-xenioo-part-2/feed/ 0
A complete news chatbot: creating GamerNewsBot with Xenioo /complete-news-chatbot-creating-gamernewsbot-xenioo/ /complete-news-chatbot-creating-gamernewsbot-xenioo/#respond Sat, 03 Feb 2018 14:22:45 +0000 https://www.xenioo.com/?p=615 GamerNewsBot is one of the many complete chatbots that we are building with Xenioo to showcase different core features. The idea of this bot is to have a news service that pushes gaming news to your users by digesting multiple RSS feeds automatically. A good idea when creating a chatbot is to start with the basic bullet points of everything we would like to implement so that we can have an overview of what is required. Our bot shoud: Greet ...

Read MoreA complete news chatbot: creating GamerNewsBot with Xenioo

The post A complete news chatbot: creating GamerNewsBot with Xenioo appeared first on Xenioo.

]]>
GamerNewsBot is one of the many complete chatbots that we are building with Xenioo to showcase different core features. The idea of this bot is to have a news service that pushes gaming news to your users by digesting multiple RSS feeds automatically.

A good idea when creating a chatbot is to start with the basic bullet points of everything we would like to implement so that we can have an overview of what is required. Our bot shoud:

  1. Greet the user and describe itself and its services.
  2. Ask the user permission to push automatic news. We do not want users receiving any message they don’t want ?
  3. Support a basic array of smalltak and a couple of specific questions like where the news come from
  4. Get the news from the configured feeds and distribute them to the users that subscribed every time they are available.

Greeting the user

This is the starting point of our bot. We should greet the user and describe what kind of services we are providing. Doing this with Xenioo is fairly easy and we should have learned it since the very first tutorial.

I would suggest to come out clear and tell immediately that it is a bot speaking: most people don’t mind interacting with a bot but may be upset to discover it later rather than sooner.

Since GamerNewsBot was published in multiple bots directories we later wanted to know from where the new contact was coming from.

This is something you can easily add and since every conversation input of Xenioo is saved in a user variable, you can later analyze it to see how many people come from specific services and maybe change the conversation flow accordingly.

Would you like to subscribe?

Asking the user permission to send unattended broadcasts serve two purposes: the first is to make sure that we do not send anything not requested to anyone.

On many platforms, Facebook Messenger, for example, sending unattended or unwanted messages may result in temporary or permanent ban of your page or of your bot, so always make sure to have explicit permission.
Secondly, we want to store the user reply in a specific conversation variable. This variable can then be used in our broadcast to filter for a specific audience.

Everything is easily managed with Xenioo Variable Actions and Interaction Switches, but what if the user wants to unsubscribe later? We need to make sure that the bot is accepting some kind of “unsubscribe” command anywhere and every time.

To do so, we are creating an NLP unsubscribe intent like the one below:

Remember: you do not need to specify every possible expression your users may send. Xenioo NLP engine is capable of understanding variations and similar expressions and, once trained, can fully understand even the most uncommon utterances.

Once the intent has been created and trained, we can attach it to our bot. Global Behavior Operations are executed regardless of the current interaction and can be used to detect a general intent in the user chat flow.

While interaction specific NLP or Standard Questions Actions act only in the specific interaction, Global Behavior Operations can be triggered anywhere in the behavior.

Since we want to allow our user to unsubscribe (or subscribe again!) we are adding our NLP intents to the Global Behavior Operations list.

Everywhere during the chatflow, as the user types subscribe or unsubscribe, we’re changing the value of our “notification” variable to either yes or no. This, in turn, will move our user from the unsubscribed to the subscribed audience or vice-versa.

Implementing the bot smalltalk

While the user knows that there isn’t a human on the other side, it is often a good sign of a well crafted bot to add some kind of very basic “small talk”.

Often users like to interact, even if virtually, with a chatbot to see its capabilities and adding some funny replies to most common questions like “how are you” or “who are you” may be your winning move to get a subscription to your service.

GamerNewsBot has a set of multiple NLP intents specifically created to manage standard small talk. They are intended to manage most of the very basic interactions but as you can see they are so easy to create that adding them is a matter of minutes.

Again: you don’t need to specify every single user possible utterance. Xenioo NLP Engine is perfectly capable of inferring phrase changes from training.

As you can see, we wanted to push every time a small help for the user, giving after every answer a recap of the commands. That is not entirely necessary but really up to you: remember your users may come back after a long while and not really remember what and how they can use your bot.

Giving them a recap of the commands, or an easy way to access them is a good idea.

Reading and Distributing the Feeds

This is where the real action happens and it will be a topic for my next post: we will see how we can manage a fully automated scheduled news broadcast without writing a single line of code: all the magic will happen in Xenioo!

Also, as with every example and full bot we create, everything is already available to you as a template in your Xenioo Templates Section!

The post A complete news chatbot: creating GamerNewsBot with Xenioo appeared first on Xenioo.

]]>
/complete-news-chatbot-creating-gamernewsbot-xenioo/feed/ 0