08GovernanceType: Reference architecture
A sales process that runs on rules, not reminders
A Zoho CRM design where stage gates, quote approvals and locks enforce the process from first lead to the after-sale contract, whoever is working it.
Shows
- Software Architecture
- Business Automation
- Data Architecture
Where this comes from: Drawn from systems I've designed on Zoho. The business, names and data here are generalized. The patterns and failure modes come from real work, and the design includes what that work taught me.
On This Page
In 30 Seconds
A technology company sells complex deals to other businesses, with approvals at several levels and a contract that lives on after the sale. In this design, one Zoho CRM carries each deal from lead to the after-sale contract, and the system enforces the process, not people's memory. Blueprint, Zoho's stage-by-stage process tool, decides when an opportunity may move. Approvals sit on the quote, where the price lives, and locks freeze the numbers once they become a commitment.
What It Guarantees
- An opportunity moves only along defined stages, and only when the next stage's conditions are met.
- A deal can't close as won without an approved quote.
- A quote that needs approval can't become an order without it.
- Approved prices and terms can't be edited quietly afterwards.
- Every order carries the approved quote's numbers, and every record links back to the one it came from.
The Problem
Picture a technology company that sells projects and service contracts to large customers. A deal passes through sales, managers and technical staff, then lives on as a contract that is renewed, expires or ends.
A common setup spreads that path across several tools: pipeline in one, quotes in spreadsheets, approvals in email. The rules live in a document and in people's heads. A deal jumps to "won" without an agreed quote. A discount is approved in a chat, and then the quote changes. Someone retypes the order from a PDF. Nobody can say who may change a quote, or when it should stop changing.
The process works while the right people are paying attention, and drifts when they are new, busy or facing quarter-end. Nobody can follow one customer across the lifecycle, because no record knows where it came from.
The Approach, in One Sentence
Every rule of the process lives in the Zoho layer that can enforce it, and every record is created from the one before it.
Architecture
Connections in this diagram
- Lead converted → Stage gate (opportunity)
- Stage gate → Quote from opportunity (creates quote)
- Quote from opportunity → Approval needed? (submitted)
- Approval needed? → Approved numbers lock (approved or none)
- Approved numbers lock → Closed won? (then)
- Closed won? → Order from quote (yes)
- Order from quote → Installed-base record (post-sale)
Each way a record can be written has its own check.
Key Decisions
Each rule lives in the layer that can enforce it
Alternatives: a process document plus training, or one large script on save. A document depends on memory, which fails under pressure. One big script hides the rules from the admins who maintain them. So I split the rules by job: validation for what a save in the form must satisfy, Blueprint for which moves exist and who may make them, approvals for a second person, locks for what must stop changing. Client scripts, code that runs in the form, guide people as they type, but no rule depends on them alone. Writes that never open the form, from integrations, imports and automations, get checks of their own.
Approvals live on the quote, not the opportunity
Alternatives: approve the opportunity at a stage, or approve by email. The opportunity is a forecast that keeps changing. The quote holds the price and terms that need a decision. Approval rules read the quote's own data, so the approval stays attached to the actual numbers. An email "yes" belongs to no version of anything.
Each record is created from the one before it
Alternative: create records freely and link them later, which produces orphans and retyped numbers. Here the quote comes from the opportunity, the order from the approved quote, and the installed-base record from the order, each inheriting context and a link. The links pay twice: Zoho Analytics follows them from first lead to the after-sale contract, a wider view than standard CRM reports give.
Lock late, not early
Alternatives: lock from the start, or never lock. An early lock gets worked around while the deal is still taking shape. With no lock, approved numbers drift. So the lock goes on when a number becomes a commitment: under review, once approved, and when the order reaches delivery.
When Things Go Wrong
A deal is marked won without an approved quote
→ The closing move checks for one and refuses, because the order would have nothing to start from.
A quote needs a decision above its owner
→ The approval rules route it to the defined approver, and a locking rule on the in-review status holds it still. Zoho documents its own lock on records awaiting approval, but the design doesn't rely on it: a documented default can change.
Someone edits an approved price
→ The lock refuses. A real change goes back through approval, so the order never carries numbers nobody approved.
A change arrives through an import, an automation or an integration
→ Client scripts never see it. At the time of writing, Zoho's documentation says validation rules run on screen saves and on API writes only when the call asks, not on imports or automation updates, and that locked records still take automation and some sync writes. That may change. So each path has its own check: integrations ask for validation, imports are checked before loading, automations check before they write. A scheduled report flags any record that breaks a rule.
What the Business Gets
- The process holds when people are new, busy or under pressure, because the system enforces it.
- An approved number stays the approved number, from quote to order.
- Managers can follow each customer across the whole lifecycle, because every record knows where it came from.
For Engineers
Record chain. Account → opportunity → quote → order → installed-base record. Each holds a lookup to the record it was created from, set by the flow that creates it. The opportunity also holds a lookup to its accepted quote, set on approval; the closing move reads that one field.
Rule layers.
- Validation rule: what a save in the form must satisfy; API writes ask for it explicitly.
- Blueprint: allowed transitions, who owns each one, required fields, and conditions checked before it runs. Its entry criteria match every opportunity.
- Approval process: ordered criteria on the quote's data; the first match routes it.
- Record locking: criteria on status (quote in review or approved, order in delivery). Only fields that don't change the commitment stay editable, and no automation or sync writes a commitment field.
- Client script: read-only fields, warnings and defaults in the form. Guidance, not enforcement.
Visibility and access. Roles and sharing rules decide who sees a record, and profiles decide what each person may do with it. The layers above decide when. Sales profiles can't create orders or convert quotes by hand, so an order comes only from the closing flow.
# Illustrative; names and conditions are examples.
on transition(opp, to_stage, user):
refuse unless (opp.stage -> to_stage) in TRANSITIONS
refuse unless user in owners(opp.stage -> to_stage)
require fields(opp.stage -> to_stage)
if to_stage == CLOSED_WON:
refuse unless opp.accepted_quote and opp.accepted_quote.status == APPROVED
on quote_saved(q):
rule = first rule in APPROVAL_RULES matching q
if rule: send_for_approval(q, rule.approvers) # in review: locked
else: q.status = APPROVED; quote_approved(q) # no rule matched
on quote_approved(q):
q.opp.accepted_quote = q # one accepted quote per deal
on closed_won(opp):
q = opp.accepted_quote
new Order(lines = q.lines, terms = q.terms, quote = q, opp = opp)
How I Build Systems Like This
I start from the business, not the screens: who does what, when, under which conditions, and what each action changes downstream. I write that down as stages, approvals and locks before configuring anything. Much of the hands-on configuration and checking is now done by AI agents (Claude Code), and a task closes only after the flow has run end to end and been read back.