Example: CRM
The CRM preset rolls out three related entities for sales tracking: Clients, Contacts, and Deals. Below is how they're structured and how they interact, based on the preset's actual configuration.
Entities and relations
Clients (crm_clients) ──1:∞── Contacts (crm_contacts)
│
└──1:∞── Deals (crm_deals) ──∞:1── Contacts (contact, optional)| Entity | Purpose |
|---|---|
| Clients | Client companies and leads |
| Contacts | People within a client company |
| Deals | Deals in the sales pipeline, linked to a client and (optionally) a contact person |
Both the [Clients → Contacts] and [Clients → Deals] relations are one-to-many, configured through the Relations tab in the "Clients" entity builder (see Relations Between Entities).
Client status
The client's Status field is a plain value list (value_list), with no transition restrictions:
| Status | Value |
|---|---|
| Lead | lead |
| Prospect | prospect |
| Active | active |
| Partner | partner |
| Inactive | inactive |
The client also has reference fields Industry and Source (where the lead came from: website, advertising, referral, cold call, event).
Deal stages
The deal's Stage field is a state model with fixed transitions:
┌─────────────────────────────────────────┐
│ ↓
New → Qualification → Proposal → Negotiation → Won
│ │ │ │ ↕
└───────────┴──────────────┴────────────┴→ Lost
On Hold ↔ Negotiation| Stage | Allowed transitions |
|---|---|
| New | → Qualification, Lost |
| Qualification | → Proposal, Lost |
| Proposal | → Negotiation, Lost |
| Negotiation | → Won, Lost, On Hold |
| On Hold | → Negotiation, Lost |
| Won | — (final) |
| Lost | — (final) |
The deal also has Amount, Currency (RUB/USD/EUR), Manager, Expected close date fields and a Loss reason text field, filled in when moving to "Lost".
Automations
The deal uses automations, not business process tasks, for routine logic:
| Rule | Trigger | What it does |
|---|---|---|
| Assign manager on creation | Before Create | If the "Manager" field is empty, fills it in with the current user |
| Notify manager when a deal closes | After Update | When the stage moves to "Won" or "Lost", sends a push notification to the deal's manager |
| Move client to "Active" on win | After Update | If the stage → "Won", the related client's status changes from "Lead"/"Prospect" to "Active" |
The client has a similar rule, "Notify manager on status change" — a push notification with the new status's name.
"Lead Qualification" business process
When a new client is added with the status "Lead", the "Lead Qualification" BPMN process starts automatically:
Client added
↓ automatically
Manager notified of the new lead
↓
Task: "Qualify lead" (for the manager)
↓ on completion
Client status → "Prospect" (automatically)
↓
Task: "Make first contact" (for the manager)
↓ on completion
Process completedSee the Business Processes and Tasks section for more on completing process tasks.
Dashboard
By default, the Sales Representative and Sales Manager roles see the "CRM — Sales Pipeline" dashboard on the home page — deals broken down by stage, clients by status, and lead sources. See the Dashboards and Charts section for more on dashboards.
Roles
| Role | Permissions |
|---|---|
| Sales Representative | Create/view/edit clients, contacts, and deals |
| Sales Manager | Same, plus delete |