Seller Analytics Setup on 1C-Bitrix Marketplace
A seller needs to understand what sells, at what prices, what the return rate is, and how much they earn after platform commission. In 1C-Bitrix, standard trade reports at /bitrix/admin/sale_reports.php show data for all orders without seller differentiation. We need a separate analytics system in the personal account.
Data Sources
Seller analytics is built on data from multiple tables:
-
b_sale_basket/ sub-ordersmp_sub_orders— sales, returns -
mp_finance_log— commissions, payouts, balance -
b_iblock_elementwith filterUF_VENDOR_ID— product views (if counter is enabled) -
mp_vendor_reviews— rating and review dynamics
Key Metrics and Implementation
Revenue for period — SUM(PRICE * QUANTITY) by seller's sub-orders for selected period. Grouped by days/weeks/months for dynamics graph.
Top products — GROUP BY PRODUCT_ID, ORDER BY SUM(QUANTITY) DESC by sub-order positions. Show top-10 with revenue sum and quantity.
Return percentage — COUNT(*) WHERE STATUS = 'refunded' / COUNT(*) * 100 by sub-orders for period.
Net profit — revenue - commissions - refunds for period. Taken from mp_finance_log by summing operations by type.
Status conversion — how many sub-orders completed successfully vs cancelled/returned.
Analytics Query Performance
Aggregating queries on large tables are slow. For analytics with date ranges, composite index is needed:
CREATE INDEX idx_sub_orders_vendor_date
ON mp_sub_orders (VENDOR_ID, CREATED_AT, STATUS);
Heavy aggregations (year totals, top across all products) are moved to cache with hourly updates via Bitrix agent (CAgent::AddAgent()). Operational data (current day) — calculated on each request.
Analytics Interface
Minimal dashboard: 4–6 key numbers (7-day revenue, order count, average check, rating), line graph of revenue dynamics, top products table. Charts — Chart.js or ApexCharts, data via AJAX.
Period filter (yesterday / 7 days / 30 days / quarter / custom range) — mandatory element.
Excel export — via PhpSpreadsheet or via built-in Bitrix CSV export.
Timeline
Basic analytics (revenue, top products, order metrics) with charts — 1–2 weeks. Advanced analytics (funnels, cohort analysis, forecasts) — 3–5 weeks.







