> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Segments

> Create and manage contact segments for targeted outreach — search segments, track member counts, and view segment details.

The Segments page at `/ce/segments` is the management interface for contact segments, which group contacts by shared criteria for use in campaigns and sequences.

## Overview

Navigating to `/ce/segments` loads `SegmentsPage`, gated by `ce.segments.view`. The page shows a search field and a grid of segment cards, each displaying name, active/inactive badge, member count, and last calculated date. The **New Segment** button opens `SegmentFormDialog`. The page is gated by `ce.segments.view`.

## Who it's for

Permission required: `ce.segments.view`. Creating segments requires `ce.segments.create` (enforced within `SegmentFormDialog`).

## Before you start

* An organization context must be resolved for data to load.
* Contact records must exist before segments can have members.

## Steps

<Steps>
  <Step title="Open Segments">
    Navigate to `/ce/segments` from the CE sidebar.
  </Step>

  <Step title="Search segments">
    Type in the search field to filter segment cards by name.
  </Step>

  <Step title="Create a segment">
    Click **New Segment** to open `SegmentFormDialog`. Define the segment criteria, name, and description, then save.
  </Step>

  <Step title="Review a segment card">
    Each card shows the segment name, active/inactive status, member count, and the date the membership was last recalculated.
  </Step>
</Steps>

## Key concepts

* **Member count** — The number of contacts currently matching the segment's criteria, shown as `member_count` on each card.
* **Last calculated** — The timestamp of the most recent segment membership recalculation (`last_calculated_at`).
* **Active / Inactive** — Only active segments are shown as available for campaign or sequence enrollment.

## Viewing a segment

The route `/ce/segments/:id` for Segment Details does not exist in the current codebase. No component is mounted at `/ce/segments/:id`. Segment creation and editing is currently handled via the `SegmentFormDialog` on the Segments list page (`/ce/segments`). Each segment card on that page shows the segment name, active status, member count, and last calculated date. To edit a segment, click the edit action on a segment card to open the `SegmentFormDialog` inline. The Segments list requires `ce.segments.view`.

## Related

<Columns cols={2}>
  <Card title="Community Engagement" icon="bullhorn" href="/ce/overview">
    Community Engagement core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index" />
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/ce.tsx
  * src/cores/ce/pages/SegmentsPage.tsx
  * src/cores/ce/hooks/useSegments.ts
  * src/cores/ce/components/segments/SegmentFormDialog.tsx
</Accordion>
