Builder guide
Modeling a SaaS deal pipeline in Slab5: stages, deals, invoices, and accounting
A working CRM is not just contacts and a pipeline. It is a deal-to-cash loop — leads become contacts, contacts become deals, deals become invoices, invoices become payments, payments become journal entries. Every step is an audit trail in waiting.
Here's how to model that in one Slab5 workspace.
Step 1: define your stages
POST /v1/deal-stages for each stage. Start with five — anyone who tells you their pipeline needs 12 stages on day one is wrong.
`` Discovery → Demo → Trial → Negotiation → Closed Won ``
Keep Closed Lost as a sixth stage so you can analyze it; do not bury it.
Step 2: leads, contacts, deals
A lead is anyone who showed interest. A contact is a person at a company you have engaged with. A deal is a specific opportunity tied to a company and one or more contacts.
Most teams collapse leads and contacts. Don't. The conversion event (POST /v1/leads/{lead_id}/convert) is a meaningful state change, and you want it in the audit log.
When a lead converts:
- A
companyis created or matched. - A
contactis created on that company. - A
dealis opened on your first stage.
One API call, three records, one audit event.
Step 3: invoices and payments
When a deal hits Closed Won, create an invoice via POST /v1/invoices and link it to the deal. Track payments against the invoice with POST /v1/payments.
The Slab5 accounting model lives next to the CRM, not in a separate tool, which means you can answer questions like "what is the average time from Closed Won to first payment" with one query.
Step 4: journal entries
For anything you need to put on the books — revenue recognition, refunds, credits — use POST /v1/accounting/journal-entries linked to the invoice. Most early-stage teams do not need this on day one, but the data model is ready when you do.
Reporting from BI
The Product Analytics and BI module can read directly from these records. A useful starter dashboard:
- Open deals by stage and owner.
- New leads this week vs last week.
- Days from
DemotoClosed Won. - Invoices outstanding > 30 days.
- MRR from
invoice.paidevents.
No data warehouse. No reverse ETL. The dashboards sit on the workspace data.
What to skip on day one
- Multiple pipelines. One is fine.
- Complex deal-to-product linking. Use
custom_fieldsuntil the shape stabilizes. - Forecasting. Wait until you have 20+ closed deals.
The goal of the first month is making the loop *complete*, not making it complex. Once every deal makes it from lead to journal entry without manual intervention, you have a real CRM.
Agent workflow
A revenue ops agent with the agent workspace role and crm:read can dedupe inbound leads and post enrichment via activity:write without performing conversions itself. Promote to crm:write once you have a few weeks of audit log evidence that the agent's pattern is what you want; today, crm:write includes the conversion action.
API workflow
POST /v1/leads → POST /v1/leads/{lead_id}/convert → PATCH /v1/deals/{deal_id} to advance stage → POST /v1/invoices on close → POST /v1/payments and POST /v1/accounting/journal-entries for the books.
