CRM: deals, leads, fields, statuses, users and stage history
Stage semantics, field dictionary and attribution by broker
Funnel by pipeline, broker ranking and time per stage
Sales dashboard, AI agent and stalled card alert
What it solves
- Managers see open, won and lost deals in each pipeline without opening the CRM.
- Custom fields become readable text, and the development behind each deal stops being undercounted.
- VGV, VGC (gross commission value) and sales by broker and team match the real number, even with partnership sales.
Business questions it answers
Ask your agent these questions once the case is live.
What you need
- The CRM connected to Nekt, with the field metadata tables and the status list
- The map of CRM pipelines (buyer, owner, launches, rentals, closing)
- The target spreadsheet by team and period, if there are targets
What you get
- A table per deal with pipeline, phase group and readable fields
- A sales by broker table with share, for ranking and commission
- A stage transitions table with the time spent in each one
- An AI agent that answers questions about the funnel using your house definitions
Where to activate
Funnel by pipeline, broker and team ranking against target, time per stage.
Answers how many deals, how much VGV and where the funnel gets stuck, with the field dictionary applied.
Notifies the manager when a deal above a given value sits N days in the same stage.
The funnel comes together quickly. The work is in the field dictionary and the team attribution rule, which must be validated with sales leadership. The detailed view has the business rules, the pitfalls and the acceptance test. Or send everything straight to your agent with the Nekt MCP.
The CRM stores pipeline, stage and custom fields as codes: a numeric category_id, UF_CRM_* fields with option ids and a semantic letter per stage. Each brokerage uses different ids, and legacy fields with similar labels coexist with the new ones. Anyone who filters by deal name or sums partnership sales per broker delivers doubled VGV and undercounted developments.
How it is usually done, and the rule
Each row is a mistake that already happened in practice.
In Bitrix, the deal's stage_semantic_id says P (open), S (won) or F (lost). For leads, use semantics from status_list (S won, F lost, empty open). The stage name changes by pipeline and is only for detail.
category_id (Bitrix) or the pipeline group (Imobzi) separates buyer, owner listing acquisition, launches, rentals and the administrative closing pipeline. The ids are numbers that change by company: keep a pipeline to type mapping table and count each type separately.
UF_CRM_* fields of type enumeration store the option id. The text comes from items in bitrix_deal_fields, which Nekt stores as array<struct<ID, VALUE>> with uppercase keys. The deal source comes from source_id joined with status_list where entity_id = 'SOURCE'. Build a single dictionary with the Portuguese label of each field and use it in every table.
A field with ismultiple = true arrives as an array even when the team fills in a single value. Use the first element as the main value and record coverage: in a real case, a required field still came empty in about 20% of deals.
Fields with nearly identical labels coexist ('Tipo do Imóvel' required and 'Tipo de imóvel' legacy and nearly empty). Use the required one. When the rule moved to a new field, as with loss reason, merge with the new field first and the legacy one as fallback, plus a category that covers both taxonomies.
The deal's development comes from the custom field defined for it (for example, source product or development list). Tags, labels and deal names undercount heavily: in a real case, tag and name found just over half of the deals the canonical field found.
Explode the sale by broker: one row when solo, two when a partnership, each with its share. Ranking and commission use attributed VGV. Sales count is always the distinct count of deals.
The team can come from the sales owner, the listing agent or the user's department. Define the credited team with a fixed priority rule. The department comes from bitrix_users.uf_department (array) joined with bitrix_departments, with the team name before ' - '. A broker who falls into two distinct teams goes to a multiple teams group, not to both.
Launches usually count by contract signing (CCV, purchase and sale agreement) and third-party sales by creation when there is no CCV. If the rule changed over time, keep both: up to a given year, the first entry into won after a non-won stage; after that, the date field created for it. Convert Bitrix timestamps to America/Sao_Paulo before cutting the month.
The deal only stores its current stage. Use bitrix_deal_stage_history and bitrix_lead_stage_history: each row is a dated transition. Time in stage = next transition minus entry. A stage still open is measured up to today, so its average grows. Without native history, record a daily snapshot.
How to read pipeline and stage
Stage semantics and pipeline type, in Bitrix24.
Definitions
Pitfalls that already happened
A stage with no deals in the period does not show up in a simple count, and the funnel chart ends up with gaps.
Cross join every stage of each pipeline with the count and show zero.
After a migration, the old and new CRM coexist with their own status lists and ids.
Decode each one with its own status_list and only union afterwards, with the origin flagged.
Lost deals with the reason 'duplicate or error' inflated leads and dragged down conversion.
Remove that reason from every count.
Users such as 'Lançamentos', 'Administrativo' or the brokerage's name showed up as brokers with sales.
Keep a list of institutional users out of the ranking.
Bitrix records in the server time zone, and sales signed on the evening of the last day fell into the next month.
Convert to America/Sao_Paulo before cutting the month.
Leadership corrects the date of a specific sale on the side, and the fix stays hidden in the transformation code with no one knowing why.
Store fixes in an exceptions table per deal, with the reason.
Acceptance test
The case is done when every item passes.
- For one pipeline and one closed month, won, lost and open match the CRM's own filter (zero difference).
- The sum of VGV attributed by broker equals the month's total VGV, and the number of sales is the distinct count of deals.
- No option field appears as a numeric id in the final table.
- Every stage of each pipeline appears in the funnel, including those with zero.
- The sum of stage times for a closed deal equals the days between creation and closing.
Agent package
Paste into Claude, ChatGPT or any client with the Nekt MCP connected.
Real estate CRM funnel - Phase group comes from semantics: stage_semantic_id P = open, S = won, F = lost. Stage name is detail only. - Each pipeline (category_id) has a type: buyer, owner (listing acquisition), launches, rentals, closing. Never add different types into one lead total. - UF_CRM_* option fields are decoded with the field dictionary (items from bitrix_deal_fields). Multi-value field: the first value is the main one. - Deal source: source_id joined with status_list where entity_id = 'SOURCE'. - Development only from the canonical field. Never from tag or deal name. - Lost deals with the reason 'duplicate or error' are excluded from every count. - Sales = distinct count of deals. Broker ranking uses VGV (gross sales value) attributed by share; partnerships do not double count. - The credited team follows a single priority rule per sale. - Official sale date: CCV (purchase and sale agreement) signing for launches; for third-party sales, per the declared rule. Timestamps converted to America/Sao_Paulo. - Time per stage comes from stage history. An open stage is measured up to today and raises the average: warn when the answer includes open stages. Client exceptions: - <client>: pipelines <buyer id>, <owner id>, <launches id>, <rentals id>, <closing id>. - <client>: development field = <UF_CRM_...>; broker field = <UF_CRM_...>. - <client>: official sale date up to <year> = first entry into won; after that = <field>. - <client>: institutional users excluded from the ranking: <list>.
Build the "Real estate CRM funnel by pipeline" case in my Nekt workspace following the rules at https://academy.nekt.com/en/industrias/imobiliario/funil-crm-por-pipeline.md. 1) Find the source tables and confirm the columns the rules use. 2) Create a transformation at the stated grain applying every rule. 3) Run the acceptance test and show me the result of each item. 4) Create the case's context document in the workspace, leaving my clients' exceptions open for me to fill in.
Variations
Vista: stage and pipeline in vista_crm_negocios and visits in the calendar (completed visit). Imobzi: native pipeline groups and stagnation days. Moskit: options in custom_field_options.
Real visits = visit type activities marked as completed, by broker and month, with distinct clients alongside.
Same method in the administrative pipeline: time between data validation, draft, CCV signing and issuing the commission invoice.