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

Attachable Types

  • trigger - Attaches the group to a Trigger.

  • conditionGroup - Nests the group below another Condition Group.

  • formFieldDisplayCondition - Attaches the group to a form-field display condition.

Expressions

  • AND - Requires every child condition or group to match.

  • OR - Requires at least one child condition or group to match.

Create

Create a new ConditionGroup.

Definition

POST /api/condition-groups

Request Keys

Key
Type
Default
Description

attachable_type*

string

-

Selects one of the supported Attachable Types.

attachable_id*

integer

-

ID of the parent attachable entity.

expression*

string

-

Selects one of the supported Expressions.

Keys with * are required.

Example Request

Example Response

Update

Update an existing ConditionGroup.

Definition

PUT /api/condition-groups/{conditionGroup}

Route Parameters

Parameter
Type
Description

conditionGroup

integer

ConditionGroup ID.

Request Keys

Key
Type
Default
Description

attachable_type

string

-

Selects one of the supported Attachable Types.

attachable_id

integer

-

New parent entity ID.

expression

string

-

Selects one of the supported Expressions.

Behavior

Only submitted keys are updated.

Example Request

Example Response

Delete

Delete a ConditionGroup.

Definition

DELETE /api/condition-groups/{conditionGroup}

Route Parameters

Parameter
Type
Description

conditionGroup

integer

ConditionGroup ID.

Example Request

Example Response

Last updated