Table of contents


i
This is not the latest version of this document; to access the latest version, click here.
Official Content

Condition to evaluate in order to take an action.

Description

The Condition property is available for User input conditions.

It should be an expression based on a context variable. 

 You have to use the same casing as the variable defined as User Input in the instance.

Note: 
You could also use code to be directly evaluated by the Provider, for example

  1. @entity
    In this case, you specify that the input has to match any value (or a synonymous) of the entity. This syntax is valid only for Watson.
  2. @entity:(value)
    In this case, you specify that the input has to match a specific value of the entity (or a synonymous). Consider the casing for the values. For example, if the value is "Debt Refinancing", the condition can be: @AdmProcessType:(Debt Refinancing)
    The final user, can enter "debt refinancing". But at the property level, you have to refer to it with the correct casing according  to what has been originally defined in the provider. This syntax is valid only for Watson.

Nevertheless, the recommendation is to use GeneXus code, so the chatbot model is portable to any provider.

Samples

In the following example, the "AdmProcessInformationType" User input has the Match With Entity property set to an entity of the model.

image_2018981612_1_png

Then, it adds four conditions, and they all depend on some entity value. In this case, it's the "Driver License Renewal" value.image_2018720131717_1_png

In the provider (in this case it's Watson), you can see:

image_20189816146_1_png

Notes:

1. It's important to respect the case sensitivity of the value defined in the Provider. In this case it's "Driver License Renewal" with these uppercase letters.
If none of the conditions matched, the user would receive a generic message:

"GetAdministrativeProcessinformation processed"

To avoid that, add all the possible condition matches.

2. The user can enter the same value of the Entity, or any synonymous of it ("Driver Licence Renewal"). However, the Chatbot User Input variable will take the Value of the entity instead ("Driver License Renewal").

3. Any changes on this property value can be applied saving the instance or doing "Generate chatbot". It isn't necessary to do a build of the application.

When this property evaluates to TRUE; the Action is executed.

Availability

This property is available since GeneXus 15 upgrade 12.

Scope

Objects: Conversational Flows

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