Custom CRM Report Development for Bitrix24
The built-in Bitrix24 report builder cannot: combine CRM data with data from 1C-Bitrix, build cohort customer analysis, calculate LTV or RFM segments. This requires development — via BI connector, REST API, or custom tables in PostgreSQL.
Custom Report Development Approaches
Bitrix24 BI connector — the official way to connect an external BI tool (Power BI, Tableau, Google Looker Studio) to Bitrix24 data. Data is delivered via REST as flat tables. The schema is fixed and cannot be extended.
REST API + own database — via crm.deal.list, crm.contact.list, crm.lead.list methods, data is exported to an external database (PostgreSQL, ClickHouse). Arbitrary reports are built there. Full control over structure and data updates.
Custom component inside Bitrix24 — for on-premise versions: a PHP component in /local/components/ renders the report directly in the Bitrix24 interface. Data is taken directly from the database tables.
BI Connector: Capabilities and Limitations
Connection: Bitrix24 → BI Analytics → Connect BI Tool. A URL with a token is generated for connection from Power BI or Looker Studio.
Available datasets:
- Deals with fields (including UF_CRM_*)
- Leads
- Contacts and companies
- Activities (calls, emails, meetings)
- Users
Limitations: data is updated with a delay (not realtime), no connection to external systems, cannot add computed fields on the Bitrix24 side.
Development via REST API + External Database
This is the most powerful approach. Synchronization scheme:
Cron (every 15 min) → Bitrix24 REST API → Parsing → PostgreSQL
↓
BI tool or web application
Example of deal export with pagination:
$start = 0;
do {
$result = $client->call('crm.deal.list', [
'order' => ['DATE_MODIFY' => 'DESC'],
'filter' => ['>=DATE_MODIFY' => $lastSyncDate],
'select' => ['ID', 'TITLE', 'STAGE_ID', 'OPPORTUNITY', 'ASSIGNED_BY_ID',
'SOURCE_ID', 'DATE_CREATE', 'CLOSEDATE',
'UF_CRM_CUSTOM_FIELD1', 'UTM_SOURCE', 'UTM_CAMPAIGN'],
'start' => $start,
]);
foreach ($result['result'] as $deal) {
upsert_deal($pdo, $deal); // INSERT ON CONFLICT UPDATE
}
$start = $result['next'] ?? null;
} while ($start !== null);
REST API limit: 2 requests/sec on cloud portals. For large data volumes, the batch method is used: up to 50 requests in a single HTTP call.
Customer Cohort Analysis
Task: split customers into cohorts (month of first purchase) and track their repeat purchases. In Bitrix24 "out of the box" this is impossible.
Solution via external database:
-- Cohort analysis of repeat purchases
WITH first_deal AS (
SELECT
contact_id,
DATE_TRUNC('month', MIN(closedate)) AS cohort_month
FROM deals
WHERE stage_id = 'WON'
GROUP BY contact_id
),
deals_with_cohort AS (
SELECT
d.contact_id,
f.cohort_month,
DATE_TRUNC('month', d.closedate) AS deal_month,
d.opportunity
FROM deals d
JOIN first_deal f ON d.contact_id = f.contact_id
WHERE d.stage_id = 'WON'
)
SELECT
cohort_month,
deal_month,
COUNT(DISTINCT contact_id) AS customers,
SUM(opportunity) AS revenue
FROM deals_with_cohort
GROUP BY cohort_month, deal_month
ORDER BY cohort_month, deal_month;
The result is connected to Looker Studio or visualized in a custom web application.
Real Case: B2B Sales Analytics
Task: a distributor with 500+ active clients. Required report: top clients by revenue for the quarter with dynamics vs. the previous quarter, ABC analysis segmentation, pipeline forecast for the next quarter based on current open deals.
Problem: revenue data is partially in Bitrix24 (deals) and partially in 1C (payments). Discrepancy: the deal shows the quote amount, while 1C shows the actually shipped amount.
Solution:
- Synchronization of deals from Bitrix24 to PostgreSQL via REST API (every 30 min)
- Synchronization of invoices from 1C via COM object (once per hour)
- Linking via the
UF_CRM_1C_CONTRACT_IDfield — a custom field in the deal with a reference to the 1C contract - PostgreSQL materialized views for pre-aggregation by period
- Looker Studio connected to PostgreSQL via connector
Result: reports update every 30 minutes, management sees an up-to-date picture without manual exports from two systems.
Technical note: UF_CRM_* fields are not returned in crm.deal.list automatically — they must be explicitly listed in select. The list of all UF fields is obtained via crm.deal.fields.
Development Timeframes
| Task | Time |
|---|---|
| BI connector setup + dashboards in Looker Studio | 3–5 days |
| REST API sync + external database | 5–7 days |
| SQL analytics development (cohorts, LTV, ABC) | 3–5 days |
| Custom PHP component inside Bitrix24 | 5–10 days |
Full custom analytics project — 1–2 weeks depending on data sources and metric complexity.







