A/B test a campaign
An A/B test splits a campaign’s audience across up to four message variants and reports delivery, open, click, and reply rates for each, so you can see which message performs better instead of guessing. Turn on A/B testing when you create the campaign, choose the variant split that fits the question you’re asking, and either let Orbit pick the winner or pick it yourself. This guide covers the variant model, the split options, how winners are chosen, and how to read results. For the full request and response schemas, see the campaigns API reference.Experimentation sits beside governance, not over it. Every experiment assignment — a variant, a weighted split, or a hold-out control — still passes through the org-wide governance gates: per-contact frequency caps and the quiet-hours window run on the final recipient set, so a control cohort that receives no message also consumes no cap slot, and a winner promotion only decides which message sends, never whether it should. Size experiment cohorts from the governance-eligible audience (suppressed, capped, and opted-out contacts netted out), not the raw match count.
Prerequisites
- A draft campaign with a
message_templateset. Variants are alternatives to that base message, so an A/B test needs one. - The campaign is still in draft or scheduled state. Variants are locked in before launch; changing the set mid-send invalidates the comparison.
How variants and splits work
Each variant carries a name, a message body, and a position in the set (variant_index, 0–3). A campaign accepts between two and four variants. Every recipient in the test is assigned to exactly one variant, so a recipient never receives two versions of the message.
Traffic splitting has three modes:
- Even split. The default. When no variant carries a
sample_percent, recipients distribute evenly across the set. - Weighted split. Set
sample_percenton every variant (integer percentages that sum to exactly 100) to give one variant more of the exploration traffic — a 70/30 or 50/30/20 split. The allocation is all-or-nothing: the API rejects a payload where only some variants carry a share, or where the shares do not sum to 100. - Bandit (Thompson). Enable
ab_banditand mid-send traffic shifts toward whichever variant is currently leading, instead of holding a fixed split until a winner is declared. Use this on large sends where waiting for a verdict wastes opportunity; on small sends a fixed split usually reads more cleanly.
Choose how a winner is picked
Two settings control the verdict:- Winner metric (
ab_winner_metric):delivered,opened,clicked, orreplied. Pick the metric that matches the campaign’s goal. A click-through campaign judged on replies picks the wrong winner; the default is the delivery rate, which measures deliverability rather than engagement. - Holdout (
ab_holdout_percent, 1–50): a slice of the audience that receives no variant during the exploration phase, as a control group. Comparing the winner against the holdout afterwards tells you whether the message beat doing nothing, not just which variant beat the other.
Auto-winner governance
Three optional knobs on the same variants call decide whether the winner-locking scheduler selects the winner automatically, and how strict the verdict must be:ab_auto_promote(defaulttrue): whentrue, the winner-locking scheduler promotes the leading variant as soon as the thresholds below are met. Setfalseto lock every promotion behind the manual select-winner call — for example while a compliance review runs the test plan.ab_min_sample_size(integer, 10–1,000,000; default 30): the fewest deliveries the leading variant must have before any verdict is considered. Raise it on high-traffic campaigns where an early lead on thin samples would otherwise lock prematurely.ab_confidence_threshold(0.500–0.999; default 0.950): the Bayesian posterior confidence the leading variant must reach. Raise it toward 0.99 for a stricter verdict, lower it toward 0.90 when you’d rather lock sooner.
null for one to reset it to its default. The results endpoint echoes the stored values plus a live auto_winner_progress snapshot (the gate values the evaluator currently applies, the current leader, and whether it would already lock), so a dashboard can render real progress toward an automatic verdict.
Generate variants with AI
Generate AI A/B message variants rewrites the campaign’s base message into two to four alternatives that test distinct angles — a different hook, value framing, or call to action — and returns them with a one-line rationale for each. Generation is suggestion-only: nothing commits to the campaign until you review and post the set you want. The generator stays grounded in your own copy — it rephrases claims the base message already makes rather than inventing offers, discounts, or urgency the original never carried — and keeps the identical personalization tokens and a single opt-out instruction, so a suggested variant is carrier-ready when the base message was.Read the results
Get a campaign’s A/B results returns per-variant delivery, open, click, and reply rates, the total assigned recipients, the selected winner and when it was picked, the holdout percentage, and whether the bandit is on. A campaign with no A/B test returns an empty, disabled result set rather than an error, so a results panel renders cleanly either way. Rates divide by the metric’s denominator: delivery rate against sends, open, click, and reply rates against deliveries. A variant with zero sends reports zeros, not nulls.Example: set a weighted three-way split
auto_winner_progress in that response tells you whether the leader has cleared the sample and confidence gates yet.
Holdout cohorts and send-time optimization
A/B variants answer “which message wins” — a correlation question. Two further experiment surfaces answer the causal questions — “did sending at all lift conversion?” and “did sending at a different time lift conversion?” — by keeping a randomized control cohort that receives a different treatment (or none at all).Campaign-wide control holdout
Set a whole-campaign control percent and that share of the resolved audience receives no message for the whole campaign. Comparing treatment against a do-nothing baseline is the only way to prove the campaign caused incremental conversions rather than merely correlating with them. A campaign carries the control cohort once it hascampaign_holdout_percent in its variables (1–50). Assignment is deterministic per contact, so a paused-and-resumed campaign keeps the exact same control set. The GET /api/v1/campaigns/{id}/holdout-lift endpoint reports the treatment-vs-control conversion rates together with a confidence interval and a significance flag, so you can tell a real effect from sampling noise.
Smart-send timing hold-out
Smart-send campaigns already deliver each recipient at their predicted best time. To prove the optimization itself helped, reserve a timing hold-out:smart_send_holdout_pct (up to half the audience) keeps the natural pre-optimization schedule while everyone else gets their predicted schedule. GET /api/v1/campaigns/{id}/smart-send-holdout-lift scores delivered, read, and replied lift between the two cohorts with a significance marker. The dashboard Send-time optimization lift panel offers this hold-out setup inline on a smart-send campaign.
Send-time window experiments
To test when you send on a fixed schedule, configure two to four competing UTC windows invariables.send_time_experiment (plus an optional holdout_pct control arm). Preview the cohort plan resolves the audience and returns each window’s assigned arm and next fire time. GET /api/v1/campaigns/{id}/send-time-experiment/results scores every window’s conversion lift over the control and picks a winner — preferring the highest statistically-significant lift, falling back to the highest raw rate when nothing is significant yet.
No experiment assignment in any of these surfaces biases another: variant splits, the campaign control, the smart-send hold-out, and the send-time windows each mix on an independent cohort, so a contact’s window or control assignment under one experiment never skews the others.
Recurring sends: a fresh race every occurrence
A recurring campaign repeats by cloning itself: when the schedule fires, the platform creates a new campaign for the occurrence (named(Recurrence N)), launches it, and the original keeps its own completed results. When the campaign carries an A/B test or a holdout, that clone follows one contract: the experiment’s configuration carries into every occurrence, the experiment’s results reset, and every occurrence runs a fresh race. No winner is ever inherited.
What carries into every occurrence
- Variants. Each variant’s name, message body, position (
variant_index), and traffic share (sample_percent) clone as configured, including the legacy two-template setup (variant B plus split) when that is what you configured. - Split and holdout. Your weighted split, the A/B holdout percent (
ab_holdout_percent), and the campaign-wide control-holdout opt-in (campaign_holdout_percent). - Winner rules. The winner metric (
ab_winner_metric) and the governance settingsab_auto_promote,ab_min_sample_size, andab_confidence_threshold. A campaign set to manual winner review stays manual on every occurrence. - Send shape. Bandit mode (
ab_bandit), the send window and timezone, the audience definition (re-resolved at send time), the throttle, and the credit cap. Spend accounting starts at zero on each occurrence.
What resets
- The declared winner, in both representations. A multi-variant test clones with no variant flagged as the winner and no winner timestamp; the legacy two-template setup clones without its recorded winner. The new occurrence re-explores at the configured split instead of snapping to the prior winner.
- Counters. Per-variant sent, delivered, opened, clicked, and replied counts start at zero.
- The holdout draw. Cohort assignment is seeded per campaign and an occurrence is a new campaign, so the control cohort is drawn fresh. The previous occurrence’s allocation does not carry into the next lift comparison.
- Reports. The lift report and the per-reason skip breakdown belong to the occurrence that produced them. A new occurrence starts without them and writes its own when it completes.
Reading results across occurrences
Each occurrence is its own campaign with its own id, so A/B results and lift reports are per occurrence. The original campaign’s results describe the first run only; the second run’s race, winner, and lift live on the(Recurrence 2) campaign. Reconcile per run: read each occurrence’s results on its own row rather than expecting one cumulative view.
Worked example: weekly promo, 50/50 with a 10% holdout
A weekly promo tests two variants at 50/50 withab_holdout_percent: 10 and auto-promotion on.
- Week 1. The audience resolves, 10% is drawn as holdout, and the rest splits 50/50 between A and B. Mid-week, B clears the sample and confidence gates, is locked as week 1’s winner, and the remaining traffic goes to B. At completion, the lift report compares B against the holdout.
- Week 2. The schedule fires and clones the campaign. B’s win does not carry: the clone starts 50/50 again with zeroed counters, and a fresh 10% holdout is drawn, which is not necessarily the same contacts as week 1. If A leads on this week’s data, A is locked as week 2’s winner. Two different winner badges across two weeks is the system working as designed.
Manual winner lock vs. auto-promotion between occurrences
- With
ab_auto_promote: false, every occurrence explores until you lock it yourself with Select the winning A/B variant. The setting carries, so a manual-review posture holds across the whole series without reconfiguration. - A manual lock applied to week 1 applies only to week 1. Week 2 starts unlocked and stays unlocked until you lock it.
- With auto-promotion on, each occurrence evaluates its own race against the same carried thresholds. A winner in one occurrence has no authority over the next.
Troubleshooting
- 422 on the variants call. Check that every body field satisfies the contract: two to four variants, each with a unique
variant_indexin 0–3; asample_percentpayload set on every variant and summing to exactly 100;ab_holdout_percentbetween 1 and 50; at least one field present. The error message names the failing rule. - Results look empty right after launch. Assignment rows appear as the send progresses. Calling the results endpoint before recipients are assigned returns the empty, disabled shape.
- Winner selection rejects your variant id. The id must come from the campaign’s current variant set — a full-replace variants call invalidates ids from the previous set. Fetch the results or variants list and pick from there.
- A/B editor does not appear on a cloned campaign. Cloning preserves the A/B toggle and variant set; if the original campaign had testing disabled, enable it on the clone first.
See also
- Frequency caps — the per-contact rolling-window governance every experiment assignment still passes through.
- Quiet hours — the org-wide send-window gate that narrows every send, experiment or not.
- Campaign lifecycle — the status arc each recurring occurrence re-enters as its own campaign.