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

# popupTests

> List this store's popup A/B tests, newest first, optionally filtered by status. Rescue-panel tests are not included.

**Required scopes:** [`campaigns_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_read)

## Arguments

**after** `String`

Forward pagination cursor — returns popup A/B tests after it.

**before** `String`

Backward pagination cursor — returns popup A/B tests before it.

**first** `Int`

Forward pagination: returns the first N popup A/B tests (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N popup A/B tests (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**orderBy** `[PopupTestSortKey](/docs/api-reference/v3/reference/marketing/popup-test-sort-key)`

Which key to sort by (defaults to the first key, newest-first). Combine with `reverse` to flip direction.

**reverse** `Boolean`

Reverses the sort direction selected by `orderBy` (or its default).

**status** `[PopupTestStatus](/docs/api-reference/v3/reference/marketing/popup-test-status)`

Only include tests with this status.

## Returns

**popupTests** `[PopupTestConnection!](/docs/api-reference/v3/pagination)` *required*

A paginated list of PopupTest items.

**fields**

**edges** `[\[PopupTestEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[PopupTest!](/docs/api-reference/v3/reference/marketing/popup-test)` *required*

The item at this edge.

**fields**

**device** `[PopupDevice!](/docs/api-reference/v3/reference/marketing/popup-device)` *required*

Which shoppers' devices the test covers. Its popups are shown on the same devices.

**endedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the test was concluded. Null while it runs, and for a test concluded before end times were recorded.

**id** `ID!` *required*

The id of this test.

**name** `String!` *required*

The test's name. Empty when it has none.

**startedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the test started. Null if it was never recorded.

**status** `[PopupTestStatus!](/docs/api-reference/v3/reference/marketing/popup-test-status)` *required*

Whether the test is running.

**trigger** `[PopupTriggerKind!](/docs/api-reference/v3/reference/marketing/popup-trigger-kind)` *required*

The trigger every variant's popup uses.

**variants** `[\[PopupTestVariant!\]!](/docs/api-reference/v3/reference/marketing/popup-test-variant)` *required*

The test's variants, in the order they were added.

**nodes** `[\[PopupTest!\]!](/docs/api-reference/v3/reference/marketing/popup-test)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**device** `[PopupDevice!](/docs/api-reference/v3/reference/marketing/popup-device)` *required*

Which shoppers' devices the test covers. Its popups are shown on the same devices.

**endedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the test was concluded. Null while it runs, and for a test concluded before end times were recorded.

**id** `ID!` *required*

The id of this test.

**name** `String!` *required*

The test's name. Empty when it has none.

**startedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the test started. Null if it was never recorded.

**status** `[PopupTestStatus!](/docs/api-reference/v3/reference/marketing/popup-test-status)` *required*

Whether the test is running.

**trigger** `[PopupTriggerKind!](/docs/api-reference/v3/reference/marketing/popup-trigger-kind)` *required*

The trigger every variant's popup uses.

**variants** `[\[PopupTestVariant!\]!](/docs/api-reference/v3/reference/marketing/popup-test-variant)` *required*

The test's variants, in the order they were added.

**fields**

**id** `ID!` *required*

The id of this variant.

**name** `String!` *required*

The variant's name, as the test results show it.

**popup** `[Popup](/docs/api-reference/v3/reference/marketing/popup)`

The popup this variant shows. Null when the popup was deleted. Reading it needs the `campaigns_read` scope.

**Requires:** [`campaigns_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_read)

**results** `[PopupTestVariantResults](/docs/api-reference/v3/reference/marketing/popup-test-variant-results)`

What this variant has recorded. Costs 5 points per variant. Null when the results can't be read.

**Requires:** [`campaigns_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_read)

**weight** `Float!` *required*

The percentage of the test's shoppers shown this variant, from 0 to 100. A test's weights sum to 100.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

## Example

```graphql theme={null}
query {
  popupTests(after: "...", before: "...", first: 10, last: 10, orderBy: STARTED_AT, reverse: true, status: CONCLUDED) {
    nodes {
      device
      endedAt
      id
      name
      startedAt
      status
      trigger
    }
    pageInfo { hasNextPage endCursor }
  }
}
```


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