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

ConditionGroups

Introduction

ConditionGroups allow you to combine multiple Conditions and nested groups with boolean expressions.

They are used to build logic trees such as:

  • A AND B

  • A OR (B AND C)

A ConditionGroup can be attached to a Trigger or another ConditionGroup.

Model Definition

Relations

Key
Relation
Type
Relation Field(s)

attachable

Trigger or ConditionGroup

Morph To

attachable_id, attachable_type

singleConditions

Morph Many

attachable_id, attachable_type

conditionGroups

ConditionGroup

Morph Many

attachable_id, attachable_type

Traits

  • HasConditions

  • SoftDeletes

  • HasFactory

Supported Expressions

  • AND

  • OR

Create

Create a new ConditionGroup.

Definition

POST /api/condition-groups

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.

expression*

string

-

Group expression. Allowed values: AND, OR.

Keys marked with * are required.

Example Request

Example Response

Update

Update an existing ConditionGroup.

Definition

PUT /api/condition-groups/{conditionGroup}

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.

expression

string

-

Updated group expression. Allowed values: AND, OR.

All keys are optional for Update.

Example Request

Example Response

Delete

Delete a ConditionGroup.

Definition

DELETE /api/condition-groups/{conditionGroup}

Example Request

Example Response

Last updated