> ## Documentation Index
> Fetch the complete documentation index at: https://www.productmetrics.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://www.productmetrics.io/docs/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://www.productmetrics.io/docs/api/mcp.
> Every agent surface: https://www.productmetrics.io/docs/.well-known/llms-manifest.json

# set-up-product-segmentation skill (/docs/agent-skills/set-up-product-segmentation)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 1085 · updated: 2026-11-17 -->
Related: [Product Metrics agent skills](/docs/agent-skills/overview.md), [Install Product Metrics skills](/docs/agent-skills/install.md), [Skills for every store platform and ad channel](/docs/agent-skills/platform-skills.md), [product-metrics: the agent skill that picks the right Product Metrics skill](/docs/agent-skills/product-metrics.md), [set-up-tracking skill](/docs/agent-skills/set-up-tracking.md), [connect-google-ads skill](/docs/agent-skills/connect-google-ads.md)

> The skill an agent uses to choose the custom labels for your segments, tune Product Segmentation settings and product rules, and generate the feed, after you confirm each change.

**`set-up-product-segmentation` sets where your segments go and what they are based on: the Merchant Center custom labels, the segmentation settings and product rules for Shopping and Performance Max.** It previews every change, shows you what it would move between segments, and saves only the exact change you confirm.



* **Use it for:** Custom labels, date range, margin (POAS), a target ROAS anchor, excluded campaigns and product rules.
* **Works through:** The CLI `settings`, `product-rules`, `feed-source-settings` and `feed` commands, or MCP `execute`.
* **You get:** A preview of each change, then a saved change you confirmed and a fresh feed.

## The skill

Full file: [on GitHub](https://github.com/product-metrics/skills/blob/main/plugins/product-metrics/skills/set-up-product-segmentation/SKILL.md) or at [`/.well-known/agent-skills/set-up-product-segmentation/SKILL.md`](https://www.productmetrics.io/docs/.well-known/agent-skills/set-up-product-segmentation/SKILL.md).



```bash
npx skills add product-metrics/skills \
  --skill set-up-product-segmentation
```

## When an agent uses it

* "Write my segments to custom label 2 instead of 0."
* "Judge my products on margin, not revenue."
* "Keep the winter jackets in Stars until the sale ends."

## Example conversation

```text
You:    Judge my products on margin instead of revenue.
Agent:  productmetrics settings get --property-id ... --json
        productmetrics settings preview-strategy --property-id ... --body-file draft.json
        With margin (POAS) on: 38 products move between segments,
        11 of them out of Stars. 2 Stars are out of stock.

        I'll change one field: strategy_adjustments.margin_poas.enabled → true.
        Save it?
You:    Yes.
Agent:  productmetrics settings update ... --if-match '"4"'
        Saved. The feed updates tonight, or now if you want.
```

Example data.

## Commands and tools it uses

| Step          | CLI (operation)                                                                                                                                                           |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Read          | `productmetrics settings get` (`settings.get`), `productmetrics feed-source-settings get`, `productmetrics product-rules list`, `productmetrics product-rules get-impact` |
| Custom labels | `productmetrics feed-source-settings update` (`feed_source_settings.update`)                                                                                              |
| Preview       | `productmetrics settings preview` (`settings.preview`), `productmetrics settings preview-strategy` (`settings.preview_strategy`), `productmetrics product-rules preview`  |
| Save          | `productmetrics settings update` (`settings.update`, with `--if-match`)                                                                                                   |
| Product rules | `productmetrics product-rules create`, `update`, `toggle`, `reorder`, `delete`                                                                                            |
| Feed          | `productmetrics feed generate` (`feed.generate`)                                                                                                                          |

Saves need the `write` scope and an editor or admin; the feed needs a Product Segmentation subscription. Merchant Center must be connected first: [`connect-google-ads`](/docs/agent-skills/connect-google-ads).



> **Note:** Moving the segments to another custom label means campaigns that filter on the old label stop matching. The skill tells you which campaigns to change in Google Ads; you make that change.

## Where next



* [check-product-segments skill](/docs/agent-skills/check-product-segments): what each segment holds, read only
* [check-campaign-structure skill](/docs/agent-skills/check-campaign-structure): campaigns built on the segments
* [Settings API](/docs/api/settings): every settings, product rule and feed operation
