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

# Create Segments

> Learn how to create segments to define reusable groups of users.

export const HowToSchema = ({name, description, steps = []}) => {
  const schema = {
    "@context": "https://schema.org",
    "@type": "HowTo",
    name,
    description
  };
  if (steps.length > 0) {
    schema.step = steps.map((s, i) => ({
      "@type": "HowToStep",
      position: i + 1,
      name: typeof s === "string" ? s : s.name,
      text: typeof s === "string" ? s : s.text || s.name
    }));
  }
  return <script type="application/ld+json" dangerouslySetInnerHTML={{
    __html: JSON.stringify(schema)
  }} />;
};

<HowToSchema
  name="Create Segments"
  description="Learn how to create segments to define reusable groups of users."
  steps={[
{
  name: "Navigate to Segments",
  text: "Select Segments in the left sidebar.",
},
"Click + Create to create a new segment",
{
  name: "Give the segment a name",
  text: "The name can't be changed later, so choose wisely.",
},
{
  name: "Define the inclusion criteria",
  text: "Define the inclusion criteria for the segment by clicking + Add attribute, + Add segment, or + Add group in the Inclusion criteria section. You can add multiple criteria.",
},
"Set the allocation of the segment to the desired percentage",
]}
/>

A [segment](../flags/segments) is a definition of a subpopulation, like a certain cohort
of users.

## Create a Segment

<Steps>
  <Step title="Navigate to Segments">
    Select **Segments** in the left sidebar.
  </Step>

  <Step title="Click + Create to create a new segment" />

  <Step title="Give the segment a name">
    The name can't be changed later, so choose wisely.
  </Step>

  <Step title="Define the inclusion criteria">
    Define the inclusion criteria for the segment by clicking **+ Add attribute**, **+ Add segment**, or **+ Add group** in the **Inclusion criteria** section. You can add multiple criteria.
  </Step>

  <Step title="Set the allocation of the segment to the desired percentage" />
</Steps>

## Related Resources

<CardGroup cols={2}>
  <Card title="Segments Reference" href="/docs/flags/segments">
    Deep dive into segment configuration
  </Card>

  <Card title="Define Audience Criteria" href="/docs/how-to-guides/define-audience-criteria">
    Add targeting criteria to your segments
  </Card>

  <Card title="Create Rules" href="/docs/how-to-guides/create-conditional-targeting-rule">
    Use segments in flag rules
  </Card>

  <Card title="Create Segments API" href="/docs/api/how-to-guides/flags/create-segment">
    API reference for segments
  </Card>
</CardGroup>
