SCALIX help

← All tools

gads_promote_experiment

Google Ads write high risk

Part of the Experiment Agent.

What it does

Promote a running experiment's treatment arm to the base campaign (ExperimentService.PromoteExperiment, an async operation). SCALIX SOP PRE-FLIGHT: the experiment's start_date and arms are read, run_duration_days is computed, and each arm's campaigns are summarised over the trailing 30 days (metrics.conversions, cost_per_conversion, conversions_value). Running for fewer than 28 days (the Scalix 4-week minimum) returns a prominent warning that promoting now risks acting on noise; a 1970 placeholder start date counts as no start. A SETUP experiment (never scheduled), or a REMOVED, PROMOTED or GRADUATED one, is refused at preview, as Google refuses it; INITIATED or HALTED gets a warning. The summary appears in the PREVIEW so the decision is reviewed before approval; metric lookups are best-effort and warn rather than block. PREVIEW -> APPROVE (preview_id) -> COMMIT + audit. Returns {success, data:{applied:{experiment_result_summary, promotion_operation_name}, result}, warnings}. PREVIEW SEMANTICS: preview reads the experiment, its run duration and per-arm metrics (not_found if absent); the promote RPC runs only with the preview's RETURNED preview_id (identical arguments, within 30 minutes; forged or stale tokens are rejected).

When to use it

Show the per-arm summary and run_duration_days to the buyer, and require explicit approval. Never promote an experiment that has run under 4 weeks without a stated reason.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
experiment_resource_namestringyesFull resource name customers/{cid}/experiments/{id}. Must be running.
manager_idstringnoOptional MCC login-customer-id.
validate_onlybooleannoOptional. true forces another preview even with a preview_id; false is DEPRECATED and no longer commits — only a valid preview_id applies the write.
preview_idstringnoOmit it to preview: nothing is applied, and the call returns a preview_id bound to this exact request. Pass it only after the user approves that preview in a later message, with the same arguments (leave out validate_only, and add any confirmation flag the preview names). Single-use, expires in 30 minutes; changed arguments need a fresh preview.

Safeguards

A change in two steps. The first call previews and changes nothing; Claude shows you the preview and applies it only after you approve, within 30 minutes and with the same arguments. Every applied change goes to the audit log. How changes are approved.

Policy

Promotion permanently applies the treatment to production and changes real spend allocation; confirm the treatment is policy-clean (no disapproved creative) before promoting. This is the highest-impact experiment action.

Reminder

Promotion permanently changes the original campaign; verify the treatment is policy-clean before committing.

Errors

Error classMeansWhat to doRetry
EXPERIMENT_NOT_RUNNINGThe experiment is not in a promotable (running) state.Check status; only running experiments can be promoted.no
EXPERIMENT_ERRORPromotion failed (e.g., conflicting changes on the base campaign).Resolve the conflict and retry; surface the platform message.no
NOT_FOUNDNo experiment with that resource name.Confirm via gads_list_experiments.no
TOKEN_REVOKEDOAuth token expired/revoked.Refresh and retry once; else prompt reconnect (needs_reauth).yes
PERMISSION_DENIEDNo access or out-of-bearer-scope write.Confirm access and write scope; else refuse.no
RESOURCE_EXHAUSTEDRate/quota exceeded (HTTP 429).Backoff 5/10/20s cap 60s, then retry.yes
INTERNAL_ERRORTransient Google server error (5xx).Retry after backoff.yes

Edge cases

  • Async: success means promotion initiated; the campaign change completes in the background.
  • Promotion is permanent and irreversible — strongest confirmation required.
  • Only running experiments promote.
  • Promote before the experiment has meaningful data risks a false-positive winner -> advise sufficient runtime/significance.
  • Re-validate state at commit; expired token -> refresh once and retry; preview_id TTL expiry -> re-preview.