SCALIX help

← All tools

gads_get_account_info

Google Ads read low risk

Part of the Google Ads Manager Agent.

What it does

Fetch descriptive settings for a single Google Ads customer account: id, descriptive_name, currency_code, time_zone, auto_tagging_enabled, manager (is this account an MCC), test_account, status, and optimization_score / optimization_score_weight. Runs a one-row GAQL query (SELECT ... FROM customer LIMIT 1) via GoogleAdsService. ACCURACY NOTES: currency_code and time_zone here are the authoritative basis for interpreting every money (micros/1e6) and date/dayparting figure from other tools - always resolve them before displaying spend or daypart slots; optimization_score is a 0-1 ratio (multiply by 100 for the percentage shown in the UI) and is Google's advisory figure, not a guarantee. The 'manager' flag tells you whether metrics queries against this account will fail (MCCs hold no performance data). Returns {success, data:{account fields}, count, warnings}.

When to use it

When the user asks about the account itself — its currency, timezone, name, status, or auto-tagging — or you need currency/timezone context before doing money math.

Inputs

NameTypeRequiredDescription
customer_idstringyesThe account to describe, 10 digits, dashes stripped. The customer.* row returned is for this account.
manager_idstringnoManager (MCC) login-customer-id, dashes stripped. Required only when reaching the target through a manager; omit when the user's own credentials own the account.

Safeguards

Policy

Read-only account metadata under the adwords scope. Returns only the single account named in customer_id, bound to the server-derived tenant context and Postgres RLS; never return settings for an account the bearer is not authorized for. Reconcile currency/time_zone to the Google Ads UI; optimization_score must be presented as Google's own advisory figure, not a Scalix-computed score.

Reminder

Match the Google Ads UI; treat the account name/currency/timezone as the canonical basis for all downstream money and date formatting; do not retain beyond this request.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDThe customer_id does not exist or is unreachable with these credentials (RequestError.CUSTOMER_NOT_FOUND / AuthenticationError.CUSTOMER_NOT_FOUND).Verify via accessible-customers/hierarchy; if previously reachable, refresh token or prompt re-auth (needs_reauth).no
TOKEN_REVOKEDOAuth token expired/invalid/revoked (UNAUTHENTICATED / OAUTH_TOKEN_REVOKED).Refresh once and retry; else prompt re-authorization (needs_reauth).yes
PERMISSION_DENIEDAuthorizationError.USER_PERMISSION_DENIED or CustomerError.CUSTOMER_NOT_ENABLED - no access, or the account is suspended/cancelled/closed.Confirm user access; if CUSTOMER_NOT_ENABLED, tell the user to check account status/billing at ads.google.com. Do not retry.no
RESOURCE_EXHAUSTEDDaily-operations quota exceeded (QuotaError, HTTP 429).If daily cap, stop until reset; else backoff 5/10/20s (cap 60s), then retry.yes
RESOURCE_TEMPORARILY_EXHAUSTEDPer-second QPS rate limit hit (HTTP 429).Backoff 5/10/20s (cap 60s), then retry; throttle concurrency.yes
PLATFORM_UNAVAILABLEGoogle internal/transient error (HTTP 5xx).Retry with backoff; report transient outage if persistent.yes

Edge cases

  • Query returns no row (account hidden/closed) -> success:false with a clear 'account not found or not accessible' message rather than an empty success.
  • manager=true -> flag it so the agent knows metrics queries against this id will fail; suggest gads_get_account_hierarchy to find client accounts.
  • test_account=true -> note it; metrics belong to the test environment, not production spend.
  • optimization_score is a 0-1 ratio -> multiply by 100 for the UI percentage; may be absent/0 for new, manager, or low-traffic accounts.
  • currency_code/time_zone must be applied to all downstream micros/1e6 and dayparting outputs to avoid mislabeling spend or daypart hours.
  • Expired token -> refresh once and retry before surfacing needs_reauth.