Entities

Approval Flow

Runtime B2B order-approval request, decisions, status, and activity

An ApprovalFlow is a runtime request to approve a B2B cart or order. It records the request snapshot, lifecycle, approver decisions, and activity without embedding the executable approval rules.

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

Components

Base

ApprovalFlowBase

base
Request identity, timestamps, requester comment, audit totals, and custom fields.
number
string

Human/ERP reference number of the approval request, when the source assigns one.

requestedAt
Date

When the approval was requested.

expiresAt
Date

When the approval expires if still undecided (Emporix expiryDate); drives the expired status.

requesterComment
string

Note the requester added when raising the approval (B2B Sellers customerComment).

itemCount
number

Snapshot of the number of items being approved, as of request time.

customFields
Record<string, unknown>

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

Status

ApprovalFlowStatus

status
Approval lifecycle: pending, approved, rejected, expired, or withdrawn.
status
"pending" | "approved" | "rejected" | "expired" | "withdrawn"required

Approvers

ApprovalFlowApprovers

approvers
Flattened per-approver decisions and permissions.

Activity

ApprovalFlowActivity

activity
Timeline of decisions, comments, and status changes.
Copyright © 2026 Laioutr GmbH