Table of contents

Official Content

As mentioned before, this chatbot system will allow the user to get information about two different topics:

  • Activities (social events) and
  • Any bureaucratic formalities (administrative process)

You can define a Flow to ask the user which type of information he's looking for. Depending on the user's answer, the flow will be redirected to another flow, whose purpose is to give information specific of this topic.
The user can also ask directly for specific information, in this case, it won't be necessary to ask him to enter the information type he needs. In this case, the corresponding flow is executed inmediately.

Here you will see the solution starting with the main flow which asks the user to enter the information type he needs. Note that this Flow hasn't a Conversational object defined.


The informationType User Input matches with an entity defined in the provider (whose values are {Formalities, Activities}):


Here, the User Input has some Redirections. Each, defines a condition which is based on some entity values of the model. The input of the user must match any of those entity values, so the dialog continues through another thread of flow.


Note the Response message text defined; it will be triggered if none of the conditions of redirection evaluate to TRUE.


You have to define the Flows used in each of the Redirect to Flow properties ("Get Activities Information" and "Get Administrative Formalities information"). As an example, let's see the Get Activities Information Flow.

Get Activities Information Flow details

In this flow, a Data Provider is used as a Conversational Object


First, the user is asked to enter the category of activities he is interested in. The user's input can be validated against an entity defined in the AI Provider ("Activities" entity, whose values are {art, culture, nature}). 


Note that the On Error Messages property uses a reference to &UserName, which is a Chatbot Context value that stores the user name (which has been asked to the user in another flow).

The data provider used as a Conversational Object returns an SDT collection, which is displayed in a web form automatically generated by the ChatBot Generator. The Flow output is configurable and, in this case, it is shown in a form embedded in the dialog.
This is configured under the Message node, using the Show Response As property. The Web Component property and SD Component property indicate the object that is going to be displayed for Web and SD respectively. 


The conversation looks as follows:



Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant