> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Listing Groups

> Build or replace the listing group (product group) tree on a Shopping ad group

Build or replace the listing group (product group) tree on a Shopping ad group.

|                       |                              |
| --------------------- | ---------------------------- |
| **App**               | Google Ads                   |
| **Operation ID**      | `gads_update_listing_groups` |
| **Type**              | Action                       |
| **Connection**        | `gads` (required)            |
| **Credits per run**   | 1                            |
| **Agent / MCP tool**  | Yes                          |
| **Requires approval** | Yes (write operation)        |

## Inputs

| Field      | Type                                                              | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------- | ----------------------------------------------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`  | GadsAccountItem or object or array of object or string or integer | Yes      | -       | Select the Google Ads account, ask user for it if not provided                                                                                                                                                                                                                                                                                                                                |
| `ad_group` | string or SelectItem                                              | Yes      | -       | The Shopping ad group to attach the listing group tree to. Must be a SHOPPING\_PRODUCT\_ADS ad group.                                                                                                                                                                                                                                                                                         |
| `nodes`    | string or array of ListingNode                                    | Yes      | -       | The full listing group tree as a flat list of nodes. Provide exactly one root (SUBDIVISION with no parent\_temp\_id and no case\_value). Each SUBDIVISION must have at least one biddable child plus an 'Other' sibling (a node whose case\_value has type matching its siblings but no value). All sibling nodes must share the same dimension type. Accepts either a JSON string or a list. |

### GadsAccountItem

| Field       | Type   | Required | Default | Description                                                                                                                                                    |
| ----------- | ------ | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `value`     | string | Yes      | -       |                                                                                                                                                                |
| `label`     | string | Yes      | -       |                                                                                                                                                                |
| `managerId` | string | Yes      | -       | The manager ID for the Google Ads account. Ask  user to use the dropdown to select accounts, this manager id is selected background and not shown to the user. |

### ListingNode

A single node in the listing group tree.

| Field            | Type                         | Required | Default | Description                                                                                                                                                                    |
| ---------------- | ---------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `temp_id`        | integer                      | Yes      | -       | Negative integer that uniquely identifies this node within the request (e.g. -1, -2, ...). Used to wire children to parents.                                                   |
| `parent_temp_id` | integer                      | No       | -       | temp\_id of the parent SUBDIVISION node. Null for the root.                                                                                                                    |
| `type`           | enum (`SUBDIVISION`, `UNIT`) | Yes      | -       | SUBDIVISION (parent / non-leaf) or UNIT (biddable leaf).                                                                                                                       |
| `case_value`     | ListingDimension             | No       | -       | Dimension that places this node inside its parent's partition. Required for every non-root node. Omit on the root node.                                                        |
| `cpc_bid`        | number                       | No       | -       | CPC bid in account currency (e.g. 0.20 for \$0.20). Only valid on UNIT nodes. Required on non-negative UNITs when the campaign uses Manual CPC; ignored for automated bidding. |
| `negative`       | boolean                      | No       | `False` | If true, exclude products matching this UNIT from serving. Only valid on UNIT nodes; bids are not applied to negative units.                                                   |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### ListingDimension

Describes the case\_value dimension of a listing group node.

| Field                 | Type                                                                                                                 | Required | Default | Description                                                                                                                                                                   |
| --------------------- | -------------------------------------------------------------------------------------------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`                | enum (`BRAND`, `CONDITION`, `ITEM_ID`, `CUSTOM_LABEL`, `PRODUCT_TYPE`, `CATEGORY`, `CHANNEL`, `CHANNEL_EXCLUSIVITY`) | Yes      | -       | Dimension type. One of: BRAND, CONDITION, ITEM\_ID, CUSTOM\_LABEL, PRODUCT\_TYPE, CATEGORY, CHANNEL, CHANNEL\_EXCLUSIVITY.                                                    |
| `value`               | string                                                                                                               | No       | -       | Value for the dimension. Used by BRAND (e.g. 'Nike'), ITEM\_ID (merchant offer id), CUSTOM\_LABEL (label string), PRODUCT\_TYPE (type name). Leave null for the 'Other' node. |
| `condition`           | string                                                                                                               | No       | -       | Condition enum: NEW, USED, REFURBISHED. Used when type=CONDITION.                                                                                                             |
| `channel`             | string                                                                                                               | No       | -       | Channel enum: ONLINE, LOCAL. Used when type=CHANNEL.                                                                                                                          |
| `channel_exclusivity` | string                                                                                                               | No       | -       | Channel exclusivity enum: SINGLE\_CHANNEL, MULTI\_CHANNEL. Used when type=CHANNEL\_EXCLUSIVITY.                                                                               |
| `index`               | integer                                                                                                              | No       | -       | Index 0-4 for CUSTOM\_LABEL (which custom\_label\_0..4 is used) or for PRODUCT\_TYPE (which product type level 1-5 is used, 1-indexed).                                       |
| `category_id`         | integer                                                                                                              | No       | -       | Numeric Google product category id. Used when type=CATEGORY.                                                                                                                  |
| `category_level`      | integer                                                                                                              | No       | -       | Product category level (1-5). Used when type=CATEGORY or PRODUCT\_TYPE if `index` is not provided.                                                                            |

## Output

**Type**: `Dict`

Returns counts and resource names for the created criteria.

**Fields**: `ad_group_id`, `criteria_count`, `resource_names`, `temp_id_to_resource_name`
