CRM · Customer CSV export with column picker

Exports the currently filtered customer set as CSV, letting the operator choose from ~30 columns. The file is produced server-side and delivered by email.

AreaCRM
Routescrm.users.index
Centre modulescrm
Staff levelsroot · admin · manager
Modelsuser
UI labelinformative-message.export-crm-csv.success.message
Coverage3 use cases · 1 happy · 3 failure

Known issues (1)

How it works

The default column set is computed in userExportColumns and grows with the centre’s modules: account_type when hasEmployeesSegments, calculated_income + calculated_postal_code when hasForegroundLocation. toggleUserExportColumns flips individual columns. load.export() POSTs to /api/v4/exports with the model name, the active filters (minus type, which is sent separately as filter-type), the chosen csv-fields and the centre id (used as the email ‘from’), and tracks a DATA_EXPORTED analytics event.

Use cases

Why someone opens this (3)

  • Handing a filtered audience to an external mailing tool.
  • Pulling a data-quality extract to see how many records lack a phone or postal code.
  • Exporting employee-segment populations where account type matters.

Path map

flowchart LR
    F(["Customer CSV export with column picker"]):::feat
    F --> H1["Filtered export emailed"]:::ok
    F -.-> X1["Export request fails"]:::bad
    F -.-> X2["Email never arrives"]:::bad
    F -.-> X3["No columns selected"]:::bad
    classDef feat fill:#157068,stroke:#157068,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Filtered export emailed

  1. Operator filters the list, then opens the export modal (openUserExportModal).
  2. Columns are pre-ticked from the module-aware default set; operator adjusts them.
  3. exportUserCsv closes the modal, sets the loading flag and calls load.export('user', filters, columns).
  4. On resolve the success banner informative-message.export-crm-csv.success.message appears and the file arrives by email.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Filtered export emailed
  • ⛔ Export request fails
  • ⛔ Email never arrives
  • ⛔ No columns selected

Implementation


Generated from doc/feature-inventory.json · id crm-customer-export · commit 276788ca6