Condition

Directing Dialog Flow Based on User Inputs

Overview

The Condition block enables you to craft dynamic, context-aware, and adaptive dialog flows by incorporating specific conditions or rules. This enables the conversation's direction to be dictated by evaluating conditions based on user input, data from external systems, or other criteria.

Condition Block

By incorporating the Condition block into your dialog, you can personalize the conversation for individual users or specific scenarios, resulting in a more engaging and tailored experience. Furthermore, the Condition block equips you with the ability to examine its contents and trigger other actions in the call flow based on the evaluated conditions.

Incorporating a Condition block into your dialog allows for personalizing conversations to individual users or specific scenarios, creating a more engaging and customized experience. Additionally, the Condition block provides the capability to inspect its contents and initiate other actions within the call flow, contingent on the assessed conditions.

Implementing Logical Conditions

The Condition block is a pivotal block in crafting dialog logic, often leading to branching conversations. In the example below, two conditions, namely "coffee" and "soft drinks," are employed, but you can add more conditions as needed.

Depending on the user's response to the question, "Do you need coffee or soft drinks?" different actions are initiated. Parloa evaluates which defined options are true before advancing to the next node in the dialog, similar to how text blocks use conditions. In this scenario, the dialog proceeds to various Service blocks.

Keep in mind that the order of conditions matters because Parloa evaluates them sequentially. When it identifies a true condition, subsequent conditions are bypassed.

For more detailed information on crafting conditions within the Condition block, you can refer to our JS Cheat Sheet page.

Last updated