Система собирает заполненные формы из bitrix24, фильтруя их от лишних данных (звонков и не валидных лидов) и сверяет с продажами в 1С по определённому алгоритму.
Python tool for end-to-end lead tracking from CRM requests to real sales revenue.
This project performs end-to-end customer journey analysis by connecting CRM leads with actual sales data.
The script extracts leads from Bitrix24 CRM, matches them with SQL sales history and calculates conversion, revenue and customer acquisition efficiency.
Important: This project requires configured Bitrix24 API access and SQL database connection. It cannot run without replacing these integrations with your own data sources.
The main objective is to measure real business results generated by incoming leads.
The analysis helps answer:
- How many leads were generated?
- Which leads converted into customers?
- How much revenue was generated?
- Which sources create valuable customers?
- Which departments convert leads better?
- Bitrix24 API integration
- SQL database connection
- CRM lead extraction
- Sales history processing
- Phone number normalization
- Lead-to-customer matching
- Conversion tracking
- Revenue attribution
- Source performance analysis
- Location-based analytics
- Excel report generation
- Telegram execution notifications
- Python
- pandas
- NumPy
- SQLAlchemy
- PyMySQL
- fast-bitrix24
- requests
- pyTelegramBotAPI
- openpyxl
- python-dotenv
-
Loads leads from Bitrix24 CRM
-
Extracts:
- lead source
- customer contacts
- creation date
- business unit
-
Loads sales history:
- retail sales
- service sales
-
Matches leads with purchases by phone number
-
Calculates:
- converted leads
- number of orders
- revenue
- sales direction
-
Generates Excel analytics reports
CRM:
- Leads
- Customer contacts
- Lead sources
SQL:
- Sales transactions
- Revenue
- Profit
Excel report:
- Full lead history
- Lead conversion statistics
- Revenue attribution
- Monthly analytics
- Business unit performance
This project can be used for:
- CRM analytics
- marketing attribution
- sales funnel analysis
- lead quality analysis
- business intelligence reporting