> ## 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 Product Partitions

> Set the product partition tree of a Microsoft Ads Shopping ad group: bid on all products equally, or split the catalog by brand, category, product type, or custom label with per-group bids and excl...

Set the product partition tree of a Microsoft Ads Shopping ad group: bid on all products equally, or split the catalog by brand, category, product type, or custom label with per-group bids and exclusions. Replaces any existing tree.

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

## Inputs

| Field            | Type                                                                      | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ---------------- | ------------------------------------------------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`        | object or array of object or MicrosoftAdsAccountItem or string or integer | Yes      | -       | Select the Microsoft Ads account that owns the ad group.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `ad_group_id`    | string or SelectItem                                                      | Yes      | -       | The ad group ID to set product partitions on. The ad group must belong to a Shopping campaign.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `bid`            | number or string                                                          | Yes      | -       | Default CPC bid in the account currency, for example 0.5. Used for the 'All products' node when no partitions are provided, and for the 'Everything else' node when partitions are provided.                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `partitions`     | array (also accepts a comma-separated string)                             | No       | -       | Optional single-level split of the catalog, one row per product group. Columns: 'operand' (Brand, CategoryL1-5, Condition, CustomLabel0-4, Id, ProductType1-5, Channel, ChannelExclusivity, GTIN, MPN), 'value' (the catalog attribute to match, for example a brand name), optional 'bid' (falls back to the default bid), optional 'exclude' (true to exclude the group instead of bidding). All rows must use the same operand. A biddable or excluded 'Everything else' node is added automatically. Leave empty to bid on all products equally. Example row: \{"operand": "Brand", "value": "Contoso", "bid": 0.8} |
| `exclude_others` | boolean                                                                   | No       | `False` | Only used when partitions are provided. If true, products not matching any partition row are excluded instead of receiving the default bid.                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

### MicrosoftAdsAccountItem

| Field        | Type   | Required | Default | Description                                                                                                     |
| ------------ | ------ | -------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| `value`      | string | Yes      | -       |                                                                                                                 |
| `label`      | string | Yes      | -       |                                                                                                                 |
| `customerId` | string | No       | -       | The Microsoft Ads customer ID used for REST CustomerId headers. If omitted, it is resolved from the account ID. |

### 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. |

## Output

**Type**: `Dict`

Returns the applied product partition nodes including their criterion IDs.

**Fields**: `message`, `ad_group_id`, `replaced_existing_tree`, `nodes`
