DeepFuse

The kernel

Writing rules

A rule tells the kernel: when this happens, and only if…, do this, with this risk level.

Parts of a rule

FieldWhat it means
NameA short name you'll recognise, e.g. “Confirm new orders”.
When this event happensAn event type: order.created; a family: order.*; or every event: *.
Only if (optional)A condition on the event, e.g. payload.total > 1000.
Do thisCreate a task, notify the team, assign to a role, reply to the customer, follow up later, tag the record, or open an opportunity.
RiskSimple (green), medium (yellow) or sensitive (red). See How the kernel decides.
Who (optional)The role that handles it: sales, support, shipping, provider…
Within (optional)How many minutes it should take, used for follow-up.

Conditions

A condition reads a field of the event. Use payload. followed by the field name the source sends (for example payload.total, payload.city, payload.service), or source and customer_ref. Operators: is, is not, >, ≥, <, ≤, contains, is filled.

Examples

RuleWhenOnly ifDoRisk
Confirm new ordersorder.created—Create a task (support, 30 min)Green
Big orders to salesorder.createdpayload.total > 5000Assign to salesYellow
New leadslead.received—Assign to sales (15 min)Green
Refund requestsrefund.requested—Create a task (owner)Red
Failed paymentspayment.failed—Reply to the customerYellow

Test before you rely on it

On the Rules page, Send a test event with a type and some fields. You'll see which rules matched and what the kernel decided, without touching your store or customers. Pause a rule any time instead of deleting it.