
B2B CRM System Blueprint: Build Your Own CRM
Building your own B2B sales CRM or moving off a SaaS one? Describe your team, products and current data; get an architecture doc, schema, role-by-role permission and test matrix, money formulas and a phased roadmap. It covers what generic advice skips: closing detail-route data leaks, adding up multi-year and multi-currency deals without inflating them, account handovers, and migrating with dry-run imports. #Ventas #Ingeniería #Consultoría
A build-ready blueprint for a custom B2B sales CRM: who can see what, how money is counted, how account knowledge survives handovers, and how to migrate without importing the mess.
What it does
Your AI interviews you briefly, then works through ten design steps and writes one blueprint document:
- Build, extend or stay: a criteria-based comparison of replacing your current CRM, layering on top of it, or staying, including a decommission and sync policy.
- Data model: four core entities (organization, contact, deal, activity), with everything else treated as a view. Includes contracts, POCs with WBS tasks, quotas, cadences, next-best-action suggestions, stage history, structured account notes, usage billing and exchange rates. PostgreSQL SQL with indexes.
- Roles and permissions: route access, data scope and sensitive operations per role (admin, exec, lead, rep, product manager, presales, custom). Two layers each of authentication and authorization, a fix pattern for the common leak where list pages filter by owner but detail and child routes don't, a feature matrix enforced in two places without self-lockout, and an allow/deny permission test matrix.
- Money math: a base + overage model, an ACV formula that doesn't inflate short contracts, TCV / ACV / in-year display lenses, a rule never to sum mixed currencies, stage win rates, weighted pipeline and forecast scenarios, run-rate from actual billing, and revenue classes (new, renew, add-on, base), renewal upgrade/downgrade and churn definitions.
- Sales engine: follow-up priority scoring, 5–8 next-best-action rules, cadence sequences, account health score formulas, POC types with measurable success criteria, and contract renewal diff.
- Customer 360 and handover: seven data domains, a merged timeline API, a handover overview layout, a day-by-day handover process with a time-limited collaborator role for the previous owner, and a meeting checklist.
- Calendar follow-up: ICS vs OAuth vs CalDAV, a meeting-rules engine, and auto-created "write meeting notes" tasks with escalation and a clear privacy boundary.
- Migration: a pilot-first sequence, six import templates in dependency order, owner draft exports, dry-run validation, batch undo, plus data-health and amount-health check lists.
- Navigation and dashboards ordered by how often each role uses them, and a phased roadmap with testable exit criteria.
What's inside
This is a large Skill, not a one-page prompt: 8 files and about 49 KB (≈840 lines) of reference material your AI reads step by step.
- Data model: 34 PostgreSQL tables with the columns, constraints and indexes that matter (deals, line items, contracts, renewals, usage billing, FX rates, POCs with WBS, cadences, handovers, import batches and more).
- Permissions: route, data-scope and sensitive-operation tables for 6 built-in roles plus custom roles, a list of 9 known holes to design out, and an 11-case allow/deny test matrix.
- Money math: verbatim ACV / TCV / in-year formulas with worked examples, FX rules, one-off and mixed-quote handling, a stage win-rate table, forecast scenarios and revenue classes.
- Sales engine, customer 360, migration: priority scoring, next-best-action rules, cadence templates, health-score formulas, a day-by-day handover process, six import templates with dry-run and batch undo, and data- and amount-health checks.
- A 13-section blueprint template and a 5-phase roadmap with testable exit criteria.
Built from a CRM running in production
The method, schema and pitfalls are distilled from a custom B2B CRM the author designed and runs in production for a real sales team (reps, team leads, product managers, presales and executives). The holes listed here, such as detail routes leaking other reps' records, multi-year deals inflating the forecast and free-text product names breaking reports, are ones that were hit and fixed in that system.
Production go-live checklist
Your blueprint ends with a go-live gate. Before real users log in:
- Every role passes its allow and deny cases, including detail and child routes (no IDOR).
- Data-health check shows zero orphans, zero stages outside the controlled list and zero free-text products.
- Amount-health check shows zero mixed-currency sums; outliers confirmed with owners, never auto-corrected.
- Import dry-run is clean, a backup is taken, and whole-batch undo has been tested once.
- Last year's history is imported and the YoY reports match the old system.
- Reassignment grace access expires on schedule; a departing user is locked out on the last day.
- Calendar tokens are encrypted and unmatched meetings stay private.
- Backups are retained (for example 90 days) and a restore has been rehearsed.
Who it's for
Founders, sales-ops leads, tech leads and agencies building a CRM for B2B teams that sell subscriptions, maintenance contracts, usage-based services or resold vendor products.
How it works
- Short intake: what you sell, roles, current data source and volume, pricing model, currencies, selling entities, integrations, stack. Defaults cover the gaps.
- Ten steps, each reading a reference file (data model, permissions, revenue math, sales engine, customer 360, migration).
- Output follows the included template, with assumptions and open business questions listed separately.
What you provide / what you get
You provide: a description of your sales team and data. You get: one Markdown blueprint (typically 5–12 pages) with SQL, tables, formulas, a permission test matrix and a roadmap. You can ask for a single part, for example only permissions or only the migration plan.
Example requests
- "We sell 1- and 3-year maintenance contracts in two currencies, 12 reps and 3 product managers. Design our CRM."
- "Give me the permission matrix and test cases for reps, team leads and presales."
Requirements
Any AI assistant that can load Skills (for example Claude Code). No API keys or paid services are needed. Example stack: Next.js + PostgreSQL; the design applies to other stacks.
Limits
A design blueprint, not a running system. Win rates and health weights are starting points to calibrate with your own closed deals. The in-year lens is a sales forecast view, not accounting or revenue-recognition advice. Contact and calendar data are subject to privacy law. Out of scope: marketing automation, e-commerce orders and commission payout.


