FreshSales CRM Sync — business view

Technical trace: FreshSales CRM Sync

1. Business Summary

Imports the marketing CRM (owners, accounts, deals, contacts, leads, campaigns, activities) into local mirror tables — full replace.

2. Business Value

Provides a unified data point for sales/marketing reporting alongside the operational CRM.

3. Users / Stakeholders

Sales operations, executives.

4. Workflows

  • Truncate target tables.
  • Pull owners, accounts, territories, campaigns.
  • Per owner: opportunities, activities.
  • Pull contacts and leads.
  • Custom fields flattened; datetimes normalised.

5. Sub-Features

  • Pagination per entity.
  • Custom-field mapping.

6. Business Rules

  • Full replace (destructive).
  • API token in code.

7. Data Entities

FreshSales mirror tables (owners, accounts, deals, contacts, leads, campaigns, activities, plus several reference tables).

8. Entry Points

  • FreshSales sync action / cron.

9. Inputs & Outputs

  • Inputs: FreshSales API.
  • Outputs: local mirror tables.

10. Integrations

  • FreshSales REST API.

11. Calculations / Logic

  • None financial.

12. Status Lifecycle

  • N/A.

13. Permissions

  • Internal cron.

14. Reports & KPIs

  • Sync run status.

15. Risks & Observations

  • Hard-coded API token.
  • Destructive sync without backup/diff.
  • No incremental sync.

16. Source Code Evidence

  • app/Controller/FreshSalesController.php.

← Deep dives index