Table of contents


Official Content

When designing a chatbot Flow, it may be necessary to reference some context parameters.

You can reference the context parameters using the '&' character.

The context parameters can be used at any level of the Flow: On Error Messages property, Message conditions, User Input conditionsMessages, and Ask Messages property.

enlightened &GXUserInput is a standard variable used to reproduce the user input.

Sample

In this example, you'll see how to reference the context output of a procedure executed to fulfill the Chatbot Intent of a Flow.

The context parameter will be used in the Messages returned after the execution of the flow.

Consider the following example, where a Flow is defined, whose related intent is to get debt refinancing information in a chatbot for assistance to citizens.
The Conversational Object associated with the Flow is the "DebtRefinancingInfo" procedure.

image_2018425103310_1_png

The "DebtRefinancingInfo" code is as follows. Note that it returns a variable called &FormalitiesRequirements:

parm(out:&FormalitiesRequirements);

for each FormalitiesDetails
    where FormalitiesReason = FormalitiesReason.DebtRefinancing
    &FormalitiesRequirements = FormalitiesRequirements
endfor

To return the complete output of the DebtRefinancingInfo procedure to the user, the Message Response defined in the Flow has the Messages Property set to &FormalitiesRequirements.

image_2018425104034_1_png

At runtime:

image_2018727135912_1_png

See Also

HowTo: Build a chatbot using GeneXus

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