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

# Segments

> Organize and tag your audience into targeted groups

<Note>
  Blueberry can automatically tag contacts with segments based on deep profile analysis. This means
  your segments stay up-to-date without manual work.
</Note>

## Overview

Segments organize your contacts into groups based on shared characteristics, behaviors, or interests. Use segments to personalize AI responses, target specific audiences, and better understand your community.

<Info>
  View and manage all segments in **Contacts** → **Segments**. You'll see each segment's name,
  description, and how many customers belong to it.
</Info>

## Viewing Segments

<Steps>
  <Step title="Navigate to Segments">
    Go to **Contacts** → **Segments** to view all your segments.
  </Step>

  <Step title="View Segment Details">
    Each segment shows: - Name and description - Number of contacts in the segment - Whether
    auto-tagging is enabled - Whether the segment is visible or hidden
  </Step>

  <Step title="Filter and Search">
    Use filters to view custom segments, built-in segments, or search by name.
  </Step>
</Steps>

## Auto-Tagging vs Manual Tagging

When creating or editing a segment, you can choose how contacts are added:

<Tabs>
  <Tab title="Auto-Tagging (Recommended)" icon="wand-magic">
    **How it works:**

    When auto-tagging is enabled, Blueberry automatically tags contacts to the segment based on deep profile research and the segment description you provide.

    <Steps>
      <Step title="AI Analysis">
        Blueberry analyzes each contact's profile, interactions, bio, and post history.
      </Step>

      <Step title="Segment Matching">
        Based on your segment description, Blueberry determines if the contact fits the criteria.
      </Step>

      <Step title="Automatic Tagging">
        Contacts that match are automatically added to the segment.
      </Step>
    </Steps>

    <Tip>
      The better your segment description, the more accurate the auto-tagging. Be specific about what defines this segment.
    </Tip>
  </Tab>

  <Tab title="Manual Tagging" icon="hand">
    **How it works:**

    When auto-tagging is disabled, you manually assign contacts to the segment.

    <Steps>
      <Step title="Select Contacts">
        Go to **Contacts** → **Overview** and select the contacts you want to add.
      </Step>

      <Step title="Add to Segment">
        Use the bulk actions menu to add selected contacts to the segment.
      </Step>

      <Step title="Manual Management">
        Continue adding or removing contacts manually as needed.
      </Step>
    </Steps>

    <Note>
      Manual tagging gives you full control but requires ongoing management.
    </Note>
  </Tab>
</Tabs>

## Creating Segments

<Steps>
  <Step title="Navigate to Segments">
    Go to **Contacts** → **Segments** and click **Create Segment**.
  </Step>

  <Step title="Name Your Segment">
    Choose a descriptive name like "VIP Customers" or "Pet Owners".
  </Step>

  <Step title="Add Description">
    Write a clear description of what defines this segment. This is especially important for
    auto-tagging segments.

    <Tip>
      Good description: "Customers who have cats and engage with pet-related content." Bad
      description: "Pet people."
    </Tip>
  </Step>

  <Step title="Choose Tagging Method">
    Toggle **Customer Auto-Tagging** on or off: - **On**: AI automatically tags contacts based on your
    description - **Off**: You manually add contacts to this segment
  </Step>

  <Step title="Save">
    Click **Create Segment** to save.
  </Step>
</Steps>

## Bulk Import Segments from CSV

Import multiple segments at once using a CSV file. This is ideal for setting up your initial segment structure or migrating segments from another system.

<Info>
  Bulk import supports creating new segments and updating existing ones. Segments are matched by
  name within your brand.
</Info>

### CSV Format

Your CSV file should include the following columns:

| Column        | Required | Description                                                           | Example Values                         |
| ------------- | -------- | --------------------------------------------------------------------- | -------------------------------------- |
| `name`        | Yes      | The segment name (must be unique within your brand)                   | "VIP Customers", "Pet Owners"          |
| `description` | No       | A description of what defines this segment                            | "Customers who have made 5+ purchases" |
| `canAutoTag`  | No       | Whether auto-tagging is enabled (`true`/`false`, `yes`/`no`, `1`/`0`) | `true`, `yes`, `1`                     |

<Tip>
  Column headers are auto-detected, so you can use variations like "Segment Name", "Description",
  "Auto Tag", etc. The system will suggest mappings based on your headers.
</Tip>

### Example CSV

```csv theme={null}
name,description,canAutoTag
San Francisco Resident,Anyone who lives in San Francisco,true
VIP Customers,Customers who are famous or with high follower counts,true
Pet Owners,Someone who owns or posts about their pets,true
Superfans,Fans who repeatedly engage with high levels of enthusiasm,true
```

### Import Process

<Steps>
  <Step title="Open Import Dialog">
    Go to **Contacts** → **Segments** and click **Upload Segments from CSV**.
  </Step>

  <Step title="Upload CSV File">
    Select your CSV file. The system will automatically detect column headers and suggest mappings.
  </Step>

  <Step title="Map Columns">
    Review and adjust the column mappings if needed. You must map at least the `name` column. Set a
    default value for auto-tagging if your CSV doesn't include this column.
  </Step>

  <Step title="Review Preview">
    Before importing, review the preview which shows: - How many new segments will be created - How
    many existing segments will be updated - Any conflicts or errors that will prevent import
  </Step>

  <Step title="Import Segments">
    Click **Import Segments** to complete the import. You'll see a summary of created and updated segments.
  </Step>
</Steps>

### How Segments Are Matched

* **New Segments**: Segments with names that don't exist in your brand will be created.
* **Updated Segments**: Segments with names that already exist will be updated with new description and auto-tagging settings from your CSV.

## How to Use Segments

<CardGroup cols={2}>
  <Card title="Personalize AI Responses" icon="message">
    Blueberry uses segment information to personalize responses to different
    types of customers.
  </Card>

  <Card title="Target Campaigns" icon="bullseye">
    Filter campaigns by segment to send targeted messages to specific groups.
  </Card>

  <Card title="Understand Your Audience" icon="chart-line">
    View segment sizes and composition to better understand your community.
  </Card>

  <Card title="Manual Outreach" icon="user">
    Filter the community page by segment to find and message specific groups.
  </Card>
</CardGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Can I edit segment names or descriptions?" icon="circle-question">
    Yes. Click any segment in **Contacts** → **Segments** to edit its name, description, or toggle auto-tagging.
  </Accordion>

  <Accordion title="Can a contact belong to multiple segments?" icon="circle-question">
    Yes! Contacts can belong to as many segments as apply to them.
  </Accordion>

  <Accordion title="Can I delete built-in segments?" icon="circle-question">
    No, but you can hide them from view in **Contacts** → **Segments** so they don't clutter your
    segment list.
  </Accordion>

  <Accordion title="What makes a good segment description for auto-tagging?" icon="circle-question">
    Be specific about behaviors, interests, or characteristics. Good: "Customers who have dogs and
    engage with pet content." Bad: "Dog people."
  </Accordion>

  <Accordion title="Can I manually remove someone from an auto-tagged segment?" icon="circle-question">
    Yes. Go to the contact's profile and manually remove any segment assignments.
  </Accordion>

  <Accordion title="Can I import segments from a CSV file?" icon="circle-question">
    Yes! Use the **Upload Segments from CSV** button in **Contacts** → **Segments** to bulk import segments. Your CSV should include columns for name (required), description (optional), and canAutoTag (optional). The system will automatically detect column headers and show a preview before importing.
  </Accordion>
</AccordionGroup>

## Related Pages

<CardGroup cols={2}>
  <Card title="Contacts" icon="users" href="/community/overview">
    View all your contacts and their segment assignments.
  </Card>

  <Card title="Campaign Types" icon="paper-plane" href="/dms/campaigns/types">
    Use segments to target specific audiences with DM campaigns.
  </Card>

  <Card title="Rules Engine" icon="gears" href="/comments/rules-engine">
    Create rules that apply to specific segments.
  </Card>

  <Card title="Knowledge Base" icon="book" href="/brand/knowledge-base">
    Reference segments in your knowledge base to personalize AI responses.
  </Card>
</CardGroup>
