code wiki / (root) / nx_crm.nx

nx_crm.nx

buildroot/runtime/nx_crm.nx

11083 B200 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic crm
docsdependenciesstructsconstsfunctions

about

nx_crm.nx -- PROFESSIONAL CRM PIPELINE (rung 2 of Nishi CRM/Relationships to SOTA). Operator 2026-07-08: "clients like andelinwest.com can use a state of the art crm". The sales/deal layer on top of the nx_relate entity graph: an ACCOUNT is a company entity you do business with; an OPPORTUNITY (deal) has an amount, a close date, and a PIPELINE-STAGE; each stage carries a win PROBABILITY + a forecast category, so the DASHBOARD shows a weighted forecast (Salesforce OpportunityStage model, verified 2026-07-08). Plus ACTIVITY (tasks/calls/meetings on a record) + SEQUENCE (a follow-up cadence that auto-stops on reply). Composes with nx_relate (accounts + contacts are entities) + nx_send (reach any contact) + nx_vizsla (timeline/reminders). NOTE (research reframe): long-term these become object/edge DEFINITIONS on the flexible nx_relate engine, not a hardcoded silo -- this focused organ ships the value now + is refactorable to engine-config (rework-not-retire). Pure logic + a self-test gate (argless = selftest). Persistence = next rung. Commands: stages | account <tenant> <name> | opp <tenant> <name> <account> <amount> <stage> | activity <tenant> <record> <type> <subject> | sequence <name> <steps> | dashboard | selftest expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_crm.nx nx_crm_gate.nx nx_crm_store.nx

imports: nx_syscalls.nx

imported by: nx_crm_gate.nxnx_crm_store.nx

structs

none

consts

14const K_MAGIC_50000: i64 = 50000
15const K_MAGIC_120000: i64 = 120000
16const K_MAGIC_30000: i64 = 30000
17const K_MAGIC_20000: i64 = 20000
18const K_MAGIC_10000: i64 = 10000
19const K_MAGIC_122500: i64 = 122500

functions

21func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: pcs_kmemeq
22func p(s: *u8) -> i64 { sys_write(1, s, slen(s)); return 0 }
23func pn(v: i64) -> i64
29func seq(a: *u8, b: *u8) -> i64
37func stage_valid(s: *u8) -> i64
called by 3: cmd_oppcmd_selftestcs_save_deal calls 1: seq
46func stage_prob(s: *u8) -> i64
55func stage_forecast(s: *u8) -> *u8
called by 2: cmd_stagescmd_opp calls 1: seq
64func stage_open(s: *u8) -> i64
70func cmd_stages() -> i64
82func cmd_account(tenant: *u8, name: *u8) -> i64
called by 2: cmd_selftestcm_cli calls 1: p
85func cmd_opp(tenant: *u8, name: *u8, account: *u8, amount: i64, stage: *u8) -> i64
94func cmd_activity(tenant: *u8, record: *u8, kind: *u8, subject: *u8) -> i64
called by 2: cmd_selftestcm_cli calls 2: seqp
104func cmd_sequence(name: *u8, steps: i64) -> i64
called by 2: cmd_selftestcm_cli calls 2: ppn
112func cmd_dashboard() -> i64
137func cmd_selftest() -> i64
172func cm_cli(argc: i64, argv: *i64) -> i64