Entities

Approval Rule

Display-oriented B2B order-approval rule configuration

An ApprovalRule describes when B2B orders require approval and who can approve them. It is a display-oriented projection; rule evaluation remains in the source system.

Available since v0.26.0 in @laioutr-core/canonical-types

Components

Base

ApprovalRuleBase

base
Rule identity, description, code, and custom fields.
name
stringrequired

Human-readable name of the rule, e.g. "Orders over €5,000".

description
string

Longer explanation of the rule's intent.

code
string

Human/ERP identifier distinct from the internal id.

customFields
Record<string, unknown>

Custom fields are a way for implementations to pass arbitrary data to actions, queries, etc.

Status

ApprovalRuleStatus

status
Whether the rule is active or inactive.
status
"active" | "inactive"required

Condition

ApprovalRuleCondition

condition
A typed threshold condition or opaque source-system predicate.
metric
string
operator
"gt" | "gte" | "lt" | "lte"

Comparison operator against the threshold.

count
number

Threshold count, for count metrics (sku-count).

predicate
string

Opaque source-system predicate expression, when the rule is more complex than a single threshold (e.g. commercetools Order Predicate). Displayed verbatim; not evaluated by the storefront.

Approvers

ApprovalRuleApprovers

approvers
Eligible approvers, decision mode, and quorum presented as a flat display model.
mode
string
quorum
number

Required number of approvals for the n-of mode (B2B Sellers nValue).

Copyright © 2026 Laioutr GmbH