# pickAutoExperience

**Kind:** Function

**Source:** [`atloria-monorepo/packages/tour-widget/src/targeting.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/tour-widget/src/targeting.ts#L105)

The single experience the orchestrator should auto-present, if any: the
highest-priority eligible one (the server pre-sorted by priority, so we keep
that order and take the first eligible). Announcements/NPS/checklists and
tours all compete on the same priority axis; one at a time.

## Signature

```ts
function pickAutoExperience(experiences: WidgetExperience[], state: WidgetState): WidgetExperience | null
```

## Parameters

| Name | Type |
|---|---|
| `experiences` | `WidgetExperience[]` |
| `state` | `WidgetState` |

**Returns:** `WidgetExperience | null`
