Setting Up Lead Scoring in Bitrix24 CRM
Lead scoring is the assignment of a numeric score to each lead based on its characteristics and behavior. The goal: managers work with the hottest leads first, not in the order they arrived. Without scoring, a warm lead who submitted a large-value request waits in the queue behind a cold one who downloaded a free resource.
Scoring Approaches in Bitrix24
Bitrix24 does not have a built-in scoring engine, but it provides the tools to implement one: custom fields, robots, and the REST API.
Custom field «Score» — a numeric field (UF_CRM_LEAD_SCORE) on the Lead entity. Created in CRM → Settings → Custom Fields → Lead → Add Field → Integer.
Robots — award points when conditions are met. The «Change Field» robot cannot add to the current value — it can only set a specific value. This is a limitation. For accumulative scoring, the REST API is required.
Scoring Model
A typical scoring model for B2B leads:
| Criterion | Condition | Points |
|---|---|---|
| Source | Referral | +30 |
| Source | Organic search | +15 |
| Source | Advertising | +5 |
| Company size | More than 100 employees | +20 |
| Job title | Director, manager | +15 |
| Deal amount | Over 500,000 | +25 |
| Data completeness | Email + phone + company | +10 |
| Activity | Opened email | +5 |
| Activity | Clicked link | +10 |
| Negative | Competitor | -50 |
Implementation via REST API
Scoring logic is implemented via a webhook triggered on lead creation and update:
// /local/rest/lead_scoring.php
$payload = json_decode(file_get_contents('php://input'), true);
$leadId = $payload['data']['FIELDS_AFTER']['ID'] ?? null;
if (!$leadId) exit;
$b24 = initBitrix24Client();
$lead = $b24->call('crm.lead.get', ['id' => $leadId])['result'];
$score = calculateLeadScore($lead);
$b24->call('crm.lead.update', [
'id' => $leadId,
'fields' => [
'UF_CRM_LEAD_SCORE' => $score,
'UF_CRM_LEAD_SCORE_DATE' => date(DATE_ATOM),
],
]);
// If the score is high — notify the senior manager immediately
if ($score >= 60) {
$b24->call('im.notify.personal.add', [
'USER_ID' => SENIOR_MANAGER_ID,
'MESSAGE' => "[b]Hot lead![/b] Score: {$score}. Lead: {$lead['TITLE']}",
]);
}
function calculateLeadScore(array $lead): int
{
$score = 0;
// Source
$sourceScores = [
'RECOMMENDATION' => 30,
'ORGANIC' => 15,
'ADVERTISING' => 5,
'WEB' => 10,
];
$score += $sourceScores[$lead['SOURCE_ID']] ?? 0;
// Amount
$opportunity = (float)($lead['OPPORTUNITY'] ?? 0);
if ($opportunity >= 500000) $score += 25;
elseif ($opportunity >= 100000) $score += 15;
elseif ($opportunity >= 50000) $score += 10;
// Data completeness
if (!empty($lead['EMAIL'])) $score += 5;
if (!empty($lead['PHONE'])) $score += 5;
if (!empty($lead['COMPANY_TITLE'])) $score += 5;
// Custom fields (company size, job title)
$companySize = $lead['UF_CRM_LEAD_COMPANY_SIZE'] ?? 0;
if ($companySize > 100) $score += 20;
elseif ($companySize > 20) $score += 10;
// Negative factors
if (str_contains(strtolower($lead['COMPANY_TITLE'] ?? ''), 'competitor')) {
$score -= 50;
}
return max(0, min(100, $score)); // Cap at 0–100
}
Score Visualization
The score is displayed as a column in the leads list by configuring the view in CRM → Leads → Settings → Columns. For visual highlighting of hot leads — color coding via row highlight rules (Bitrix24 supports color highlighting in the CRM grid).
Sorting leads by score — via custom sorting in the list view: CRM → Leads → Sort → By «Score» field descending.
Case Study: Scoring for a SaaS Company
A company sells a CRM system to small businesses. Leads come from the website (form, chat), advertising, and partners. Without scoring, managers processed leads in order of arrival — and called those who had downloaded a lead magnet first, instead of those who had requested a demo for a 50+ person team.
A scoring model was implemented (8 criteria, 0–100 points):
- Leads scoring 70+ are flagged «Hot» — the manager receives a push notification immediately
- Leads scoring 40–69 — processed within 2 hours
- Leads below 40 — automatically moved to email nurturing without manager involvement
Result after 3 months: lead-to-deal conversion increased from 12% to 19%. Time to first contact with hot leads dropped from 4 hours to 20 minutes.
Timeline
| Configuration | Timeline |
|---|---|
| Scoring model (without automation) | 0.5 day |
| REST API + webhook + basic model | 2–3 days |
| Full system with analytics and nurturing | 5–10 days |







