airstrings_variant_set
Create or replace the entire A/B experiment draft for an existing text string key by supplying every variant and traffic allocation; the base string serves as control.
Instructions
Create or replace the A/B experiment for one text-format string key that already exists on the server in the active environment. Replaces the whole experiment as a new draft, so pass every variant each time; the key's base string is the implicit 'control' variant. Refused while the experiment is running (stop it first) and on a protected environment. Does not start it: call airstrings_variant_start, then airstrings_publish. Returns the stored experiment. To read the current one first, use airstrings_variant_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Server-side string key (format text) the experiment belongs to, e.g. 'onboarding.welcome'. | |
| variants | Yes | Each non-control variant name to an object of locale=value pairs, e.g. {"treatment": {"en": "Hi"}}. Never include 'control' — it is the base string. Give a value for every locale the base string has, or airstrings_variant_start will refuse. | |
| allocation | Yes | Variant name to integer traffic weight, including 'control', e.g. {"control": 50, "treatment": 50}. Weights are relative; give every variant in variants a weight. |