> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/portals/portal-settings/audiences.md). Agents can also search and read this documentation through its [MCP server](https://docs.scaleflex.com/~gitbook/mcp).

# Audiences

Group users by their attributes, and show pages only to the right ones.

An **audience** is a named group of users defined by what is true about them — their region, their role, whichever attributes you keep. Instead of maintaining lists of people by hand, you describe the group once and membership follows the attributes.

Audiences belong to the project, so every Portal in it can use the same ones.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FzhDnES3ra5jUztpKBfBo%2Fimage.png?alt=media&#x26;token=8dbd74ac-48e1-476b-b901-286178a384a4" alt=""><figcaption><p>The <strong>Audiences</strong> page, listing the groups the project keeps.</p></figcaption></figure>

Each audience in the list says where it is being used — **Used by 4 pages**, or **Used by 4 pages in 2 portals** where it reaches beyond this one, or **Not used**. It is the check to make before renaming or deleting one: the number tells you how much depends on it, and whether the damage would be confined to the Portal you are looking at.

## Create an audience

1. Open **Audiences** and select **Create audience**.
2. Give it a **Name**, and a **Description** saying what it is for — someone else will need to know.
3. Pick a **Color**, so it is recognisable wherever it appears. Besides the preset swatches, **Custom color** takes any colour.
4. Add **Conditions**: an attribute, an operator, and a value.
5. Set **Users must match** to **All conditions match** or **Any condition matches**.
6. Select **Create**.

**Add condition** adds as many as you need. Each condition takes a different attribute — picking one already in use is refused with **Already used in another condition**. Once every attribute is in use, combine several values in one condition with **Is one of** instead.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F9LLh0Zys0THNcOEpbEVz%2Fimage.png?alt=media&#x26;token=6bf3b706-b38b-4fd0-8e83-9ebacfec6454" alt=""><figcaption><p>Creating an audience: a name, a colour, and the conditions a user has to match.</p></figcaption></figure>

## What a condition can ask

The operators on offer depend on the type of the attribute you pick:

| Attribute type                   | Operators                                                                        |
| -------------------------------- | -------------------------------------------------------------------------------- |
| **Text**                         | **Is**, **Is not**, **Contains**, **Is set**, **Is not set**                     |
| **Select-one**, **Multi-select** | **Is**, **Is not**, **Is one of**, **Is not one of**, **Is set**, **Is not set** |

**Is one of** and **Is not one of** take several values at once, so one condition can cover a handful of regions. **Is set** and **Is not set** take no value at all — they ask only whether the person has the attribute filled in.

On an attribute with a fixed list of values you choose from that list rather than typing, which is why those attributes are worth preferring for anything you intend to group on.

{% hint style="info" %}
On a **Multi-select** attribute, a condition asks what a person **holds**, not what their whole set is. **Is** matches anyone who holds that value among theirs, and **Is one of** matches anyone holding at least one of the values you picked. So a partner who covers Germany, the EU and global markets matches an audience asking for Germany.
{% endhint %}

An option that has since been renamed or deleted from the attribute still counts on a condition that used it. It stays listed as **« value » (removed)** so you can see it and take it out deliberately, rather than it narrowing the audience invisibly.

## Using an audience

Audiences control who sees a page. On a page's **…** menu in the builder, **Visibility** opens **Who can view the page?**:

| Option                             | The page is shown to                                                     |
| ---------------------------------- | ------------------------------------------------------------------------ |
| **All users**                      | Everyone who can open the Portal. The default.                           |
| **Nobody**                         | No one — the page stays in the Portal but is not reachable.              |
| **Registered users**               | Anyone signed in, whoever they are.                                      |
| **Specific audiences**             | Members of the audiences you choose.                                     |
| **Users with specific attributes** | People matching conditions you write here, rather than a saved audience. |

That makes one Portal serve several groups: a partner sees the partner pages, a journalist sees the press pages, and neither knows the other exists.

<div><figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FntNQDT0ufm9oPokgVE0w%2Fimage.png?alt=media&#x26;token=a5e3490e-201f-4c9a-b22f-5586e1bbb96c" alt=""><figcaption><p><strong>Visibility</strong> on a page's … menu, in the builder's page selector.</p></figcaption></figure> <figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FMAv0rFbf4KMfDHewTNX3%2Fimage.png?alt=media&#x26;token=82eda804-00be-4622-bf3f-f3d4a2071b0c" alt=""><figcaption><p>The dialog it opens, with <strong>Specific audiences</strong> chosen and the audience list open.</p></figcaption></figure></div>

### Any, or all

The two condition-based options do not combine the same way, and the dialog says so under each:

* **Specific audiences** — *Users in any of the selected audiences can view this page.* Choosing three audiences widens the page to all three.
* **Users with specific attributes** — *Users must match all conditions to see this page.* Adding a second condition narrows it.

So audiences add up, and attributes cut down. Reaching for a second audience when you meant to narrow is the usual way a page ends up visible to more people than intended.

**Specific audiences** needs at least one — saving without picking is refused with **Select at least one audience**. A Portal with none yet shows **No audiences yet**: *Create audiences in the portal settings first.*

### Filling in a user's attributes

An audience is also a shortcut when you invite someone. Picking one under **Add to audience** fills in the attributes that audience implies, so you do not retype them. Those values **merge** with anything you had already chosen rather than replacing it, and switching to a different audience — or back to **None** — takes away only what the audience put there, leaving your own entries alone.

The full behaviour is on [Users](https://docs.scaleflex.com/portals/portal-settings/users.md).

## Limiting assets in galleries

An audience can decide **which assets** its members see in a gallery, not only which pages they can open. It takes two halves, and neither does anything on its own.

**On the audience.** The audience's settings carry an **Asset scope** group with a **Limit assets in galleries** switch. Turn it on and set the metadata filters describing the assets that audience may see. The **Asset scope** column on the Audiences list shows a summary of each one, or **—** where an audience has none.

**On the gallery.** The gallery's own **Limit assets to the visitor's audiences** switch opts that gallery in. With it on, the gallery names the scopes it will apply — *Applies the scopes of: …* — and states the consequence: *Visitors outside these audiences see no assets.*

{% hint style="warning" %}
Turning the gallery's limit on before any audience has a scope empties that gallery for everyone: *No audience has an asset scope yet, so every visitor sees no assets while this limit is on.* Set the scope on the audience first, then switch the gallery on.
{% endhint %}

People signed in with an Asset Hub account always see every asset, whatever the scopes say — so test the limit as an ordinary Portal visitor, not as yourself.

## Deleting an audience

An audience that any page still uses cannot be deleted. The attempt is refused with *This audience is still used by the following pages: …. Update their visibility settings first.* — pages in other Portals of the project are listed with their Portal's name. Change those pages' **Visibility** first, then delete.

An audience no page uses can be deleted after a confirmation. Two things still change:

* It is shared across the project, so any Portal relying on it loses it.
* If it carried an asset scope, its members will see fewer or no assets in galleries limited to audiences.

## Good to know

* An audience is only as good as the attributes behind it. If nobody fills in the attribute, the audience is empty and the page is invisible — a common cause of "the page disappeared".
* Audiences are shared across the project, so renaming one affects every Portal using it. The **Used by** count on the list tells you how far that reaches.
