For the complete documentation index, see llms.txt. This page is also available as Markdown.

Conditions

Introduction

Conditions control whether a Trigger's Actions should execute.

A Condition can be attached directly to a Trigger or nested inside a ConditionGroup to build complex boolean logic.

Model Definition

Relations

Key
Relation
Type
Relation Field(s)

attachable

Morph To

attachable_id, attachable_type

Traits

  • Decoratable

  • SoftDeletes

  • HasFactory

Supported Condition Types

  • systemVariable

  • formFieldValue

  • taskStatus

Supported Operators

  • equal

  • not_equal

  • greater

  • greater_equal

  • lower

  • lower_equal

  • is_null

  • not_null

  • contains

  • not_contains

Supported system variable handling

When using systemVariable conditions, the key must be the full variable path (e.g. system.user.id) For all types the value field supports dynamic placeholders in the format {{placeholder}}, which will be resolved at runtime based on the execution context. This allows for flexible and context-aware condition evaluations. Note that value can contain a mix of static text and placeholders, for example User ID: {{system.user.id}}.

See system variables for more information on available system variables and their usage.

Create

Create a new Condition.

Definition

POST /api/conditions

Request Keys

Key
Type
Default
Description

attachable_type*

string

-

Morph alias of the parent entity. Allowed values: trigger, conditionGroup, formFieldDisplayCondition.

attachable_id*

integer

-

ID of the parent attachable entity.

type*

string

-

Condition type. Allowed values: systemVariable, formFieldValue, taskStatus.

key*

string | integer

-

Type-specific condition key (e.g. system variable key or form field ID).

operator*

string

-

Comparison operator. Allowed values: equal, not_equal, greater, greater_equal, lower, lower_equal, is_null, not_null, contains, not_contains.

value*

mixed

-

Comparison value; not required for is_null and not_null.

Keys marked with * are required.

Example Request

Example Response

Update

Update an existing Condition.

Definition

PUT /api/conditions/{condition}

Request Keys

Key
Type
Default
Description

attachable_type

string

-

New parent entity morph alias. Allowed values: trigger, conditionGroup, formFieldDisplayCondition.

attachable_id

integer

-

New parent entity ID.

type

string

-

Updated Condition type. Allowed values: systemVariable, formFieldValue, taskStatus.

key

string | integer

-

Updated type-specific condition key.

operator

string

-

Updated comparison operator. Allowed values: equal, not_equal, greater, greater_equal, lower, lower_equal, is_null, not_null, contains, not_contains.

value

mixed

-

Updated comparison value; still optional for is_null and not_null.

All keys are optional for Update.

Example Request

Example Response

Delete

Delete a Condition.

Definition

DELETE /api/conditions/{condition}

Example Request

Example Response

Last updated