Cross-cutting · Data export engine (email delivery)

The shared export path: a POST to /api/v4/exports naming the model, the active filters, the filter combinator and the chosen columns, with the resulting file emailed to the requester rather than downloaded in the browser.

AreaCross-cutting
Routescrm.users.index · crm.segments.index · crm.commerces.index · configuration.influence-zones.index · cms.categories.index · configuration.extra-attributes.index · configuration.centers.index · intranet.communications.show
Centre modulesalways available
Staff levelsroot · admin · manager · commerce
Models—
UI labelinformative-message.export-crm-csv.success.message
Coverage4 use cases · 1 happy · 4 failure

Known issues (1)

How it works

Deliberately asynchronous — large exports do not block the UI and are not limited by the browser. The type key is pulled out of the filters and sent separately as filter-type (defaulting to and), and center-id is included so the API knows which centre the email is ‘from’. Every export tracks a DATA_EXPORTED analytics event with the entity, the filter count and the column count but not the filter values. Some screens bypass this and build a file in the browser instead (csv/xlsx services, e.g. intranet sales and the dashboard export), so there are two export idioms in the codebase with different failure characteristics.

Use cases

Why someone opens this (4)

  • Exporting a large filtered customer set without timing out the browser.
  • Handing a segment to an external mailing or analytics tool.
  • Producing a reference-data extract for documentation or migration.
  • Getting a recipient list with read/confirm status out of a communication.

Path map

flowchart LR
    F(["Data export engine email delivery"]):::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
    F -.-> X4["Browser-side export fails"]:::bad
    classDef feat fill:#8c5a3c,stroke:#8c5a3c,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. User applies filters and selects the columns to include.
  2. load.export(model, filters, columns) posts the job and tracks the analytics event.
  3. The promise resolves and the success banner is shown.
  4. The file arrives by email, sent on behalf of the active centre.

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
  • ⛔ Browser-side export fails

Implementation


Generated from doc/feature-inventory.json · id xc-export-engine · commit 276788ca6