Skip to main content

Decision component

Better decisions, better care flows

A
Written by All Awellians
Updated today

Care isn’t linear. Small and big decisions shape how patients move through a care flow, and ultimately impact outcomes. With the Decision component, you can make these decisions intentional, explicit, and easy to reason about.

Decision component vs. traditional if-else transitions

The Decision component and if-else transitions both express conditional behavior, but the decision component is better suited for complex, evolving rules.

  1. More compact and readable
    All conditions and outcomes live in a single table, making it easy to see the full decision logic at a glance, without tracing long chains of if-else statements.

  2. Easier and safer to update
    Changes usually mean editing a row or adding a new one, instead of modifying code paths where small mistakes can introduce subtle bugs.

  3. Self-documenting
    The table itself explains how decisions are made, making the logic accessible to clinicians, product managers, and other non-technical stakeholders.

  4. Scales better with complexity
    As rules grow or new conditions are added, decision tables stay structured and understandable, while if-else logic quickly becomes hard to reason about.

On top of these inherent benefits, the Decision component in Awell can be tested directly in Studio and re-used in your care flow, making it easier to build, validate, and evolve decision logic over time.

Adding a Decision component to your care flow

The Decision component is a dedicated node available in the sidebar when building your care flow. To add one, simply drag and drop the Decision component onto the canvas.

Configuring your decision

Configuring a Decision component is done through a Decision Table. The table defines which inputs are evaluated and which outcome(s) should follow based on those conditions.

Below are the key concepts to understand.

Inputs and conditions

You can add one or more data points as inputs to your decision. Each input can be evaluated using conditionals (e.g. equals, greater than, contains). The UI automatically gives you smart auto-complete suggestions to easily navigate these operators and your data points.

These inputs are combined per row to describe when a specific outcome should apply.

Results or outcomes

Each row in the Decision Table maps a set of conditions to a result or outcome. A result determines which path(s) in the care flow should be taken when the conditions match.

First match only or multiple matches

You can control how the decision behaves when multiple rows match:

  • First match only
    The decision stops at the first matching row and follows a single path
    (exclusive / sequential behavior)

  • Multiple matches
    All matching rows are evaluated and their paths are followed
    (parallel behavior)

This allows you to model both exclusive decisions and parallel branching from your decision component.

Catch-all

You can also define a catch-all (“else”) row to ensure the decision always resolves, even when no other conditions match.

We strongly recommend always configuring a catch-all condition so edge cases are handled gracefully.

⚠️ Important: If no catch-all is configured and no conditions match, the Decision component will fail during orchestration.

Examples

The "in" keyword can be used to match against a list of values.


Did this answer your question?