SCALIX help

← All tools

gads_set_ad_group_customizer

Google Ads write medium risk

Part of the Ad Customizer Agent.

What it does

Bind a customizer attribute value to a specific ad group so RSAs in that group can render dynamic text via {CUSTOMIZER.AttributeName:default}. Creates an AdGroupCustomizer linking an existing CustomizerAttribute (type TEXT, NUMBER, PRICE, or PERCENT) to the ad group with a typed CustomizerValue. There is exactly one link per attribute per level (customer/campaign/ad_group/ad_group_criterion) and the most specific level wins, so an ad-group customizer overrides campaign/customer values for that group. The referenced CustomizerAttribute must already exist (create separately via CustomizerAttributeService; max 40 enabled attributes per account). PREVIEW->APPROVE->COMMIT: validate_only=true dry run -> plain-English diff (attribute name, type, value, target ad group, what it overrides) -> explicit approval -> execute -> confirm with UTC timestamp + audit log. Accuracy: PRICE/NUMBER/PERCENT values must match the attribute type and any RSA reference must include a literal default so the ad still serves if the customizer is unavailable. PREVIEW SEMANTICS: the first call (no preview_id) is sent to the Google Ads API in validation mode — field, enum, policy and permission errors surface AT PREVIEW, nothing is changed, and the response returns a preview_id. To apply, show the preview to the user, get their approval, and re-call with that preview_id and IDENTICAL arguments within 30 minutes; changed arguments or an expired token fail closed to a fresh preview. validate_only=true forces another preview; validate_only=false alone never commits.

When to use it

Use when the user wants ad-group-specific dynamic insertion (e.g. per-product price or location) in RSAs. Confirm the attribute name, type and value, ensure RSA references carry a default fallback, preview with validate_only, and apply only on explicit approval.

Inputs

NameTypeRequiredDescription
ad_group_idstringyesNumeric ad group id; forms the ad_group resource_name.
customer_idstringyes10-digit CID, dashes stripped.
customizer_attributestringyesResource name of an existing CustomizerAttribute, or its unique name to be resolved. Attribute must already exist.
valuestringyesString value of the customizer; for PRICE/NUMBER/PERCENT it must parse to the attribute's type ('15' for PERCENT). PRICE is an amount with its ISO currency code and no space (100USD, 4999.00INR, INR4999): spaces are removed, and a bare number is refused at preview.
value_typestringnoCustomizerAttributeType TEXT|NUMBER|PRICE|PERCENT; must equal the attribute's declared type, which is the default (read from the attribute). Enum-normalized.
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

Dynamic customizer text is still ad copy — the rendered string must meet Google editorial standards (no excessive capitalization, no gimmick punctuation/symbols, no clickbait, correct spelling) and must not assert a claim the landing page can't support (Misrepresentation = egregious, immediate suspension). PRICE/PERCENT values must be truthful and honored on the destination.

Reminder

Inserted values render in live ads — keep them truthful, on-policy, and never expose member/personal data through a customizer.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDCustomer ID not found / unauthorized.Verify CID and authorization; re-auth if revoked.no
TOKEN_REVOKEDOAuth credential revoked/expired.Prompt reconnect (needs_reauth).no
CUSTOMIZER_ATTRIBUTE_NOT_FOUNDThe referenced CustomizerAttribute does not exist or is not enabled.Create the attribute first via CustomizerAttributeService, then retry.no
INVALID_ARGUMENTLink rejected — value does not match attribute type, duplicate link, or >40 attributes — surfacing Google's message.Surface exact error; correct value/type and re-preview; do not guess.no
PERMISSION_DENIEDScope/role does not permit writes here.Confirm adwords scope and editor role on this CID.no
MANAGER_ACCOUNT_WRITECannot set ad-group customizers on an MCC.Target a client account.no
PARTIAL_FAILUREA bulk customizer link partially succeeded.Return success:true with per-row warnings for failed links.no
RESOURCE_EXHAUSTEDRate/quota exceeded (429).Backoff 5->10->20s cap 60s; honor retryDelay.yes
PLATFORM_UNAVAILABLEGoogle Ads API 5xx.Re-check state, then retry.yes

Edge cases

  • One link per attribute per ad group — re-binding the same attribute returns a duplicate error; update or remove the existing link instead.
  • Ad-group customizer overrides campaign/customer-level value for that group only — state the override in the preview.
  • PRICE accepts currency before or after the number with no space ($100 or 100USD); reject malformed values pre-send.
  • If an RSA references {CUSTOMIZER.name} without a default and no value resolves, the ad may not serve — require a default.
  • Account at the 40-enabled-attribute cap -> INVALID_ARGUMENT; advise removing an unused attribute.
  • Preview TTL expiry -> re-preview; expired token -> refresh once, retry.