> ## 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.

# PopupTestVariant

> One arm of a popup A/B test: a popup and its share of the test's shoppers.

**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)

**fields**

**allowPageInteraction** `Boolean!` *required*

Whether shoppers can scroll and click the page behind the open popup. False locks the page behind it.

**campaignTargeting** `[PopupCampaignTargeting!](/docs/api-reference/v3/reference/marketing/popup-campaign-targeting)` *required*

Which UTM campaigns the popup is limited to.

**fields**

**mode** `[PopupCampaignTargetingMode!](/docs/api-reference/v3/reference/marketing/popup-campaign-targeting-mode)` *required*

Whether the popup is limited by campaign.

**utmCampaigns** `[String!]!` *required*

The `utm_campaign` values that show the popup when `mode` is UTM\_CAMPAIGNS, matched exactly. Kept, but unused, when `mode` is ALL\_VISITORS.

**closeButton** `[PopupCloseButton!](/docs/api-reference/v3/reference/marketing/popup-close-button)` *required*

How the popup's close (X) button looks.

**fields**

**backgroundColor** `String!` *required*

The color of the circle behind the X, as a hex color such as #FFFFFF. Shown only when `showBackground` is true.

**iconColor** `String!` *required*

The X's color, as a hex color such as #A3A3A3.

**showBackground** `Boolean!` *required*

Whether the X has a colored circle behind it.

**completionTags** `[String!]!` *required*

Tags added to each customer who completes the popup, such as a signup. Empty when none.

**countryTargeting** `[PopupCountryTargeting!](/docs/api-reference/v3/reference/marketing/popup-country-targeting)` *required*

Which shopper countries the popup is shown in.

**fields**

**countries** `[\[ShopifyMarketsCountryCode!\]!](/docs/api-reference/v3/reference/common/shopify-markets-country-code)` *required*

The countries INCLUDE or EXCLUDE lists. Kept, but unused, when `mode` is ALL.

**mode** `[PopupCountryTargetingMode!](/docs/api-reference/v3/reference/marketing/popup-country-targeting-mode)` *required*

Which countries the popup is shown in.

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

When the popup was created.

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

Which devices the popup is shown on.

**discountCode** `[DiscountCode](/docs/api-reference/v3/reference/marketing/discount-code)`

The discount offered in the signup flows the popup starts. Null when the popup offers no discount, or its discount 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)

**fields**

**category** `[DiscountCodeCategory](/docs/api-reference/v3/reference/marketing/discount-code-category)`

What the discount is used for, such as `RECOVER` for the discounts the Recover builder lists. Null when no category is stored.

**code** `String!` *required*

The code customers enter at checkout.

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

When the discount was created.

**description** `String!` *required*

A short human-readable summary of what the code does.

**expiration** `[DiscountCodeExpiration!](/docs/api-reference/v3/reference/marketing/discount-code-expiration)` *required*

When this code stops working.

**externalId** `String!` *required*

The platform's id for this discount (a Shopify GID or a BigCommerce promotion id).

**groupType** `[DiscountCodeGroupType!](/docs/api-reference/v3/reference/marketing/discount-code-group-type)` *required*

Whether this is one fixed code or a unique code per customer.

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

The id of this discount code.

**kind** `[DiscountCodeKind](/docs/api-reference/v3/reference/marketing/discount-code-kind)`

How the discount reduces the order. Null when the config has no settings type.

**legacyId** `String!` *required*

The discount's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**provider** `[DiscountCodeProvider!](/docs/api-reference/v3/reference/marketing/discount-code-provider)` *required*

The commerce platform that hosts this code.

**settings** `[DiscountCodeSettings](/docs/api-reference/v3/reference/marketing/discount-code-settings)`

How the discount reduces the order.

**title** `String!` *required*

The merchant-facing name of the discount.

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

When the discount was last edited.

**embedCode** `String`

The HTML snippet the merchant pastes into a page to show the popup inline, such as `<div id="redo-marketing-embedded-form-ab1cd"></div>`. Kept when the popup goes back to TRIGGERED, so a pasted snippet keeps working. Null until the popup is first made INLINE.

**frequencyCapHours** `Int!` *required*

How many hours the storefront waits before showing the popup to the same visitor again, from 1 to 720. 24 when the merchant never set one. Applies only to the TIME\_ON\_PAGE, EXIT\_INTENT and BACK\_IN\_STOCK triggers; the Intent AI triggers and inline popups ignore it.

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

The id of this popup.

**languages** `[String!]!` *required*

The languages the popup offers its copy in, as locale codes such as `fr` or `pt-BR`. The translations themselves are written in the builder. Empty when the popup shows only its authored copy.

**launcher** `[JSON](/docs/api-reference/v3/reference/common/json)`

The tab, banner or embedded button that opens the popup. Shape is `launcher` in `popupDesignSchema`. Null when the popup has none.

**legacyId** `String!` *required*

The popup's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

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

The popup's supported languages, its translatable strings and its saved translations. Null if the popup was deleted while reading.

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

**fields**

**entries** `[\[PopupTranslationEntry!\]!](/docs/api-reference/v3/reference/marketing/popup-translation-entry)` *required*

The popup's translatable strings, in the source language.

**supportedLocales** `[\[PopupLocale!\]!](/docs/api-reference/v3/reference/marketing/popup-locale)` *required*

Languages enabled for this popup.

**translations** `[\[PopupTranslation!\]!](/docs/api-reference/v3/reference/marketing/popup-translation)` *required*

The saved translations, one per language.

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

The merchant-facing name of the popup. Empty when it has none.

**pageRules** `[\[PopupPageRule!\]!](/docs/api-reference/v3/reference/marketing/popup-page-rule)` *required*

Which storefront pages show the popup. Empty when it shows on every page.

**fields**

**type** `[PopupPageRuleType!](/docs/api-reference/v3/reference/marketing/popup-page-rule-type)` *required*

Whether matching pages show or hide the popup.

**url** `String!` *required*

A full URL (`https://shop.example.com/products/*`) or a path (`/products/*`). It matches the page exactly, or with `*` standing for any text.

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

When the popup was last published. Null while it is unpublished.

**renderMode** `[PopupRenderMode!](/docs/api-reference/v3/reference/marketing/popup-render-mode)` *required*

Whether the popup opens over the page or shows inline in it.

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

Whether the popup is published.

**steps** `[JSON!](/docs/api-reference/v3/reference/common/json)` *required*

The popup's steps in order, each with its layout and elements, as the builder saves them. Shape is `steps` in `popupDesignSchema`. A `discountId` inside is the discount code's `legacyId`. Empty when the popup has no steps.

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

Which visitors the popup is shown to. Null when it has no audience setting.

**testUrl** `String`

Storefront URL that opens this popup for live testing, even while unpublished. Public and unsigned; does not expire. The storefront still enforces device and country targeting, so a mobile-only or geo-targeted popup won't show unless opened from a matching device and country. Null for back-in-stock popups (which require a product page with an out-of-stock variant) or when the store has no storefront domain.

**triggers** `[\[PopupTrigger!\]!](/docs/api-reference/v3/reference/marketing/popup-trigger)` *required*

What shows the popup, in the order the dashboard lists them. Only INLINE when it is embedded. Empty when no trigger is on.

**fields**

**delaySeconds** `Int`

For TIME\_ON\_PAGE, how many seconds the shopper is on the page before the popup shows. Null for other kinds.

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

What shows the popup.

**opensAutomatically** `Boolean`

For BACK\_IN\_STOCK, whether the popup opens by itself when the shopper selects an out-of-stock variant. When false, only an embed launcher opens it. Null for other kinds.

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

How the popup is laid out on desktop, from its first step. POPUP when it has no steps.

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

When the popup was last edited.

**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)

**fields**

**completionRate** `Float`

`completions / views`, from 0 to 1. Null when the popup has no views.

**completions** `Int!` *required*

Times shoppers submitted the popup's last step that has an input, or its last step with a button when no step has an input.

**emailSignups** `Int!` *required*

New email subscribers from this variant's popup, not counting people already subscribed.

**engagements** `Int!` *required*

Times shoppers submitted any step of the popup, its last included.

**smsSignups** `Int!` *required*

New SMS subscribers from this variant's popup, not counting people already subscribed.

**views** `Int!` *required*

Times shoppers in this variant saw its popup.

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

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


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