Variant
A Variant is one value an Experiment can assign, such as a revision, a Price on a sibling Offer, or a prompt, with its lineage.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
key | string | required | The name the Flag returns for it. |
value | json | required | What it changes: copy, behavior, a definition Version, or a Thing. |
control | boolean | True for the current definition every challenger is judged against. | |
follows | Variant | The Variant it was drafted from by a learn step. |
Object
{
"$id": "https: //api.sb/ shiftnote.app/ variants/ variant_1",
"$type": "Variant",
"key": "Example key",
"value": {},
"control": true,
"follows": "variant_1"
}Relationships
- A Variant has many Exposures: the Variant the Flag assigned to this unit.
exposures, inversemeets. - A Variant is offered by one Experiment: the Variants the Experiment can assign, the control among them.
offeredBy, inverseoffers. - A Variant is scored by many Readouts: the Variant the number describes.
scoredBy, inversescores.
Verbs
createCreates a Variant.POST /{namespace}/variantsgetReturns one Variant by id.GET /{namespace}/variants/{id}listReturns Variants, newest first, one page at a time.GET /{namespace}/variantsupdateChanges the given properties of a Variant.PATCH /{namespace}/variants/{id}deleteDeletes a Variant; its history is kept.DELETE /{namespace}/variants/{id}
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Variant.create | Yes | Yes | Yes | No |
Variant.get | Yes | Yes | Yes | Yes |
Variant.list | Yes | Yes | Yes | Yes |
Variant.update | Yes | Yes | Yes | No |
Variant.delete | Yes | Yes | Yes | No |
Call it
Add a variant to RouteWise.Example
A bakery tests two Variants of its pickup button behind one Flag: the control reads Pick up today, and the challenger reads Hold my loaf. The challenger follows the control.