# Console: Purposes & preference center

> The versioned statement editor and the preference center builder.

Source: https://croombit.com/en/docs/console-purposes

## Purpose editor

1. *New purpose* → key (`snake_case`) + category. Optionally a version tag and *enforce locale*.
2. *Draft text* tab → one or more languages (title + body + optional link).
3. Row button reads **Add text** (nothing published yet) → **New version** (live, no edits) → **Edit draft** (unsaved edits). The **Unpublished** column says *up to date* or *draft edits*.
4. **Publish** → choose *Display-only* or *Requires re-consent*, an optional tag and effective date.

Full detail and worked examples: [Consent statements & versioning](https://croombit.com/en/docs/statements).

> **NOTE:** A purpose always has an editable draft open: publishing a version opens a fresh one, with the texts carried forward. So when you list purposes (console, admin API or MCP), `hasDraft: true` with `pendingChanges: false` is the **normal** state — it means “a draft exists and it is identical to the live version”. Only `pendingChanges: true` means there are unpublished edits, and publishing an identical draft is refused with *Nothing to publish*.

## Legal basis and default state

Each purpose has a **legal basis** (`CONSENT`, `LEGITIMATE_INTEREST`, `CONTRACT`, `LEGAL_OBLIGATION`, `VITAL_INTEREST` or `PUBLIC_TASK`) and a **default state** (`NOT_GIVEN`, `GRANTED` or `DENIED`) — what a person with no record for it reads as. They are **independent settings**: the default state is not derived from the legal basis, and neither changes what a record’s `state` can be. Set each one deliberately. To load contacts you hold under a basis other than consent, see [Recording & reading consent](https://croombit.com/en/docs/api-consent#legal-basis).

## Dependency rules

Rules change **what the banner asks next**, based on what the person has answered so far — *“if they opt into marketing email, also ask how often.”* They run in the browser as the form is filled in; they never block or alter a saved consent.

The *Dependency rules* tab has a **visual builder**: each rule reads *When [purpose] is / is not [granted | denied | not answered] … Then [require | show | hide | make optional] [these purposes or fields]*. A plain-language sentence under each rule shows what it will do. An *Advanced (JSON)* tab is there for logic the builder can’t express (nested AND/OR, several effects).

| You want | Rule |
| --- | --- |
| Only ask for email frequency if they opted into email | When `marketing_email` **is granted** → **require** `email_frequency` |
| Hide the “topics” picker unless they said yes to marketing | When `marketing` **is not** granted → **hide** `marketing_topics` |
| Force an analytics choice before they can continue | When `analytics` **is** not answered → **require** `analytics` |

> **TIP:** Most sites need **no** dependency rules. Add one only when one answer should genuinely change what else is asked.

## Preference center

Built from three tabs. **Channels** (email, SMS, push…) and **Topics** (newsletter, product updates…) are each a simple labelled list. **Center** composes them: one row per channel × topic, with a *required* toggle. **Fields** adds typed extras (BOOLEAN, SINGLE_SELECT, MULTI_SELECT, SCALE) with options. **Publish** freezes a version; the SDK reads it from `GET /v1/preference-template`.