# LSQ (LeadSquared) CRM Integration Files

> Generated: 2026-03-13

This document lists all source files in the `pcaa-dev` project that are involved in CRM integration with **LeadSquared (LSQ)**.

---

## 🐍 Backend – Core Integration Logic (`dashboard-backend/`)

| File | Purpose |
|------|---------|
| `leadsquared_service.py` | Core LeadSquared API service — handles authentication and API calls to LSQ |
| `sync_crm_leads.py` | Syncs leads from LSQ CRM into the local system |
| `import_lsq_csv.py` | Imports lead data from LSQ CSV exports |
| `fastapi_app.py` | FastAPI app — contains LSQ-related API routes/endpoints |
| `call_processor.py` | Call processor with LSQ integration — pushes call data to CRM |
| `pipeline_6004.py` | Pipeline script referencing LeadSquared |
| `db_handler.py` | Database handler with LeadSquared-related data handling |
| `app.py` | Main app referencing LeadSquared |

---

## 📁 Standalone CRM Module (`74/crm integrations/leadsquared/`)

| File | Purpose |
|------|---------|
| `leadsquared_service.py` | Standalone LeadSquared service (earlier/reference version) |
| `README.md` | Documentation for the LeadSquared integration module |

---

## 🖥️ Frontend (`dashboard-frontend/src/`)

| File | Purpose |
|------|---------|
| `src/pages/settings/CRMIntegration.jsx` | Settings page UI for configuring CRM (LSQ) integration |
| `src/services/api.js` | Frontend API service with LSQ-related calls |

---

## 📋 Log Files

| File | Purpose |
|------|---------|
| `dashboard-backend/sync_crm_leads.log` | Runtime log from the CRM lead sync job |

---

## Summary

| Category | Count |
|----------|-------|
| Backend source files | 8 |
| Standalone CRM module files | 2 |
| Frontend source files | 2 |
| **Total source files** | **12** |
