Leads, deals and stage history from the CRM
Deal linked to its source lead and stages grouped into milestones
Days between milestones, conversion and SLA per stage
Sales panel, stalled card alert and AI agent
What it solves
- Leadership sees the full journey from lead to contract, even with lead and deal stored as separate entities in the CRM.
- Each back-office stage has a deadline, and the panel shows who is late and by how much.
- A stalled card becomes an alert to the broker before the client goes cold.
Business questions it answers
Ask your agent these questions once the case is live.
What you need
- CRM connected with the stage history of leads and deals (in Bitrix24, lead_stage_history and deal_stage_history)
- A map of every CRM stage to a journey macro stage, approved by management
- The deadline for each post-sale stage, agreed with the back office
What you get
- A table per lead with the date of each milestone and the days between them
- A stage event table with time in stage, team, broker and source
- Post-sale SLA panel with late or on-time status
- An AI agent that answers questions about cycle time and bottlenecks with the right rule
Where to activate
Milestone funnel by cohort, days between milestones by team and source, and the back-office queue with each stage's delay.
Answers how long it takes, where each team loses leads and who is late, with the milestone and cohort rules already applied.
Daily list per broker of cards that passed the stage limit and, for the back office, of stages that blew their deadline.
The stage history solves most of it. The work is in linking each deal to its source lead and in closing the stage map with management. The detailed view has the business rules, the pitfalls and the acceptance test. Or send everything straight to your agent with the Nekt MCP.
In a real estate CRM the journey starts as a lead and ends as a deal, and both keep only the current stage. Many deals are created without the lead id, so the journey breaks in half and the time to contract disappears. Measuring with the last-updated field resets the clock on every edit, and treating a won lead as a sale reports contracts that were never signed.
How it is usually done, and the rule
Each row is a mistake that already happened in practice.
The deal's lead_id is often empty. Resolve it in three tiers, in this order: 1) the deal's direct lead_id; 2) the first lead of the same contact_id created before the deal; 3) a lead with the same normalized contact name, created up to 730 days before the deal, keeping the most recent. Store a column saying whether the link was recovered, to measure quality.
Map each lead status and each deal stage to a numbered macro stage (qualification, contact, viewing, offer, won, offer accepted, contract, signing, contract signed). The milestone date is the earliest entry date in the history for any stage in that macro stage. Always sort by the macro stage number, never by name.
On the lead, won (CONVERTED in Bitrix24) means it became a deal. Contract signed is a deal stage, after offer accepted, drafting and signing. Close rate uses contract signed over leads; deal conversion rate uses won leads over leads.
The journey is read by the lead's qualification date: the March leads and how far each one got. Time between two milestones exists only when both dates exist; incomplete journeys stay out of the average, they do not count as zero. For monthly output (how many viewings happened in March), use the event table by event date, and never mix the two readings in the same chart.
In the stage event, time in stage is the next entry minus the current entry. The stage a deal is in today is measured up to the current date, so its average grows every day. Show the duration of completed stages separately from the age of deals still in the stage.
The entry date into the current stage comes from the stage history. Per-stage date fields filled by automation can support it, checked against the history. The deal's last-updated date never works: any field edit changes it.
The back-office pipeline (data validation, draft contract, signing of the CCV, i.e. purchase and sale agreement, financing, deed, ITBI transfer tax and registration) has very different deadlines. A real example: data validation within 1 day, analyst validation within 2 hours, drafting within 8 hours, draft under review by the parties within 2 days, CCV signing within 1 day, financing signing within 90 days, deed and registration within 30 days each, cash sale annotations within 45 days. Stages that depend only on third parties may have no deadline. Show the status (late or on time) and how far past the deadline it is.
Bitrix24 stores dates in the server time zone. Convert to America/Sao_Paulo before cutting the day and before calculating deadlines in hours. In a stage with a 2-hour deadline, a wrong time zone marks everything as late.
Stalled means an open deal with days in the current stage above that stage's limit. Use the limit configured in the CRM when it exists (Imobzi stores stagnant_days per pipeline stage) and a declared default when it is empty (for example, 14 days). Won and lost never enter the alert.
Summary tables by team or source store the average already calculated. When combining several teams, calculate the weighted average from the events or individual journeys. An average of averages distorts when teams have different volumes.
Journey milestones
Example with Bitrix24: lead statuses and sales pipeline stages grouped into numbered macro stages.
Definitions
Pitfalls that already happened
Skipped stages or stages recorded after the fact made more leads reach the offer than the viewing.
Declare the rule: either mark the skipped stage as passed, or accept and explain rates above 100% without capping the number.
Days to first viewing were calculated with the last-updated date, and any edit to the deal changed the result.
Use stage entry from the history.
Deals created directly by the broker had no lead_id and the journey stopped at the lead won stage.
Recover the lead by contact and by name, and measure how many links were recovered.
The average days in stage rose every month because open deals were measured up to today.
Separate the duration of completed stages from the age of open stages.
The last stage before the loss was read as the reason, and two reason fields with different lists coexisted.
Use the stage to know where it was lost and the consolidated reason to know why.
Projects with direct developer financing or still in launch entered the bank financing handover SLA and dragged the indicator down.
Calculate the handover SLA only for projects with an active bank financing portfolio.
Acceptance test
The case is done when every item passes.
- For a closed lead cohort, the count at each milestone matches a manual count in the CRM of entries into each stage (difference below 2%).
- Every deal in the sales pipeline has a source lead or the no-link flag, and the share recovered by the cascade is reported.
- No lead shows a signed contract without having passed through lead won or the corresponding deal stage.
- For a chosen post-sale deal, the current stage, entry date and SLA status match what the back office sees in the CRM.
- The sum of the times of a deal's completed stages equals the exit date of the last one minus the entry of the first.
Agent package
Paste into Claude, ChatGPT or any client with the Nekt MCP connected.
Lead journey to contract - The journey runs from the lead to the deal. The deal is linked to its source lead in a cascade: direct lead_id, then the first lead of the same contact created before the deal, then a lead with the same name within 730 days. The lead_origem_recuperada column says whether the link came from the cascade. - Milestone = first entry into the macro stage, from the stage history. Order: 1 qualification, 2 in contact, 3 viewing, 4 offer, 5 lead won, 6 offer accepted, 7 contract, 8 contract signed. Sort by number, never by name. - Lead won (CONVERTED) means it became a deal. Contract signed is a deal stage. Never call a won lead a sale. - Cohort by the lead's qualification date. Monthly output by event date. Do not mix the two. - Days between milestones only when both dates exist. Incomplete journeys stay out of the average. - The current stage of an open deal is measured up to today: it is age, not duration. Answer the two separately. - Average across several teams or sources: recalculate from the detail rows, do not average averages. - CRM dates converted to America/Sao_Paulo before cutting the day or calculating hours. - Post-sale SLA: each stage has its own deadline (deadline table per stage). Late when time in stage exceeds the deadline. - Stalled card: open deal above the stage's day limit; default of <days> when the stage has no limit. - Rates with a zero denominator return null. Client exceptions: - <client>: the official signed contract date is field <field> from <date>; before that, the first entry into the signed stage. - <client>: bank financing handover SLA calculated only for projects <list>, with a ceiling of <days> days.
Build the "Lead journey to contract" case in my Nekt workspace following the rules at https://academy.nekt.com/en/industrias/imobiliario/jornada-lead-contrato.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
From contract to the bank's money: SLA in days between the handover sale date and entry into the stage where the financed amount is received, with a 60-day ceiling, only for projects with a handover portfolio.
Vista: deal stage and completed viewings in the calendar. Imobzi: deal stage and entry date, with stagnant_days per stage. Without native history, save a daily snapshot of deals starting now.
Same method for a property entering the management portfolio: contract closed, inspection, adjustments, property active, with the days between each milestone.