AbTestVariantInput
Variant settings for abTestCreate, abTestAddVariants, abTestSaveDraft, and abTestUpdateVariants.
On create and add the position
decides the role: the first variant of a test becomes CONTROL and later ones VARIANT, whatever type says.
input AbTestVariantInput {
id: Int
editorPatch: String
redirectUrl: String
type: AbTestVariantType!
weight: Float
description: String
status: String
}
Fields
AbTestVariantInput.id ● Int scalar
Variant id from abTestEditorDetail or abTestRefList; required by abTestSaveDraft and abTestUpdateVariants,
omitted on create and add.
AbTestVariantInput.editorPatch ● String scalar
JSON-encoded string. Object with default, a list of transforms, plus optional global style (CSS) and script
(JavaScript) strings. Each transform has a target CSS selector, finalSelectors (selectors for the element
after the change), and exactly one change such as text, style, or attr. Required and validated for
non-control PATCH variants when saved and at publish; ignored for controls and SPLIT tests. Full format: the
ab-test-variant-patches skill. Example:
{"default":[{"target":"h1","text":"New headline","finalSelectors":["h1"]}]}
AbTestVariantInput.redirectUrl ● String scalar
Split-test redirect URL; required for every non-control variant before publication, ignored on PATCH creation.
AbTestVariantInput.type ● AbTestVariantType! non-null enum
Required by the schema, but on create and add the position sets the role. On abTestUpdateVariants it sets the
role, and CONTROL clears editorPatch.
AbTestVariantInput.weight ● Float scalar
Traffic percentage, truncated to tenths; no bounds or total-of-100 check. Omission in abTestUpdateVariants
clears the weight; omission in abTestSaveDraft preserves it.
AbTestVariantInput.description ● String scalar
Descriptive text applied by abTestUpdateVariants; not saved during variant creation.
AbTestVariantInput.status ● String scalar
Ignored by create/add/update; use abTestRetireVariant to retire a variant.
Member Of
abTestAddVariants mutation ● AbTestCreateInput input ● abTestUpdateVariants mutation