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

# Cohorts

> Create and manage saved patient groups for targeting blasts.

<Info>
  **Where to find Cohorts:** In the left sidebar, click **Comms > Blasts**, then click the **Cohorts** tab.
</Info>

<Info>
  **Prerequisites:** You need [Patients](/modules/patients) in the system before creating cohorts.
</Info>

A cohort is a saved group of patients defined by filters -- location, provider, tags, and other patient attributes. Cohorts are reusable across multiple [blasts](/modules/comms/blasts), so you can define your audience once and send to it whenever you need to.

Filters are organized into categories: demographics (age, gender, location), communication preferences (opted out of SMS/email, marketing opt-in status), engagement (notes, active chats, medication count), scheduling (appointment history, cancellations), billing (total spent, memberships, packages), and more.

## Create a Cohort

<Steps>
  <Step title="Go to the Cohorts Page">
    Navigate to **Comms > Blasts**, then click the **Cohorts** tab.
  </Step>

  <Step title="Click New Cohort">
    Click the **New Cohort** button. Give it a name and optional description.
  </Step>

  <Step title="Add Filters">
    Use the filter builder to define which patients belong to this cohort. You can filter by location, provider, tags, marketing opt-in status, and many other patient attributes.
  </Step>

  <Step title="Save">
    Click **Save**. You can preview the matching patients before saving.
  </Step>
</Steps>

## Build a Cohort from a Contact List

Instead of filters, you can build a cohort from a specific list of people you already have — for example, a list exported from another tool or collected at an event.

<Steps>
  <Step title="Start a new cohort">
    On the Cohorts page, click **New Cohort**. On the prompt screen, click **paste a contact list**.
  </Step>

  <Step title="Add the contacts">
    In the **Create Custom Cohort** window, paste emails or phone numbers (one per line) into the box, or drop a `.csv`/`.txt` file or click **Upload .csv or .txt**. The window shows how many contacts it detected as you go.
  </Step>

  <Step title="Name and save">
    Give the cohort a name, then save. Decoda matches the contacts to existing patients and builds the cohort from the ones it finds.
  </Step>
</Steps>

A custom-list cohort shows a **Custom list · N contacts** chip instead of filter pills. To change who's in it, reopen the cohort and edit the pasted list.

## Seasonal Win-Back Filters

Three filters in the **Appointments** category make it easy to build seasonal win-back audiences -- patients who came in during one window but haven't returned:

* **Completed Appointment Between** -- patients who completed an appointment within a date range you set. Click **For specific services** to limit it to certain services; otherwise it counts any appointment.
* **Appointment Created Between** -- patients whose appointment was *booked* within a date range, regardless of when the visit itself is. Use this to target people who booked during a promotion, or to reach everyone whose appointment was created since your last blast.
* **Has No Appointment Between** -- patients with no appointment in a date range. Pair it with either filter above to find, for example, everyone who came in last spring but hasn't booked this spring.

All three filters require a date range; narrowing to specific services is optional.

## Time Since Last Appointment

The **Time Since Last Appointment** filter (in the **Appointments** category) targets patients by how long it has been since their last visit. Enter a number and choose the unit -- days, weeks, months, or years -- so you can think in whatever cadence fits, for example "at least 4 months."

Click **For specific services** to measure the time against one or more services only. This is useful for recall: to reach Botox patients about 4 months after their last Botox, set the filter to 4 months and limit it to Botox. A patient who came in for a facial last week still counts as due, because only their Botox visits are considered. Leave the services empty to measure against any appointment.

Because the filter is relative to today, it re-checks every time the cohort runs -- so a recurring recall blast automatically picks up whoever has newly crossed the threshold. You can switch the unit at any time; the number rounds to a whole value of whichever unit you pick, so a threshold like 45 days reads as about 2 months.

## Birthday Filters

The **Birthday** filter (in the **General** category) targets patients by the month and day of their birthday, ignoring the year. It offers several ways to pick the window:

* **is between** -- a fixed month/day range you choose (for example, all June birthdays).
* **is in the next** / **is in the past** -- a rolling number of days before or after today.
* **is this week**, **is this month**, **is next month** -- the current or upcoming calendar period.

The last three options recalculate every time the cohort runs, so a cohort set to **is this month** always covers the current month's birthdays. Save it once and reuse it for a recurring monthly birthday blast -- there's no need to edit the dates each month.

## Marketing Opt-In Filters

The **SMS Marketing** and **Email Marketing** opt-in filters each offer three choices:

* **Yes** — patients who have explicitly opted in.
* **No** — patients who have explicitly opted out.
* **Not Set** — patients who have never made a choice either way.

**Not Set** is helpful when you want to reach people who haven't been asked yet without also messaging the ones who have already declined.

## Using AI to Build Filters

Instead of manually selecting filters, you can describe the audience you want in plain language. The AI filter builder translates your description into the appropriate filters. For example, you could type "patients at the downtown location who haven't visited in 6 months" and the system will set the matching filters for you.

## Editing a Cohort

Click any cohort in the list to open it. You can update the name, description, or filters, then click **Save**. Any future blasts that target this cohort will use the updated filters.

## Deleting a Cohort

Open a cohort and click **Delete**. This does not affect any blasts that have already been sent to this cohort -- it only removes the saved filter group.
