Diamond CRM
A-000 · REV 2.35 · LAB001
Diamond CRM
Diamond Intelligence Labs

Opening…

Today

— Fence 1 — every value names its origin or is a gap
GAPActive Jobs—count(jobs) where stage active
GAPPipeline Value$—sum(budgets.total) open stages
GAPAppts Today—appointments where date = today
GAPInvoices Out$—sum(documents_list.balance) where doc_type='invoice'
GAPClosing %—%proposals signed / issued
GAPAvg Ticket$—avg(proposals.total) signed
Job Pipelineone bar per stage · stages are dataGAP
Sourceselect stage, count(*) from jobs group by stage order by stage
Schedule — TodayGAP
Sourceappointments · date = today · order by start_at
Moneythe rollup heartGAP
Budgetedsum(budget_items) · estimating$—
▼
Projectedfrozen snapshot lines$—
▼
Varianceprojected − actual$—
▼
Actualscost_allocations + invoices$—
Sourcebudgets · budget_items · proposals · invoices · cost_allocations
ActivityGAP
Sourceevents · latest 8 · order by at desc · actions_log retired on X-520
Messageslatest inbound + outboundGAP
Sourcemessages · latest 4 · order by created_at desc

Contacts

R-100 · records · an independent root people, not accounts — a household is several of these
—
Contact Board each contact sits with its earliest open job · call = no visit booked yet

Properties

R-110 · records · an independent root the house outlives everyone who owns it
Property Board each property sits with its earliest open job

Jobs

R-120 · records · stage pipeline the center of the graph — everything else hangs off a job
New job board: open work · list: everything count: — · count(jobs)
Pipeline Board one column per stage · count and value per column
Current — in stage under a week Aging — a week or more Stalled — two weeks or more Weight, not colour: orange means unwired and nothing else.
Sourcejobs_list · stage · derived label · property · budget total · days in stage from stage_transitions (052)

Crews

R-130 · records who does the work · W2 or 1099 · paid hourly, by the day or by the piece
+ Crew —
Crew List one job a day each · a second job the same day turns that day red on the Schedule
NameTradesHired asPaidLeaderJobs booked
Sourcecrews_list (626) · trades from the company’s own trade list · jobs booked = open work entries from today on · written only through crew_save and crew_retire · a crew is a name on the schedule, never a login (S2.99); the crew leader’s login comes with the crew app

People

R-140 · records everyone this company reaches a job through
+ Person + Client login —
Staff who works here, whether or not they can sign in
NameRoleEmailPhoneSign-in
Sourceprincipals_list where is_staff · display_name derived in the view (151) · written only through principal_save and principal_retire, because authenticated holds SELECT on principals and nothing else
Crews The people who do the work have their own list on R-130 Crews (626, Gabe 2026-11-15: a crew is who does the work, not who signs in). A crew leader’s login arrives with the crew app and points at the crew.
Suppliers Where material comes from. vendors already exists and is read by the catalog; nobody can sign in as one, which is the whole of what this section is waiting for.
Architects 1099, paid by the contractor, and the homeowner is never involved (Gabe, S3.09) — so an architect reaches a job exactly the way a crew does. Same branch, different trade.

Schedule

E-200 · engagement a plan is a commitment, and a commitment has a cost
The week —
appointment — a person at a time work — capacity on a job delivery — an arrival on a date collection — a departure on a date a crew on two jobs that day — one job a day each
Sourcecalendar_entries (155) · a task is on the calendar when it has a start_date, which is derived and not a column · kind is a label and decides nothing · an entry with no start_time draws in the all-day strip, because a time cell would assert an hour the record does not carry
This week, in order the same rows the grid draws
WhenWhatKindJobWho
Sourcethe same read, ordered by date then time · the client comes from job_contacts through the view and is never copied onto the entry
Deliveries that draw themselves A delivery is bookable here by hand now. It becomes a record when a material order exists to derive it from, which is E-230 — until then the arrival is typed, and a typed arrival is honest as long as nothing claims it was confirmed.
A moved appointment says nothing Booking emits appointment.booked once, and the homeowner’s timeline reads it (156). Moving one emits nothing: a reschedule is a different fact, event_kinds has no term for it, and inventing one here would be a vocabulary nobody ruled. Rev 2.23 ruled reschedule as supersession against a table that never existed — the dates live on the row now, so that ruling is owed a re-cut before this band comes down.

Messages

E-210 · engagementevery conversation, across every job
Conversationsnewest activity first
Sourceconversations_list (285) · one row per conversation, the job named by jobs_list · order by last_message_at desc · the row opens the job on its Messages tab, because the thread has exactly one renderer and it lives there

Daily Logs

E-220 · engagement the crew records; the office publishes
+ Log Entry GAP filter: all jobs · last 7 days TABLE UNRATIFIED
Log — By Dayeach entry names the scheduled work it reports onGAP
Sourcedaily_logs (candidate) by date desc · work_item_id (owed) resolves the anchor · publish state from daily_logs_list.published — a Customer tag AND authored words

Production Orders

E-230 · engagement work order drawn — material order still gated
This sheet was gated as one thing for a reason that only covered half of it. The stated gate was that a material order’s recipient is a supplier, and delivering a document to one is the same permission question a vendor login is. True — of the material order. A work order goes to your own crew, and a crew has no auth surface by ruling. The two halves were bundled, so the internal half inherited an external half’s gate.
The Work Orderlabour and subcontract lines, from the frozen estimateGAP
scopeTear off, one layer — budget_items line
quantity— SQ
crew—
1 work_item
scopeInstall shingles — budget_items line
quantity— SQ
crew—
1 work_item
scopeGutter replacement — subcontract
quantity— LF
crewsub —
1 work_item
Sourcework_orders (owed) generated from the frozen estimate · work_order_lines (owed) edge each frozen budget_item where cost_type in (labour, subcontract) · one work_item per line

Catalog

M-300 · estimating vocabulary est / actual is a first-class field, not a naming trick
+ New Item Author many items
Catalog Itemsthe vocabulary an estimate line is allowed to name
ItemCost CodeEst UnitOrder UnitCost TypeUnit CostUnit Price
Sourcecatalog_pricing · catalog_items · catalog_purchase_units (071, dimensions 081) — one item, many packages · cost_codes (hierarchical, self-FK) · units · cost_types · markup_rules · named by budget_items.catalog_item_id, nullable

Proposals

M-320 · money — estimating freeze is three things: copy + trigger + chain
Proposal ListGAP
ProposalJobContactStatusFrozen AtTotal
Sourcedocuments · document_groups · document_lines, read through documents_list · draft_proposal_from_budget copies, issue_document freezes, accept_document signs

Invoices

M-400 · money — actual spawned by the sign event · the schedule is data, not code
filter: outstanding · sort: oldest first outstanding: $— · sum(amount − paid)
Outstandingoldest money first — this is the cash viewGAP
InvoiceClientJobIssuedDueAmountPaidBalanceDays late
Sourceinvoices · aging needs invoices.due_date; if that column is absent every bucket on this sheet is unanswerable

Payments

M-410 · money — actualdate + method per payment · money physics stay at the bank
+ Record Payment GAP filter: last 30 days
Record A Paymentwhat arrived, when, and by what railGAP
Invoice
Date received
Amount
Reference / check no.
Method
CheckCardBank transferCash
Sourcepayments insert · money physics stay at the bank — this records the fact, it does not move funds
Payment Ledgerinsert-only — no update, no deleteGAP
DateInvoiceJobMethodAmount
Sourcepayments · FK → invoices · a job can pay deposit / progress / final by different rails

Costs

M-420 · money — actual the cost mirror of the invoice — and the input every report depends on
book of record: Diamond CRM · pushed to QBO · last sync —
GAP This queue is an exception list, and an empty one is the normal state. Costs are authored here, so nothing routine arrives to be reconciled. What lands here is a transaction at the bank with no counterpart in this system — and every figure on X-500 excludes whatever is still sitting in it.
Unmatched At The Bank the safety net, not the main path GAP
Sourcebank-feed rows read through QBO with no matching native transaction · suggestions read vendor history + open jobs + date proximity

Client Portal

P-600 · portals · issued surface a document is read once — a portal is returned to
Viewing as a client is a contact on a job — no membership row, no credential
Diamond Exteriors
Signed in as—
—
—
Activity
Diamond ExteriorsManassas, Virginia
Design note — not part of the portal. A homeowner never sees the internal pipeline; operational granularity reads as anxiety. The five client phases are derived from artifacts, not from stage — a proposal exists, the contract is signed, the job is closed. Stage is maintained by a person and lags: this database holds an accepted proposal on a job still reading Quoted, and a client shown that would be told something false. In progress has no producer and draws as a future stop rather than an invented state.

Diamond Portal

P-610 · portals ruled, not drawn
Material Confirmation — The Crew’s Surfacecounted against ordered, then the request queueGAP
ItemOrderedCountedExceptionPhoto
Submitted, this is either confirmed or it is a discrepancy report — and that is derived, not chosen: any line where counted differs from ordered, or an exception is set, makes it the second. Nobody picks an outcome from a menu.
Requested itemQtySuggested supplierPhotoDisposition
Sourcematerial_confirmation_lines joined to material_order_lines (both owed) · material_requests (owed) · confirmed-or-discrepancy derived from the lines, never stored · crew principal only (R-140)
One System, Drawnthe same renderer, a different listGAP
The production system, rendered by the client portal’s ladder component with a different ordered set. Nothing here is a second copy of that code, which is the claim being demonstrated rather than asserted.
Each stage names its witness where it has one: the order exists, the delivery is verified, the work items complete. Confirm the truck deliberately has none — it is a stage only a person can assert, and 2.28’s split says so out loud rather than pretending the system knows.
GAP system_stages owed (R-140). Sales, marketing and admin are undrawn; the shape is proven once and copying it four times is exactly what this pass exists to prevent.
Sourcesystem_stages where system = production, ordered (owed) · rendered by the P-600 ladder component · three systems undrawn

Intake

P-620 · portals every lead, before it is anybody's job
+ Take a call — the public form is served at page.html?p=free-inspection
Waitingnobody has answered these yet

Marketing

P-630 · portals where the public surfaces are authored — P-620 is what they write
The P-6xx family is about audience. P-600 and P-610 are one job seen by a client and by a supplier; P-620 is what a stranger may write. P-630 is where every one of those public surfaces is authored — landing pages, the forms on them, the social schedule, the blog. It is the front door of the front of the house, and it is drawn before the pipeline it feeds because a sheet is not designed before the sheets it derives from.
+ New Page GAP status: all · owner: unmodelled

Reports

X-500 · the rollup heartfully native reads · books stay external by ruling
period: month to date · basis: accrual
GAP This statement excludes — unreconciled transactions totalling $—. A profit figure that silently omits costs still sitting in the inbox is not a profit figure. Every report in this system states what it left out, on the report, not in a footnote.
Job Profit & Lossone job, revenue against costGAP
Sourcerevenue from proposals + change_orders + invoices · cost from cost_allocations on this job · percentages of contract, computed in SQL
Diamond, Management Basisthe same period, the way the business is runGAP
Cost code or categoryMaps toPeriodYear to date
Sourceinvoices + cost_allocations rolled through a per-report line mapping · accrual, capital purchases expensed · the mapping is owed and unruled: a balance sheet does not roll up through cost codes the way a P&L does
Why They Differitemised, and it has to footGAP
DifferenceReasonDispositionAmount
Sourceqbo_changes where disposition = divergent, plus basis differences computed from the two statements · residual = (Diamond total − QBO total) − sum(stated differences)
Ordered Against Actualwhat the order said, what the invoice saidGAP
OrderSupplier or crewCost codeOrderedActualVariance
Sourcework_orders + material_orders against bills.fulfils_order_id · order grain where the link exists, cost-code grain where it does not · readable when the invoice arrives, not when it is paid

Settings

X-510 · rollupthis sheet is where “data, not code” is either true or exposed
Tenantone row, and every scoped write checks itGAP
SettingValueGoverned By
Companycompanies · select-only
ScopeLAB001RLS with_check on every scoped write
Time zoneGAP owed — a delay of five minutes needs a wall clock
Send windowGAP owed — quiet hours, per tenant, not per rule
Issued brandingread by every issued document · gold is permitted there
Price guaranteedata, not code — frozen onto the proposal at issue
Sales windowdata, not code — ours, never shown to a client
Payment schedule defaultdata, not code — the DEFAULT is a setting; the schedule itself freezes onto a proposal at ISSUE (127)
Sourcecompanies · tenant_settings (owed) — time zone and send window are read by the automation layer, not by any screen
What every proposal sayschanges the next one, never one already issued
Sourcecompany_settings · one row per tenant (161) · documents_list resolves the printed ones onto a DRAFT and issue_document copies them onto the row before the status flips, so an issued document keeps what the homeowner was shown · the autocomplete key (185) is a working setting and is copied onto nothing

Automations

X-520 · rollup the process definition is a record
If automation is what makes the process consistent, the automation definition is the process definition — so it is native. Marketing automation is not being integrated; it is being replaced. GoHighLevel is a specification reference for what these rules must express, never a runtime dependency. Splitting the process definition from the records it drives puts two owners on one fact, which is what this system refuses in invoices.amount_paid.
Rules As Rowswhen this · after that · do the one thingGAP
whenproposal.signed
afterimmediately
doadvance_stage → Signed
whenjob.stage_changed → Signed
afterimmediately
dodraft_invoices_from_proposal · deposit
whenlead.submitted
after5 minutes
doGAP send_template · lead_ack · email
whenGAP invoice.overdue
afterimmediately
doGAP send_template · invoice_reminder
whenpayment.received
afterimmediately
dosend_template · paused by the office
Sourceautomation_rules (owed) — event_type, delay_minutes, action_type, action_params jsonb, enabled · one row per rule, per tenant