SCALIX help

← All tools

gads_adjust_conversions

Google Ads write high risk

Part of the Offline Conversion Agent.

What it does

Adjust previously uploaded conversions (ConversionAdjustmentUploadService): RESTATEMENT (change the value), RETRACTION (remove the conversion), or ENHANCEMENT (attach hashed user_identifiers to improve matching, e.g. enhanced conversions for leads). Conversion identified by order_id (strongly preferred) OR gclid+conversion_date_time. RESTATEMENT requires restatement_value — a plain-currency scalar with sibling currency_code (the server nests them into the API's RestatementValue) or the nested {adjusted_value, currency_code} dict directly; ENHANCEMENT requires hashed user_identifiers and EU consent. RESTATEMENT/RETRACTION must occur within ~54 days of the original conversion (55 for Hotel). Uses partial_failure=true. WRITE with preview->approve->commit: preview shows adjustment type, target identifier, and from->to value + preview_id; commit uploads + audit. Returns {total_adjustments, successful, failed, errors}. 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.

When to use it

Use to correct a conversion's value (RESTATEMENT), remove an invalid one (RETRACTION), or add hashed identifiers (ENHANCEMENT). Preview each adjustment's from->to and target, confirm it reflects reality, then commit.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
adjustmentsarrayyesRows: {conversion_action (resource_name or bare id), order_id (preferred) or gclid + conversion_date_time, adjustment_type (RESTATEMENT/RETRACTION/ENHANCEMENT), adjustment_date_time, restatement_value (RESTATEMENT only: plain-currency scalar with sibling currency_code — server-nested into restatement_value.{adjusted_value,currency_code} — or the nested dict directly), user_identifiers (hashed, ENHANCEMENT only)}.
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

Only adjust conversions you originally reported; RETRACTION must reflect a genuine cancellation/refund, not result-massaging. ENHANCEMENT user data must be hashed and consented (Consent Mode). Never use adjustments to fabricate or inflate value.

Reminder

Adjust only genuine restatements/retractions; ENHANCEMENT identifiers must be hashed + consented, then purged.

Errors

Error classMeansWhat to doRetry
PARTIAL_FAILURESome adjustments failed (e.g., conversion not found, outside the ~54-day window) while others succeeded.Report failed indices + reasons from partial_failure_error; the rest were applied.no
INVALID_ARGUMENTMissing restatement_value for RESTATEMENT, or no order_id/gclid identifier, or bad timestamps.Surface the platform message; supply the required fields and re-preview.no
TOO_RECENT_OR_TOO_OLDThe original conversion is outside the adjustable window (~54 days after the conversion; 55 for Hotel).Adjustments must be within Google's allowed window; report that this conversion cannot be adjusted.no
TOKEN_REVOKEDOAuth token expired/revoked.Refresh and retry once; else prompt reconnect (needs_reauth).yes
CUSTOMER_NOT_FOUNDCustomer ID not found/accessible.Verify the CID is authorized.no
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

  • restatement_value is plain currency, NOT micros.
  • RETRACTION ignores value; it removes the conversion entirely.
  • Identify by order_id (preferred, requires the original upload included it) or gclid+conversion_date_time (less durable).
  • adjustment_date_time must be after the original conversion_date_time and within the ~54-day adjustable window.
  • ENHANCEMENT requires hashed user_identifiers + consent; raw PII must never be logged.
  • Adjusting a conversion that was never uploaded -> not-found row in partial failure.
  • validate_only (preview) and partial_failure (commit) are mutually exclusive.
  • Expired token -> refresh once and retry; preview_id TTL expiry -> re-preview.