Custom Reports for 1C-Bitrix E-commerce

Custom Reports for 1C-Bitrix E-commerce Standard reports in the `sale` module provide a fixed set of metrics: revenue, order count, conversion. When you need customer segmentation by managers including returns, or margin breakdown by categories, you end up manually exporting data to Excel. On nea

Our competencies:

Frequently Asked Questions

Custom Reports for 1C-Bitrix E-commerce

Standard reports in the sale module provide a fixed set of metrics: revenue, order count, conversion. When you need customer segmentation by managers including returns, or margin breakdown by categories, you end up manually exporting data to Excel. On nearly every project, the client first spends weeks on manual analytics and then asks for automation.

We develop bespoke reports using D7 ORM that give you full control over the data: arbitrary grouping, cross-tables, automatic export. After implementing such a report, one client reduced their monthly reporting time from two days to one hour—saving approximately €2,500 per month in labor costs—and stopped making errors in the numbers.

What problems do custom reports solve?

Standard reports from the sale module do not support cross-tables. For stores with turnover of several thousand orders per month, they are insufficient. Custom reports on D7 ORM provide flexibility not available in the off-the-shelf functionality.

Standard reports: what exists and what is missing

The sale module offers several built-in reports via the bitrix:sale.report.construct component. Their limitations:

  • Fixed set of groupings—cannot add custom fields
  • No cross-tables (pivot)—cannot build a "product × region" matrix
  • No cohort analysis or RFM analysis
  • Export only to CSV with limited formatting
  • No composite metrics (LTV, average order value including returns)

ORM queries via OrderTable and related entities

The foundation of custom analytics is Bitrix D7 ORM. Key tables:

ORM Class Purpose Key Fields
\Bitrix\Sale\Internals\OrderTable Orders ID, DATE_INSERT, USER_ID, PRICE, STATUS_ID, RESPONSIBLE_ID
\Bitrix\Sale\Internals\BasketTable Basket items ORDER_ID, PRODUCT_ID, QUANTITY, PRICE, DISCOUNT_PRICE
\Bitrix\Sale\Internals\ShipmentTable Shipments ORDER_ID, DELIVERY_ID, STATUS_ID, DATE_DEDUCTED
\Bitrix\Sale\Internals\PaymentTable Payments ORDER_ID, PAY_SYSTEM_ID, SUM, PAID, DATE_PAID
\Bitrix\Sale\Internals\OrderPropsValueTable Order properties ORDER_ID, ORDER_PROPS_ID, VALUE

ORM allows building queries with JOINs, grouping, and aggregate functions without raw SQL. A custom report on D7 ORM processes a summary of 100,000 orders 3 times faster than an equivalent report using agents.

Example ORM query with grouping
$result = OrderTable::getList([ 'select' => [ 'MONTH' => new ExpressionField('MONTH', "DATE_TRUNC('month', %s)", ['DATE_INSERT']), 'RESPONSIBLE_ID', 'TOTAL' => new ExpressionField('TOTAL', 'SUM(%s)', ['PRICE']), 'CNT' => new ExpressionField('CNT', 'COUNT(%s)', ['ID']), ], 'filter' => [ '>=DATE_INSERT' => DateTime::createFromPhp(new \DateTime('last year')), '!STATUS_ID' => 'F', ], 'group' => ['MONTH', 'RESPONSIBLE_ID'], 'order' => ['MONTH' => 'ASC'], ]); 

Why ORM is more efficient than standard reports?

ORM queries provide arbitrary grouping: by periods, products, managers, regions. For complex queries with subqueries, we use $DB->Query() directly.

Visualization and export

Typical visualization set: line chart for trends, bar chart for comparison, doughnut for shares, heatmap for activity. Export to Excel via PhpSpreadsheet:

cd /home/bitrix/www/local composer require phpoffice/phpspreadsheet 

PhpSpreadsheet generates files with formatting, formulas, and multiple sheets—accounting departments use them without modifications.

Deep-dive: RFM analysis report

RFM analysis segments customers by three parameters: Recency, Frequency, Monetary. Each parameter is scored from 1 to 5 (quintiles). 125 segments are grouped into categories: "loyal", "sleeping", "lost", "new prospects".

Algorithm:

  1. Select customers with completed orders in the last 12 months.
  2. For each, calculate last order date, order count, total amount.
  3. Distribute into quintiles via NTILE(5) OVER (ORDER BY ...).
  4. Assign segment based on R-F-M combination.

SQL query for metrics:

SELECT o.USER_ID, MAX(o.DATE_INSERT) AS last_order_date, EXTRACT(DAY FROM NOW() - MAX(o.DATE_INSERT)) AS recency_days, COUNT(o.ID) AS frequency, SUM(o.PRICE) AS monetary FROM b_sale_order o WHERE o.STATUS_ID NOT IN ('F', 'CA') AND o.DATE_INSERT >= NOW() - INTERVAL '12 months' AND o.PAYED = 'Y' GROUP BY o.USER_ID 

Segment mapping:

Segment R F M Action
Champions 5 5 5 Loyalty program
Loyal 3-5 3-5 3-5 Upsell, referrals
Promising newbies 5 1 1-3 Onboarding
Sleeping 2-3 2-3 2-3 Reactivation
At risk 1-2 3-5 3-5 Urgent reactivation
Lost 1 1-2 1-2 Win-back

The RFM report is displayed as a table with filtering and treemap visualization. Data is cached—recalculation for 50,000 customers takes 10-15 seconds.

What is included in the work

After agreeing on the layout and metrics, we:

  1. Design queries and optimize indexes.
  2. Implement a dashboard with filters and visualization.
  3. Configure export to Excel/CSV.
  4. Prepare documentation on data structure and algorithms.
  5. Conduct employee training on using the reports.
  6. Provide 30 days of free support after launch.

Additionally, you receive full admin panel access, a development repository (if desired), and a performance guarantee: reports load in under 3 seconds for up to 100,000 orders.

Development stages

Stage Content Duration
Analytics Define metrics, slices, dashboard layout 2-3 days
Query design ORM queries, index optimization 3-5 days
Visualization Dashboard layout, Chart.js graphs, filters 3-4 days
Export PhpSpreadsheet, formatting 1-2 days
Testing Verification on large volumes, load testing 2-3 days

Timelines and cost

Timelines start from 5 business days for a simple report (starting at €1,200), from 15 days for a comprehensive dashboard with RFM and cohorts (starting at €3,500). Cost is calculated individually after analyzing your database and requirements. The time saved on report preparation pays back the development investment within a couple of months. For example, one client saves €2,500/month after a €3,500 investment. We have 7+ years of experience in 1C-Bitrix development and have completed over 50 custom report projects. Contact us — we will design a report tailored to your task.

Guarantees and trust

  • 30 days free support after launch
  • Performance guarantee: dashboards load in <3 seconds for up to 100k orders
  • Certified Bitrix developers with proven expertise
  • We provide a detailed project plan and timeline upfront