Skip to content

Node catalog

Every node type a flow can use, with its config fields, defaults and output branches.

This page is rendered from NODE_SPECS in packages/core/src/catalog.ts when the docs are built, the same objects the editor’s palette, the inspector’s forms and the engine’s validation read. Each node’s anchor is its type, for example #commerce.policy.

A node’s outputs are the branches it can take. An edge leaves a node from one output (its sourceHandle; none means out), and the edges on the branches a node did not take are skipped (see Planner). Field kinds decide how the inspector edits a value and how it is validated: duration is a string like "2 days", logic is a JSON Logic expression, list is a non-empty list of strings, and text fields interpolate {{path}} templates.

Every node also takes two optional settings outside its config: retries (0–10, default 3 unless the node type sets its own) and timeout (default "5 minutes"), applied to its step.

A flow has exactly one trigger. Triggers pass the order through; they mark how the order started.

Manual / API

trigger.manual

Started from the dashboard or POST /api/v1/orders.

  • Outputsout

Webhook

trigger.webhook

Started by an inbound webhook (storefront checkout, marketplace order).

  • Outputsout
FieldKindDefaultNotes
sourcetextstorefrontSource

Inbound PO email

trigger.email_po

A purchase order arrives by email or upload; the document is stored in R2.

  • Outputsout
FieldKindDefaultNotes
mailboxtextorders@Mailbox

Schedule

trigger.schedule

Started on a cadence (reorder runs, subscription renewals).

  • Outputsout
FieldKindDefaultNotes
crontext0 6 * * *Cron

Inventory threshold

trigger.inventory_threshold

Started when a SKU falls below its reorder point.

  • Outputsout

Commerce nodes call the connectors. Every write is keyed by its step, so a retried step never reserves, charges or ships twice.

Validate order

commerce.validate

Normalises lines, resolves SKUs and the customer, rejects empty orders.

  • Outputsout

Price & quote

commerce.price

Prices each line through the pricing chain (price books, contract prices, volume tiers, then list price) and computes the subtotal.

  • Outputsout
FieldKindDefaultNotes
useContractsbooleantrueContract pricing. Use the customer’s negotiated prices
usePriceRulesbooleantruePrice books and volume tiers. Use the price-book and volume entries in the back office

Calculate tax

commerce.tax

Computes tax on the subtotal (mock tax engine).

  • Outputsout
FieldKindDefaultNotes
ratenumber0.08Rate

Policy check

commerce.policy

Checks order rules: minimum or maximum total, per-SKU limits, business hours, PO boxes, restricted SKUs.

  • Outputspassfail
FieldKindDefaultNotes
rules (required)json[{"rule":"min_order_amount","amount":25},{"rule":"max_qty_per_sku","qty":500}]Rules. min_order_amount, max_order_amount, max_qty_per_sku, business_hours, no_po_box, restricted_skus

Validate address

commerce.address_validate

Checks and normalises the ship-to in order.meta.shipTo. A correction is offered in vars.suggestedAddress.

  • Outputsvalidcorrectedinvalid

Credit check

commerce.credit_check

Compares the order total plus open balance with the customer’s credit limit.

  • Outputsokover_limit

Budget check

commerce.budget_check

Checks a purchase request against the department budget.

  • Outputswithinover
FieldKindDefaultNotes
budgetnumber25000Budget

Reserve inventory

commerce.reserve_inventoryundo

Holds stock for every line. Released automatically if the order later fails.

  • Outputsokbackorder
  • Undocompensated when the order fails or is cancelled
FieldKindDefaultNotes
allowBackorderbooleanfalseAllow backorder

Authorize payment

commerce.authorize_paymentundo

Places an authorization hold. Voided automatically if the order later fails.

  • Outputsokdeclined
  • Undocompensated when the order fails or is cancelled
FieldKindDefaultNotes
methodselectcardMethod. One of card, ach, terms

Capture payment

commerce.capture_payment

Captures a previous authorization.

  • Outputsokfailed

Charge

commerce.charge

Charges the stored payment method (subscription renewal).

  • Outputsokfailed
  • Retries0 by default

Refund

commerce.refund

Refunds captured or charged money, all of it or an amount computed from the context.

  • Outputsokfailed
FieldKindDefaultNotes
amountlogicAmount (expression). Empty refunds everything still refundable
reasontextCustomer returnReason

Generate invoice

commerce.invoice

Renders the invoice to R2 with the configured payment terms.

  • Outputsout
FieldKindDefaultNotes
termsselectnet_30Terms. One of due_on_receipt, net_15, net_30, net_60

Generate PO

commerce.generate_po

Renders a purchase order for the supplier to R2.

  • Outputsout
FieldKindDefaultNotes
suppliertext{{vars.supplier}}Supplier

Create shipment

commerce.shipundo

Buys a label and books the carrier. Cancelled automatically if the order fails.

  • Outputsout
  • Undocompensated when the order fails or is cancelled
FieldKindDefaultNotes
carrierselectupsCarrier. One of ups, fedex, dhl, freight

Return label

commerce.return_label

Issues a prepaid return label (an RMA) and sends it to the customer.

  • Outputsout
FieldKindDefaultNotes
carrierselectupsCarrier. One of ups, fedex, dhl, freight

3-way match

commerce.three_way_match

Matches the PO, the goods receipt and the supplier invoice.

  • Outputsmatchmismatch
FieldKindDefaultNotes
tolerancenumber0.02Tolerance

Pay supplier

commerce.pay_supplier

Schedules the supplier payment.

  • Outputsout

Restock

commerce.restock

Adds received or returned quantities to on-hand inventory.

  • Outputsout
FieldKindDefaultNotes
lineslogicLines (expression). A list of { sku, qty }; empty restocks every order line. Capped at the ordered quantity.

ERP sync

commerce.erp_sync

Posts the order to the ERP (mock).

  • Outputsout
FieldKindDefaultNotes
systemtextnetsuiteSystem

Notify

commerce.notify

Sends a message to the customer, a supplier or the team.

  • Outputsout
FieldKindDefaultNotes
toselectcustomerTo. One of customer, supplier, team
subjecttextOrder {{order.id}} updateSubject
bodytextarea""Body

Condition

control.condition

Branches on a JSON Logic expression over the run context.

  • Outputstruefalse
FieldKindDefaultNotes
expression (required)logic{">":[{"var":"order.total"},1000]}Expression

Approval

control.approvalwaits

Waits for a person to approve or reject. Escalates when the timeout passes.

  • Outputsapprovedrejectedescalated
  • Waitsfor a person or an event
FieldKindDefaultNotes
titletextApprove order {{order.id}}Title
assigneetextmanagerAssignee
timeoutduration2 daysEscalate after

Wait for event

control.wait_eventwaits

Waits for an external event (payment received, supplier ack, goods received).

  • Outputsreceivedtimeout
  • Waitsfor a person or an event
FieldKindDefaultNotes
event (required)textpayment.receivedEvent
timeoutduration30 daysTimeout

Wait

control.wait

Sleeps for a duration, or until a timestamp computed from the context.

  • Outputsout
FieldKindDefaultNotes
durationduration1 dayDuration
untillogicUntil (expression). Epoch ms; overrides duration

Set variables

control.set

Assigns run variables from JSON Logic expressions.

  • Outputsout
FieldKindDefaultNotes
assignjson{"cycle":{"+":[{"var":"vars.cycle"},1]}}Assignments. { name: expression }

Loop

control.loop

Repeats its body while the condition holds, up to a limit. Connect the end of the body back to the “next” input.

  • Outputsbodydone
  • Loopaccepts a next back-edge
FieldKindDefaultNotes
whilelogictrueWhile
maxIterationsnumber12Max iterations

Continue as new

control.continue_as_new

Ends this run and starts a fresh one on the same flow, carrying the variables forward.

  • Outputsnone: ends the run

End

control.end

Finishes the order. “declined” is a policy or approval no; “failed” rolls back every compensable step.

  • Outputsnone: ends the run
FieldKindDefaultNotes
outcomeselectcompletedOutcome. One of completed, declined, cancelled, failed
reasontext""Reason

Each AI node has a schema-checked model call and a heuristic fallback; see AI nodes and the copilot.

Extract order

ai.extract

Reads an email or PO document and extracts the customer and line items.

  • Outputsout

Classify

ai.classify

Assigns one label from a list (spend category, urgency, intent).

  • Outputsout
FieldKindDefaultNotes
labelslist["it_hardware","software","office_supplies","services","travel"]Labels
intotextcategoryStore as var

Risk score

ai.risk_score

Scores fraud and credit risk from 0 to 100; branches above the threshold.

  • Outputslowhigh
FieldKindDefaultNotes
thresholdnumber70High risk at

Demand forecast

ai.forecast

Suggests reorder quantities for SKUs at or below their reorder point.

  • Outputsout
FieldKindDefaultNotes
horizonDaysnumber30Horizon (days)

Summarize

ai.summarize

Writes a short summary of the order so far into a variable.

  • Outputsout
FieldKindDefaultNotes
intotextsummaryStore as var

Agent router

ai.router

An LLM reads the order and context, then chooses exactly one route. Each route is an output.

  • Outputsone per entry in Routes
FieldKindDefaultNotes
instructionstextareaDecide how to handle this order.Instructions
routeslist["auto_approve","needs_approval","ask_customer"]Routes