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.
| Area | CRM |
| Routes | crm.segments · crm.segments.index |
| Centre modules | crm |
| Staff levels | root · admin · manager · crmmanager · crmoperator · weboperator · content_creator |
| Models | segment |
| UI label | title.header.crm.segments / menu.navbar.segment.show |
| Coverage | 3 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
- User clicks refresh on a segment row.
- The recalculation request is sent and the row shows the calculating state.
- On completion the member count updates in place.
Export segment members
- User clicks export on a row.
load.exportis called with the segment’s filters and columns and the CSV is emailed.
Failure paths
Refresh fails
Cause — API error during recalculation.
What happens — A bare
.catch(() => {})swallows it — the row leaves the calculating state with the old count and no error message.
Segment is locked
Cause — The segment is one of the non-editable system segments.
What happens —
crm.segment.current-segment-is-not-editableis shown and edit is blocked.
Deleting a tag-linked segment
Cause — The segment is associated with a user tag.
What happens —
crm.segment.tag-associatedwarns the operator, since deletion would affect the tag’s automatic assignment.
Export error
Cause — Export request rejects.
What happens — Caught in a
try/catchwith no user-facing message.
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
Translation keys (7)
Key English title.header.crm.segmentsSegments segment.refresh-segmentRefresh segment segment.export-segmentExport segment users segment.users-in-segmentTotal users segment.calculating-user-infoThis value is currently calculating. The data will be available soon. crm.segment.current-segment-is-not-editableSegment is not editable as it has been generated automatically crm.segment.tag-associatedNot editable
Related
- Same area — Customer list & filtering · Customer create & edit · Customer deletion with unsubscribe notice · Customer CSV export with column picker · Customer CSV import · Children CSV import · AI natural-language customer filter · Save current filters as a segment · Segment builder with automatic tag actions · Segment categories · User tags (user types) · Customer receipts tab & ticket-stamp generation · Customer loyalty — raffle tickets · Customer loyalty — cards & stamps · Customer loyalty — rewards · Customer loyalty — coupon exchanges · Customer children (dependants) · Receipt verification queue · Store list, filters & exports · Store create & edit · Store CSV import · Store labels (store types) · Customer action log (dormant)
- Shares data with — Activity editor (loyalty mechanics, rules & targeting) · Email campaign list, duplication & stop · Email campaign builder (wizard, A-B test, scheduling) · Proposal editor (content, coupon, push, AI images) · Push notification editor (scheduling, geofencing, deep links) · Filter & segment builder component
Generated from doc/feature-inventory.json · id crm-segment-list · commit 276788ca6