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

# Audience Intelligence

> Build reusable targeting rules, discover available traits, inspect factual membership changes, and compare exact Audience snapshots.

# Audience Intelligence

Audiences are server-evaluated targeting rules over first-party customer/account data and approved
PostHog, Segment, and HubSpot projections. Runtime targeting continues to evaluate the current
rule against current data. The materialized membership snapshot exists for history, inspection,
and overlap analysis; it does not replace live eligibility checks.

## Build and reuse rules

The visual builder supports typed customer and account conditions, nested `and`/`or` groups, and
explicit exclusions. Its plain-language summary is deterministic and generated from the same rule
AST sent to the Worker. For a customer linked to multiple accounts, all account conditions in one
evaluation must be satisfied by the same linked account.

Puntego includes typed starter templates and workspace-owned templates. Applying a template to an
existing draft requires confirmation because it replaces every current rule. Duplicating any
template creates a **draft** Audience. A template cannot activate itself, alter an existing
Audience, or publish targeting.

Workspace templates use optimistic revisions. A stale update is rejected instead of overwriting a
teammate's newer version. Template create, update, delete, and duplicate-to-draft actions are
audited. Owners and admins can mutate templates and Audiences; members can inspect them.

## Discover trait keys and values

The trait picker queries a bounded server catalog across first-party customer/account traits and
the tenant's approved PostHog, Segment, and HubSpot projections. Results are explicitly sampled
and non-exhaustive: each source samples at most 250 recent records before JSON expansion.

* Only scalar values are suggested. PostHog scalar array members may be offered individually.
* Key/value results support server-side search, source/scope filtering, and cursor pagination.
* Values for credential-like or personal keys such as tokens, email, name, phone, address, and
  secrets are suppressed. The key can remain visible so an operator can reference a known field,
  but Puntego does not expose its observed values.
* Suggestions help author a rule; they are not a schema guarantee. Validate the preview before
  activation.

## Reconcile membership

Creating or changing an active Audience enqueues reconciliation. Customer traits, account traits,
account membership, provider projections, and provider active-snapshot changes advance a tenant
source revision and mark completed snapshots stale without scanning customer rows.

Reconciliation runs in keyset pages of at most 250 customers. The page's state changes, cursor,
and history facts commit atomically. A rule revision that changed after a job was queued supersedes
that job. Scheduled, manual, source-data, activation, deactivation, archive, and rule-change causes
remain distinct in the durable reason field.

The membership history contains only factual `joined` and `left` transitions written by completed
reconciliation work. Previewing a rule never creates history. History rows are append-only and a
customer's rows cascade when that customer is erased.

## Compare overlap

Overlap is available only when both selected Audiences have ready snapshots for their current rule
and source revisions. The response reports A, B, intersection, A-only, B-only, union, and total
retained-customer counts, plus subset/equivalent/disjoint/partial classification.

Aggregate overlap responses contain no customer identifiers. A percentage with an empty
denominator is `null`, not a misleading `0%`. If either snapshot is stale or has never reconciled,
the comparison is unavailable until both Audiences are reconciled.

## Retention and exports

Membership history is retained for 365 days, terminal reconciliation jobs for 30 days, and deleted
workspace templates/template audit for up to 730 days. Scheduled maintenance selects and prunes
tenants in bounded pages.

Workspace operational exports include Audience rules, templates, template audit, source clocks,
membership state/history, reconciliation jobs, and reconciliation status. Customer-subject exports
include only that customer's current membership and history. Rule fingerprints are diagnostic
digests, never credentials; the export redactor may still redact fingerprint-named fields under its
conservative credential-key policy.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.