code wiki / (root) / nx_crm_flow.nx

nx_crm_flow.nx

buildroot/runtime/nx_crm_flow.nx

7421 B180 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic crm
docsdependenciesstructsconstsfunctions

about

nx_crm_flow.nx -- WORKFLOW AUTOMATION TRIGGERS (CRM census E8). The HubSpot/Salesforce-Flow model, sovereign + rules-AS-DATA (law: data as data): a rule = `event|cond(k=v or -)|action|channel-or-dash|arg`; an event = `kind~k=v~...~id=EN` (tilde fields; pipe is the rule separator). Engine: LOAD validates every rule up front (unknown action / invalid send channel = LOUD -1, nothing half-loaded) -> FIRE matches rules to an event and executes actions -- create-task | send (any nx_send channel: email/postcard/letter/card/gift) | notify | update-field. IDEMPOTENT by event id (law 10): the same event id never fires twice (a dedup ledger the caller holds). This is what wires the whole OS together: a deal hitting Negotiation creates the task; a gift received queues a thank-you CARD through the mail arc. Argless = selftest gate. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_send.nx nx_crm_flow.nx

imports: nx_send.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main p sys_write slen fl_load pipe_field fl_action_ok seq p ↻ seq ↻ sr_valid seq ↻ pn p ↻ sys_mmap sys_write ↻ fl_fire fl_evid slen ↻ seq ↻ p ↻ slen ↻ fl_match pipe_field ↻ fl_tf seq ↻ fl_has slen ↻ fl_exec pipe_field ↻ p ↻ seq ↻ sr_route seq ↻

structs

none

consts

none

functions

12func fl_tf(s: *u8, idx: i64, out: *u8, cap: i64) -> i64
called by 1: fl_match
31func fl_has(hay: *u8, needle: *u8) -> i64
called by 1: fl_match calls 1: slen
46func fl_evid(ev: *u8, out: *u8, cap: i64) -> i64
called by 1: fl_fire calls 1: slen
62func fl_action_ok(a: *u8) -> i64
called by 1: fl_load calls 1: seq
70func fl_load(rules: *i64, n: i64) -> i64
87func fl_match(rule: *u8, ev: *u8) -> i64
called by 1: fl_fire calls 4: pipe_fieldfl_tfseqfl_has
106func fl_exec(rule: *u8, evid: *u8) -> i64
called by 1: fl_fire calls 4: pipe_fieldpseqsr_route
120func fl_fire(rules: *i64, n: i64, ev: *u8, seen: *i64, snp: *i64) -> i64
called by 1: main calls 6: fl_evidseqpslenfl_matchfl_exec
141func main() -> i64