gads_add_customer_match_members
Google Ads write high risk
Part of the Google Ads Audience Agent.
What it does
Add (upload) members to a Customer Match list. Members: on the Ads API (OfflineUserDataJob) path each identifier is sent as given, so pass SHA-256 hashes of the normalized values (hashed_email, hashed_phone_number, address_info hashed names). Consent (Google Ads API guide 'Get started with Customer Match'): missing consent counts as not consented for EEA users, whose data Google then does not process, and DENIED is rejected by Google; Google's EU user consent policy also covers the UK and Switzerland. The preview warns on both. CURRENT-STATE CONSTRAINT (verified 2026-06): Google is migrating Customer Match ingestion to the Data Manager API. Since April 1, 2026 the Google Ads API path (OfflineUserDataJobService/UserDataService) is DISABLED for developer tokens that did NOT upload Customer Match data in the prior 180 days — these return CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE and must route to the Data Manager API. Tokens that uploaded within 180 days still work on the Ads API path for now, but should migrate. The ingestion path (Google Ads API OfflineUserDataJob) is named in the preview; Google's refusal (e.g. CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE) comes back as an error, never as success. WRITE with preview->approve->commit: preview shows the member count + consent state (with the consent warnings) + which ingestion path will be used + preview_id; commit performs the upload and writes an audit entry. Async: returns a job/operation reference; matching is processed by Google over time. Member values are never logged or stored by Scalix. PREVIEW SEMANTICS (Customer Match differs): OfflineUserDataJob has NO validation mode, so the preview is approval-only — NOTHING is checked with Google until commit. [KNOWN LIMITATION] Since April 1, 2026 Google rejects legacy Customer Match uploads for developer tokens not historically allowlisted (not_allowlisted_error.CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE) — this is token-level and fails on EVERY account, real or test; the supported path is Google's Data Manager API (legacy sunset March 2027). Scalix does not offer the Data Manager path, so a developer token Google has cut off cannot upload or remove members through Scalix; say so plainly. The preview response still 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 load consented first-party customers into a Customer Match list. Preview the hashed-member count, consent state, and the ingestion path; confirm the data is consented first-party; then commit. If Google refuses the Ads API path for this token (no upload in 180 days, since 2026-04-01), tell the user explicitly that Google now requires its Data Manager API for this developer token, which Scalix does not offer; do not retry the Ads API path.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. |
user_list_id | string | yes | Target Customer Match list ID (create via gads_create_customer_match_list). |
members | array | yes | Array of identifier objects. On the Ads API path each key is a UserIdentifier field, sent as given: hashed_email / hashed_phone_number (SHA-256 hex of the normalized value: email trimmed and lower-cased, phone in E.164), mobile_id, third_party_user_id, or address_info {hashed_first_name, hashed_last_name, country_code, postal_code}; another key fails at commit. Member values are never logged. Identifier type must match the list's upload_key_type. |
consent_ad_user_data | string | no | GRANTED / DENIED / UNSPECIFIED (enum-normalized; another value is refused). Unset or UNSPECIFIED counts as not consented for EEA users, and DENIED is rejected by Google; the preview warns on both. Google's EU user consent policy covers the EEA, the UK and Switzerland. |
consent_ad_personalization | string | no | GRANTED / DENIED / UNSPECIFIED (enum-normalized; another value is refused). Unset or UNSPECIFIED counts as not consented for EEA users, and DENIED is rejected by Google; the preview warns on both. Google's EU user consent policy covers the EEA, the UK and Switzerland. |
manager_id | string | no | Optional MCC login-customer-id. |
validate_only | boolean | no | Optional. 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_id | string | no | Omit 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 upload first-party data the advertiser collected with consent under Google's Customer Match policy; hash all PII (SHA-256 over normalized values) before sending; for EEA/UK/CH set ad_user_data + ad_personalization consent. Never pool members across accounts, never use for enrichment, and never target protected classes (employment/housing/education/credit). Uploads of non-consented EEA data are dropped by Google.
Reminder
PII is hashed then purged immediately; first-party consented data only; no cross-account pooling or enrichment.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE | This developer token is not allowlisted for Customer Match uploads via the Ads API (no upload in the prior 180 days; cut off since 2026-04-01). | Tell the user Google now requires its Data Manager API for this developer token, which Scalix does not offer; do not retry the Ads API path. Inform the user the Ads API path is closed for this token. | no |
CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS | Customer Match / customer-data terms not accepted, or consent ad_user_data/ad_personalization is DENIED so the job is rejected. | Confirm Customer Match terms accepted and set consent to GRANTED for EEA/UK/CH; otherwise the data cannot be used. | no |
PARTIAL_FAILURE | Some member rows were rejected (bad hash/format) while others succeeded. | The result does not list the dropped rows yet: tell the user some rows may have been dropped, and check the list's size later. | no |
INVALID_ARGUMENT | Member identifiers malformed (e.g., non-E.164 phone, empty identifiers, type mismatch vs list upload_key_type). | Surface the platform message; fix normalization and re-preview. | no |
TOKEN_REVOKED | OAuth token expired/revoked. | Refresh and retry once; else prompt reconnect (needs_reauth). | yes |
PERMISSION_DENIED | No access, out-of-bearer-scope write, or missing Data Manager ingestion scope. | Confirm access and the required data-ingestion scope; else refuse. | no |
RESOURCE_EXHAUSTED | Rate/quota exceeded (HTTP 429). | Backoff 5/10/20s cap 60s, honoring retryDelay, then retry. | yes |
INTERNAL_ERROR | Transient server error (5xx). | Retry after backoff. | yes |
Edge cases
- Ads API path is closed for non-allowlisted tokens since 2026-04-01 -> Google's CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE comes back at commit; never report success on a closed path.
- Active tokens (uploaded within 180 days) still work on the Ads API path — the tool does not refuse up front.
- Upload is async — success means 'submitted', not 'matched'; matching takes hours and match rates vary.
- Google advises uploading at least 5,000 members to have enough matched, active users for targeting (Google Ads API guide, Get started with Customer Match) — small uploads won't activate targeting.
- EEA users without consent are not processed by Google -> the preview warns when consent is unset, so the effective audience may be smaller than the upload.
- Partial failure (Ads API path): Google drops malformed rows and keeps the rest (enable_partial_failure); the result does not list the dropped rows yet.
- Raw PII must never be logged; only hashed identifiers and counts may appear in responses/audit.
- preview_id TTL expiry -> re-preview; expired token -> refresh once and retry.