This is a step-by-step guide to create, manage and test a Flow.
First, log in to the Console.
In the Project combo box, select the project you want to work with.
Next, on the left side of the screen, you will find the backoffice menu. Click on The Lab.

A new browser window will open with The Lab. In the Side Navigation Menu, you'll find Flows at the bottom. Clicking on Flows opens the Flows Dashboard.
When accessing the Flows Dashboard for the first time, a welcome screen is displayed, as shown in the image below. From this screen, you can start creating a Flow by clicking on the New Flow button.

A pop-up window will open where you must fill in the following information:
- Flow name: A descriptive name for the Flow to help identify it easily.
- Flow description: This field is optional, but it is recommended to add a brief description to clarify the Flow's purpose or content.
- Flow languages: Sets the language in which the Flow will be configured and allows you to define the language of the hard-coded messages. You can select multiple languages so that the same message is available in different languages.
Once you have completed these fields, click on the Save button.

After clicking on Save, you will return to the Flows Dashboard. There, click on the Edit button of the newly created Flow to add the Assistants and Agents you want and customize their behavior.

When you click on the Edit button, a new browser window opens with the Flow Builder that allows building and configuring Conversational Flows. There, you will see the initial Flow created automatically.
This initial Flow, called Start, establishes a basic configuration that you can customize by adding or modifying interactions, messages and assistants according to your needs.

The initial Flow, called Start, is automatically generated with the Intent: input.welcome.

The Start Flow has default nodes that you can delete or adjust according to your needs. Below you will find a description of each node and how to configure it.
Start (Intent: input.welcome) node
The Start (Intent: input.welcome) node marks the beginning of the conversation Flow. This node is activated every time the Flow is triggered, and its main purpose is to start the Flow, from which the other nodes that manage user interactions are connected.
To rename the start node, go to the left menu and navigate to Flows > start. Click on the three dots next to it, select Rename flow, enter the new name, and press Enter to save the change.

The next node, Message, is responsible for sending the welcome message or any other initial message configured. In this case, the message is: "Hello {name}, how can I help you?" Here, {name} represents a dynamic variable that is filled with the user's name.
The message displayed in this node is customizable. You can format the text by selecting different styles, such as Normal, Heading 1, and others, from the drop-down menu labeled Normal. This allows you to adjust the text style according to your needs.

On the top bar of the node, you'll find several formatting buttons, such as bold, italic, and underline, to customize the text. In addition, there are icons for adding lists, links and emojis.
The last button, shaped like a small drawer, allows you to insert dynamic variables in the message. Clicking on this button displays a list of variables available in the system, and you can also define new custom variables.
This Message Node can be deleted by clicking on the trash can icon to the right of the node. You can also add a variant by clicking on the plus (+) button at the top right.
The Flow then proceeds to capture user input through the User input node, storing it in the lastUserInput variable for later use.

In the Assistant Node, you must configure the assistant to perform specific actions. This node uses the information stored in the lastUserInput variable, which contains the text entered by the consumer in the User input node.

To configure the assistant, click on the Select an assistant field. By default, No assistant selected will be displayed. From the drop-down menu, choose the assistant you want to use.
Note: The assistants available are those defined in the associated project, which was configured in the first step. These can include any assistants defined in Globant Enterprise AI, such as
API Assistant,
Chat with Data Assistant.
Once an assistant is selected, the Prompt field will display the message that defines the assistant's task. This message is read-only and can’t be edited.
The assistant's response can be stored in the lastUserInput variable or in a new variable, depending on your needs.
By default, the Use as response option is enabled, which causes the assistant's response to be used directly in the lastUserInput variable.
If you prefer to store the response in a new variable, disable Use as response. This will enable the Output field, where you can select an existing variable or create a new one.
In addition, you can enable the option to read the assistant's response in JSON format. By enabling this option, you will have the ability to map the fields of that JSON response to variables previously defined in your configuration.

This allows for more precise integration of the assistant's responses in more complex workflows or systems that require a specific format for data handling.
The pencil icon to the right of the node corresponds to the Edit button. By clicking on it, you can enable or disable the following options:
- Include conversation history: Enabled by default. Allows the assistant to access the conversation history to generate more coherent and context-aware responses.
- Include context variables: Enabled by default. Sends variables defined in the flow, such as previously captured data or configured values, to the assistant so that they can be used within prompts.
- Include files: Enabled by default. Allows the Assistant to work with various file types.
- Handle Markdown: Enabled by default. Interprets Markdown and displays it correctly in the chat window (Workspace and other channels such as WhatsApp, Teams, and more).
- Handle Chat With Data Response: Enabled by default. Allows to support different types of charts and tables.
- Handle error: Disabled by default. It handles situations where the assistant cannot generate a valid response. When enabled, it opens a new Flow branch, allowing you to configure specific actions to take in case of an error. In this new branch, you can add any of the components available in the Interactions menu on the left to continue the interaction as needed.

This node can be deleted by clicking on the trash can icon to the right of the node. In this case, the Assistant node is deleted:

On the left menu, below the Interactions category, you will find the different components that can be added to the Flow. In particular, in the GENERATIVE section, you can choose between adding an Assistant, a RAG Assistant or an Agent.
In this case, you need to add a RAG Assistant. To do so, click on RAG Assistant in the GENERATIVE section. Next, drag the component to the desired location in the Flow. In this case, you can insert it between the User input and Go To nodes.

When you add a new RAG node, you must click on the Select an assistant field. By default, the option No assistant selected will appear. From the drop-down menu, choose the RAG assistant you want to use.
After selecting the RAG assistant, the next field, Select a document, allows you to choose a specific document to serve as the source for responding to the consumer's request. If you select a document, the assistant will only use that document as its reference.

Alternatively, you can use the Indicates the documents' tags field. Here you can add the tags defined in Step 2: Upload RAG documents, which are used to filter the documents. This enables the assistant to search only within documents that match the specified tags when responding to the consumer's request.
In the Input section, a field called Variable is displayed. There, the variable to be used as input for that node is defined; for example, lastUserInput. This variable contains the user's most recent input and will be used as the basis for querying the selected documents or tags.
Similarly, in the Output section, there is also a Variable field that specifies the variable that will store the output generated by the node. In this case, you want to save the RAG Assistant’s response in a new variable called lastResponse. Therefore, the Use as response option is disabled.

Clicking on the pencil icon to the right of the node opens the State Configuration menu, where you can modify the following items:
- Include conversation history: Enabled by default. Ensures that the conversation history is included in the interaction context, allowing the assistant to take previous messages into account when generating responses.
- Include context variables: Enabled by default. Allows context variables stored during the conversation to be sent to the assistant, enabling their use within prompts.
- Show sources: Disabled by default. This option enables the assistant to display the sources of information used to generate its response. It adds transparency and helps validate the accuracy of the responses by showing where the information was retrieved from.
- Handle no match: Disabled by default. Handles situations where the assistant cannot generate a valid response. When enabled, it opens a new Flow branch (as shown in the image), allowing you to configure specific actions to take in case no response is available. In this new branch, you can add any of the components available in the Interactions menu on the left to continue the interaction as needed.
- Handle Markdown: Disabled by default. This option interprets Markdown and shows it correctly in the chat window (Workspace and other channels such as WhatsApp, Teams, and more).

In this case, if the RAG Assistant finds the answer in the documents, you want the Flow to call an assistant to translate the response to Japanese and store it in the same input variable (lastResponse).
If no answer is found, the Flow proceeds to a second RAG Assistant configured with documents used in Globant Enterprise AI courses. The input variable for this RAG Assistant is lastUserInput, which contains the user's most recent input. The response generated by this RAG Assistant is stored in the lastResponse variable.

The Go To node is used to connect different Flows within the interaction. This node allows you to select the flow to which you want to redirect the consumer based on their current interaction.

Clicking on the blank bar (corresponding to the drop-down menu) displays a list of available Flows:

Here, you can select and define the Flow to which you want to redirect the user. To review or modify any of these Flows, you can access the Flows menu on the left side of the screen.
In addition, Pick from canvas allows you to select a node directly from the canvas, making it easier to navigate and connect different parts of the Flow.
The Go To icon next to the node allows you to navigate directly to the node to which it is connected. In this case, there are two Go To nodes:
- The first Go To: Returns to the User input node. Since the previous node (which handles translation to Japanese) does not store the response in a new variable and simply redirects to the User Input, the response received by the consumer
- is the answer to their question translated to Japanese.
- The second Go To: Sends the response to the Assistant node, which is responsible for translating the generated response to Japanese using the lastResponse variable. This variable contains the response obtained from either of the two RAG Assistants executed earlier in the Flow.
In this way, the Flow ensures that the consumer receives the response in Japanese, regardless of whether the response was generated by the first or the second RAG Assistant.

After configuring the Flow, make sure to click on the Save button located at the top left of the screen. To test the flow you have created, you have three options available from the same design window:

- Click on the arrow icon (similar to a play button) to run the Flow (Run Flow).
- Click on the message icon to open the testing assistant (Open Testing Assistant).

- Click on the icon that opens a new window (the box with an arrow) to access the demo page (Go to Demo Page).

The first two options will open a window on the right side of the screen, while the third option will open a new browser window.