SmartCRM
Section: CRM
URL:/admin/smartcrm
Page title: SmartCRM
Overview
The SmartCRM module is a bi-directional integration layer that synchronises CRMConnect data with an external Smart CRM platform via a REST API. It pushes core entities — clients, leads, projects, tickets, and invoices — to the remote system on demand or automatically through a configurable cron schedule, and it surfaces a real-time error dashboard so staff can monitor sync health without leaving the application.
The module uses a dedicated sync service (SmartcrmSyncService), a structured logger (SmartcrmLogger), and a direct API client (ApiSmartcrm). All sync activity is written to a tbl_smartcrm_logs table, giving administrators a rolling audit trail and statistics covering the last seven days.
Business value
Companies that run Smart CRM alongside CRMConnect need data to stay consistent between both systems. Without this module, records would have to be duplicated manually, leading to inconsistencies and wasted time. SmartCRM automates the data flow and provides immediate visibility into any synchronisation failures.
- Who uses it: CRM administrators who configure the integration; team leads who monitor sync statistics; support staff who investigate data discrepancies between the two systems.
- Key benefit: Automated, scheduled synchronisation of all key CRM entities with built-in error monitoring and configurable retry logic.
Typical use cases:
- Configure the Smart CRM API endpoint and authentication token, then run a connectivity test before enabling automatic sync.
- Schedule automatic synchronisation every 1, 2, 4, 12, or 24 hours via the built-in cron option.
- Manually trigger a one-off sync for a specific entity type (leads, clients, projects, tickets, or invoices) after a bulk data import.
- Review the error dashboard to identify which records failed to sync and why, then retry after fixing the underlying issue.
- Tune performance parameters such as batch size, API timeout, and maximum retry attempts to match the remote API's capacity.
Accessing this module
/admin/smartcrm
Key concepts
| Concept | Description |
|---|---|
| API URL | The base endpoint of the remote Smart CRM REST API. |
| Auth token | Bearer token used to authenticate every outbound API call. |
| Cron sync | Optional automatic sync triggered by CRMConnect's cron job at the configured interval. |
| Sync interval | How often automatic sync runs: 1, 2, 4, 12, or 24 hours. |
| Batch size | Number of records sent per API request (default 50). Controls throughput vs. load. |
| API timeout | Maximum seconds to wait for a response from the remote API (default 30 s). |
| Max retries | How many times a failed API call is retried before the record is logged as an error. |
| Log level | Minimum severity written to the sync log: DEBUG, INFO, WARNING, or ERROR. |
| Sync stats | Aggregated counts of successful and failed syncs over the last 7 days, shown on the dashboard. |
| Recent errors | The 10 most recent ERROR-level log entries, shown on the dashboard for quick triage. |
| Connection test | Automatic API ping performed whenever settings are saved to validate credentials immediately. |
Common actions
- Configure the integration — Navigate to
/admin/smartcrm, enter the API URL and authentication token, adjust batch size, timeout, retry count, and log level, then save. A connection test runs automatically and reports success or a warning. - Enable automatic sync — Set "Cron sync" to Yes and choose a sync interval. The next scheduled cron execution will begin pushing data to Smart CRM.
- Manually sync leads — Click the "Sync Leads" action; the module calls
sync_leads_with_smartcrmand returns a JSON result with counts and any errors. - Manually sync clients — Click the "Sync Clients" action to push all client records to the remote system.
- Manually sync projects — Click the "Sync Projects" action to synchronise active projects.
- Manually sync tickets — Click the "Sync Tickets" action to push support ticket data.
- Manually sync invoices — Click the "Sync Invoices" action to push financial records.
- Monitor the dashboard — The main SmartCRM page displays 7-day sync statistics and the 10 most recent errors so administrators can assess integration health at a glance.
- Review detailed logs — Navigate to the Logs view to filter by log level (DEBUG / INFO / WARNING / ERROR) and inspect full request/response details for any sync operation.
- View errors overview — The Errors Overview page aggregates recurring failure patterns to help prioritise fixes.
Source: crm-connect-main/app/modules/smartcrm