Appearance
Reports & Integrations
Analyze sales performance, export data, and connect CRM to external systems via API and webhooks.
Table of Contents
CRM Dashboard
Route: /admin/crm
The CRM dashboard is the default landing page for admin users with CRM access.
KPI Widgets
| Widget | Description |
|---|---|
| Pipeline Value | Total value of open deals |
| Deals Won (MTD) | Won deals count and value this month |
| New Leads (7d) | Leads created in the last 7 days |
| Conversion Rate | Percentage of leads converted |
| Activities Due | Overdue and due-today task count |
| Top Deals | Highest-value open opportunities |
Charts
- Pipeline Funnel — Deal count by stage
- Lead Sources — Pie chart of lead origin
- Trends — Lead and deal activity over time
Reports
Route: /admin/crm/reports
Requires view crm reports permission.
Available Reports
| Report | Description |
|---|---|
| Deals Won/Lost | Closed deals by period |
| Sales by Rep | Revenue grouped by deal owner |
| Pipeline Summary | Open deals by stage and value |
| Lead Sources | Lead volume by source |
| Conversion Metrics | Lead-to-deal conversion rates |
CSV Export
Click Export CSV on the reports page, or use:
GET /admin/crm/reports/exportQuery parameters: type, from, to, owner_id
Import & Export
Route: /admin/crm/import-export
Export
| Data | Route |
|---|---|
| Contacts | GET /admin/crm/export/contacts |
| Leads | GET /admin/crm/export/leads |
| Deals | GET /admin/crm/export/deals |
Downloads CSV files with all standard fields.
Import
| Data | Route | Format |
|---|---|---|
| Contacts | POST /admin/crm/import/contacts | CSV with headers |
| Leads | POST /admin/crm/import/leads | CSV with headers |
Required CSV columns for contacts: first_name, last_name, email
Required CSV columns for leads: first_name, last_name, email
Optional columns: phone, company, source, description, etc.
REST API
All authenticated CRM endpoints require a Sanctum bearer token.
Base path: /api/crm
| Resource | Endpoints |
|---|---|
| Contacts | GET/POST /contacts, GET/PUT/DELETE /contacts/{id} |
| Accounts | GET/POST /accounts, GET/PUT/DELETE /accounts/{id} |
| Leads | GET/POST /leads, GET/PUT/DELETE /leads/{id}, POST /leads/{id}/convert |
| Deals | GET/POST /deals, GET/PUT/DELETE /deals/{id}, POST /deals/{id}/move-stage |
| Activities | GET/POST /activities, PUT/DELETE /activities/{id} |
| Pipelines | GET /pipelines |
See the full API Documentation for request/response examples.
Getting a Token
bash
curl -X POST https://yourdomain.com/api/tokens \
-H "Content-Type: application/json" \
-d '{"email":"admin@example.com","password":"password","device_name":"My App"}'Use the returned token in subsequent requests:
Authorization: Bearer {token}Public Lead Capture
No authentication required. Rate limited to 10 requests per minute.
Endpoint: POST /api/public/leads
json
{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"phone": "+1234567890",
"company_name": "Acme Inc",
"description": "Interested in your services",
"source": "website-form"
}Response (201):
json
{
"success": true,
"message": "Lead captured successfully.",
"data": {
"id": 42,
"email": "jane@example.com",
"status": "new"
}
}Webhooks
Inbound (Receive Leads)
Endpoint: POST /api/public/webhooks/leads
Rate limit: 30 requests/minute
Auth: Optional X-Webhook-Secret header
Use with Zapier, Make, or custom integrations to push leads into CRM.
Outbound (Send Events)
Configure in .env:
CRM_WEBHOOK_URL=https://hooks.zapier.com/hooks/catch/...
CRM_WEBHOOK_SECRET=your-secret-keyEvents sent automatically:
| Event | Trigger |
|---|---|
lead.created | New lead via public API or webhook |
deal.won | Deal moved to a won stage |
Payload includes record ID, key fields, and event timestamp.
Environment Variables
| Variable | Description |
|---|---|
CRM_WEBHOOK_URL | Outbound webhook destination URL |
CRM_WEBHOOK_SECRET | Secret for inbound webhook validation |
Defined in config/services.php under the crm key.
Related Documentation
Last updated: June 2026