CRM · Save current filters as a segment

Turns the ad-hoc filter set from the customer list into a reusable, named segment by handing the serialised filters to the segment builder.

AreaCRM
Routescrm.users.index · crm.segments.new
Centre modulescrm
Staff levelsroot · admin · manager · crmmanager
Modelssegment
UI labelcrm.new-segment
Coverage2 use cases · 1 happy · 2 failure

How it works

saveSegment(filters) transitions to crm.segments.new with filtersJSON and filterType as query params — so the segment builder opens pre-populated. filterType carries the and/or combinator from enums/segment-filters-types.

Use cases

Why someone opens this (2)

  • Promoting an exploratory audience into a segment used by email campaigns, push notifications and proposals.
  • Standardising a recurring audience definition so colleagues reuse it instead of re-filtering.

Path map

flowchart LR
    F(["Save current filters as a segment"]):::feat
    F --> H1["Filters promoted to a segment"]:::ok
    F -.-> X1["Void filter values"]:::bad
    F -.-> X2["Segment name missing"]:::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

Filters promoted to a segment

  1. User applies filters on the customer list and clicks save as segment.
  2. Filters are JSON-serialised into the query params and the segment builder opens.
  3. User names the segment and submits; the segment is created with the same filter definition.

Failure paths

QA checklist

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

  • ✅ Filters promoted to a segment
  • ⛔ Void filter values
  • ⛔ Segment name missing

Implementation


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