Official Content
  • This documentation is valid for:

When defining a chatbot conversation, some topics have to be considered (Intents, Trigger Messages, Messages, Entities, and Flows).

An Chatbot Intent is always represented by a Flow, and the Flow can be associated to a GeneXus object through the Conversational Object property.

Here we explain how to define an Intent using a Flow whose Conversational Object is a procedure.

To add a Flow to the Conversational Flows object, select the Add -> Flow of the contextual menu.

image_2018228103938_1_png

Next, enter a Name for the Flow, some Trigger Messages, and select the GeneXus object which will be triggered after the intent is recognized and the user finishes entering all the required input (the conversational object).

image_201988173713_1_png

In this example, the conversational object is a procedure called "Lighting".

In the Chatbot Provider (e.g., Watson), an Intent will be defined for the dialog using the given Flow name. It's important to define Trigger Messages for this Intent to be detected by the Artificial Intelligence (AI).

The "Lighting" procedure has the following parm rule:

parm(in:&UserIdentification, in:&ComplaintDescription, in:&ComplaintAddress,out:&response);

Once the Intent has been detected, the user will be asked to provide some information to comply with this Intent. The information to be asked from the user is displayed under the User Input node of the structure.

enlightenedThe User Inputs are added automatically to the structure and are inferred from the In parameters of the Conversational Object. The output parameters are also detected, so a Response node is added automatically, including that parameter. 

The Chatbot Message node determines the way that this output is going to be shown; in this case, since the Action property property is set to Text Message, it will be displayed as text only.
Note that in the Messages property you configure the message text which is going to be displayed, in this case, is the &response variable which is in the dialog context (the output of the Conversation object).

In sum, the Intent is defined as follows in the Conversationals Flows instance structure:

image_201988175016_1_png

Each parameter can be set as an Entity in the Chatbot Provider's. The benefits of setting a parameter as an Entity is that its value will be checked against the Entity values. Note that in this example, the UserIdentification is set to match with an entity, whose name is "UserIdentification".

image_201988174338_1_png

The Ask Messages property allows specifying the message to be shown to the final user in order to ask him to enter that input.

The On Error Messages property value is thrown when the input entered is not valid. A Try Limit property can be specified in case the user fails to enter a valid value.

enlightenedInside the On Error Messages property you can include the reference of what the user has entered: &GXUserInput. For more information see HowTo: Reference context parameters in a conversation.The output parameter is used to send an answer to the chatbot.

In sum:

image_20198818213_1_png

At runtime, it looks as shown below:

image_2017121152233_1_png
                image_201712115236_1_png

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