SCALIX help

← All tools

gads_create_product_group

Google Ads write high risk

Part of the Shopping Campaign Agent.

What it does

Create a listing-group (product-group) node in a Shopping or Demand Gen product ad group (AdGroupCriterion.listing_group): a UNIT (leaf, biddable) with a case_value (brand, item id, category, custom label, condition, product type, channel), or a SUBDIVISION together with its children in ONE request — Google refuses a subdivision without its children and an 'Other' node (Google Ads API guide 'Create shopping listing groups'). The subdivision gets the temporary name ~-1 and its children point at it; replaces_unit removes an existing UNIT in the same request, to subdivide it. Siblings share child_dimension; exactly one child is the 'Other' node (case_value null, sent as the dimension with no value); bids (cpc_bid_micros) go on UNIT nodes only; these are refused before the API. The ad group's campaign type is read first: anything but Shopping or Demand Gen is refused. Performance Max retail uses asset-group listing-group filters, which this tool doesn't create. The commit returns the created resource_names. Accuracy: bids in micros (value x 1e6). Flow: preview (validate_only=true: Google validates the whole partition) -> diff (tree structure, bids) -> approval -> execute (atomic) -> confirm + immutable audit log. 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

Structuring Shopping product groups. Use to structure Shopping bidding by brand/category/custom-label etc. Always include the 'Other' catch-all when subdividing, set bids only on UNIT nodes (in micros), and submit the full subtree in one request. Preview partition completeness before executing.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
ad_group_idstringyesShopping or Demand Gen product ad group ID (Performance Max asset groups are not handled).
parent_nodestringnoResource name of the existing subdivision this node partitions; omit for the root.
node_typestringyesSUBDIVISION or UNIT (default UNIT, or SUBDIVISION when children are given).
dimensionstringnoDimension of this node's own case_value (its parent's partition): BRAND/ITEM_ID/PRODUCT_CATEGORY/CATEGORY_L1..L5/PRODUCT_TYPE/TYPE_L1..L5/CONDITION/CHANNEL/CUSTOM_LABEL_0..4; enum-normalized.
case_valuestringnoThe value for this node (e.g., brand 'Nike'); null/empty with a dimension and parent_node makes it that dimension's 'Other' catch-all sibling. The root has none.
cpc_bid_microsintegernoBid in micros (value x 1e6); UNIT nodes only; refused on a SUBDIVISION (put bids on its children).
childrenarray<object>noFor a SUBDIVISION: its children, created in the same request: [{case_value, cpc_bid_micros?, negative?}], all on child_dimension. Exactly one has case_value null: the 'Other' node (everything else). negative=true excludes that partition (no bid).
child_dimensionstringnoThe dimension the children partition on (siblings share one dimension); same names as dimension.
replaces_unitstringnoResource name of an existing UNIT this SUBDIVISION replaces (e.g. an 'All products' root): removed in the same request, as Google requires to subdivide a unit. Give the new subdivision the same parent_node and case value it had.
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

Product groups organize feed products; products must comply with Shopping policy (accurate price/availability/identity, no prohibited/counterfeit items, no misrepresentation). Subdividing is not a way to surface disapproved products (Circumventing Systems = egregious).

Reminder

Operates on feed product attributes, not user data; account-isolated; nothing retained beyond this request.

Errors

Error classMeansWhat to doRetry
LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERA subdivision is not fully partitioned (missing the 'Other' catch-all node).Add the empty-case_value 'Other' UNIT/subdivision sibling and retry.no
LISTING_GROUP_BID_ON_SUBDIVISIONcpc_bid_micros set on a SUBDIVISION node.Move the bid to UNIT (leaf) nodes only.no
LISTING_GROUP_ALREADY_EXISTSA node with the same case_value already exists under the parent.De-duplicate; subdivide the existing node instead.no
INVALID_ARGUMENTBad dimension/case_value or malformed tree (orphan node).Surface the platform message; correct the tree.no
TOKEN_REVOKEDToken revoked/expired.Set needs_reauth; prompt reconnect.no
RESOURCE_EXHAUSTEDQuota/QPS exceeded (HTTP 429).Backoff 5/10/20s cap 60s, retry once.yes
PLATFORM_UNAVAILABLEBackend 5xx/INTERNAL.Retry once after backoff.yes

Edge cases

  • Every subdivision MUST include an 'Other' (empty case_value) node or the mutate fails -> refused before the API unless children has exactly one case_value null.
  • Bids allowed only on UNIT nodes; SUBDIVISION + bid -> refused before the API.
  • A subdivision and its children go in one request (temp id ~-1 for the subdivision); a deeper level is another call with parent_node set to the subdivision created.
  • Converting a UNIT to a SUBDIVISION = remove the UNIT and add subdivision + children atomically -> pass the UNIT as replaces_unit.
  • Performance Max retail uses asset-group listing-group filters (it has no ad groups), which this tool doesn't create; an ad group of another campaign type is refused.
  • validate_only=true creates nothing; preview TTL expiry -> re-preview.