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

# Audience builder

> Create an audience from Wrango data using traits, rules, and exclusions

Use **Build with Wrango data** when you want to create an **Audience** from Wrango data inside the product. Choose this path when you need rule-based targeting instead of uploading a fixed CSV list. If you already have a list of NPIs, use [Import an audience](/audiences/import) instead.

## Builder flow

<Steps>
  <Step title="Start from Create Audience">
    In the **Audiences** dashboard, click **Create Audience**, then choose **Build with Wrango data** and **Start building**.
  </Step>

  <Step title="Add audience details">
    In **Audience details**, save the audience name, description, and **Workspace tags**.
  </Step>

  <Step title="Build audience">
    In **Build audience**, define who to include. The current trait groups are **Specialties**, **Prescription Brands**, **Conditions**, and **Procedures**.
  </Step>

  <Step title="Optimize audience">
    In **Optimize audience**, refine the result by excluding other audiences and excluding active prescribers.
  </Step>

  <Step title="Preview audience">
    In **Preview audience**, review the generated audience before final submission.
  </Step>

  <Step title="Review and process">
    In **Review**, confirm the read-only summary, then click **Finish & process**.
  </Step>
</Steps>

## Build audience

In **Build audience**, the step opens with **Audience Traits** search and four expandable groups. Use **All** to browse the full hierarchy, or switch to **Selected** after you have added traits. Each group shows a selected count, and **Clear all** removes all current trait selections.

### Trait nesting

* **Specialties** is organized as primary specialty, then secondary specialty.
* **Prescription Brands** is organized as category, then brand, then generic, then code.
* **Conditions** is organized as category, then condition, then code.
* **Procedures** is organized as category, then group, then procedure, then code.

### How selection works

* Use the chevron beside a row to expand the next level of the hierarchy.
* Select a higher-level item when you want to include everything nested below it.
* Use search in **Audience Traits** to find matching traits across the current group.
* When a search is active, Wrango opens the matching branches and lets you select the visible results from that group.
* After you have selections, **Selected** shows only the groups that currently contain included traits.

### Lowest-level details and saved filters

The lowest level in each menu includes an info icon. Select that icon to open a side panel with metadata details for that item. The panel shows the item title and any available fields tied to that lowest-level value.

After you make selections, Wrango saves them into summary cards. For **Prescription Brands**, **Conditions**, and **Procedures**, those cards also expose trait-level filters. **Specialties** does not use these filters.

* **Decile** uses a slider from `1` to `10`. New selections default to deciles `3` through `10`.
* **Lookback window** is available in `30`, `60`, `90`, `180`, `365`, and `730` day options. New selections default to `365` days.
* **AND** and **OR** operators appear in the saved summary so you can control how included trait groups combine.

## Optimize audience

In **Optimize audience**, you refine the saved include rules before preview.

### Exclude audiences

The first section lets you exclude existing audiences from the same workspace.

* Click **Add existing audience(s)** to open the audience picker.
* The picker supports search and shows each audience with its status and created date.
* Selected audiences appear below the picker and can be removed before you continue.

### Active prescribers

The second section is **Active prescribers**. This section is controlled by a toggle. When it is turned on, Wrango shows two additional controls:

* **Exclude prescriptions**, which opens a picker to add prescription brands you want to exclude.
* **Lookback period**, which lets you choose **None**, **Have prescribed in the last 180 days**, **Have prescribed in the last 365 days**, or **Have prescribed in the last 730 days**.

Selected prescription brands appear as removable cards below the picker.

## Preview and audience size

The first audience size view appears in **Preview audience**. When you enter this step, Wrango generates the preview and may show **Generating your audience preview\...** while the snapshot is being created.

When the preview is ready, the page includes a left-side sections menu with:

* **Total**
* **By specialty**
* **By state**
* **By city**
* **By gender**

The preview content shows:

* **Total audience size** as the total count of healthcare practitioners.
* **By specialty** as a distribution card.
* **By state** as a distribution card.
* **By city** as a distribution card.
* **By gender** as a split distribution card.

If the preview returns zero matching practitioners, Wrango stops the flow there and sends you back to broaden the rules before you can continue.

## Save and completion

The **Review** step shows the final audience summary and a read-only view of the saved filters and exclusions. After you click **Finish & process**, Wrango submits the **Audience** and returns you to the dashboard or back to campaign setup if the builder was launched from a campaign flow.

The new **Audience** then appears on the **Audiences** dashboard and continues through processing there.
