Rule Effect
custom
Back to IndexA pass-through effect that is not processed by the platform. Custom effects are designed for inter-rule communication via triggerHook — hook listeners emit custom effects, and the calling rule collects them to decide what action to take.
Type
{ effect: 'custom' type: text}The record is open — additional fields beyond effect and type are allowed.
Usage
A hook listener emits a custom effect:
param input: { hook: 'OnClaimResolve' orderId: uuid lines: [{ resolution: text, productNumber: text, quantity: number }]}
import 'iterators'
from input.lines where l => l.resolution == 'replace' select l => { effect = 'custom' type = 'createReplacementOrder' productNumber = l.productNumber quantity = l.quantity }The parent rule collects the custom effects via triggerHook:
let hookEffects = { orderId = orderId, lines = resolvedLines } triggerHook 'OnClaimResolve'
let replacements = hookEffects where e is { effect: 'custom', type: 'createReplacementOrder' }