CRM · Segment list, refresh & export

Lists segments with their category, account types, consent flags, automatic tags and member count, and offers per-row recalculation and CSV export of the members.

AreaCRM
Routescrm.segments · crm.segments.index
Centre modulescrm
Staff levelsroot · admin · manager · crmmanager · crmoperator · weboperator · content_creator
Modelssegment
UI labeltitle.header.crm.segments / menu.navbar.segment.show
Coverage3 use cases · 2 happy · 4 failure

Known issues (1)

How it works

refreshSegment forces a server-side recount — the UI shows segment.calculating-user-info while it runs. exportSegment reuses the shared load.export pipeline with the segment’s own column set. hasEmployeeSegments toggles the account-types column. Some segments are flagged non-editable (crm.segment.current-segment-is-not-editable) and segments bound to a user tag warn with crm.segment.tag-associated before deletion.

Use cases

Why someone opens this (3)

  • Checking how many customers a segment currently reaches before launching a campaign.
  • Recomputing a segment after a large import so campaign audiences are accurate.
  • Exporting a segment’s members for an external channel.

Path map

flowchart LR
    F(["Segment list, refresh and export"]):::feat
    F --> H1["Recalculate a segment"]:::ok
    F --> H2["Export segment members"]:::ok
    F -.-> X1["Refresh fails"]:::bad
    F -.-> X2["Segment is locked"]:::bad
    F -.-> X3["Deleting a tag-linked segment"]:::bad
    F -.-> X4["Export error"]:::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

Recalculate a segment

  1. User clicks refresh on a segment row.
  2. The recalculation request is sent and the row shows the calculating state.
  3. On completion the member count updates in place.

Export segment members

  1. User clicks export on a row.
  2. load.export is called with the segment’s filters and columns and the CSV is emailed.

Failure paths

QA checklist

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

  • ✅ Recalculate a segment
  • ✅ Export segment members
  • ⛔ Refresh fails
  • ⛔ Segment is locked
  • ⛔ Deleting a tag-linked segment
  • ⛔ Export error

Implementation


Generated from doc/feature-inventory.json · id crm-segment-list · commit 276788ca6