# Product variant matrix generator

- Human page: https://happytails.ai/en/data-tools/product-variant-matrix-generator/
- Markdown: https://happytails.ai/en/data-tools/product-variant-matrix-generator.md
- Structured JSON: https://happytails.ai/agents/en/data-tools/product-variant-matrix-generator/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `product-variant-matrix-generator` |
| Category | data-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Automatic updates after valid input or file selection. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Paste a JSON object of named arrays, for example {"size":["S","M"],"colour":["Red","Blue"]}. Use 1 to 10 options with distinct nonempty values, up to 200 characters each. The full product must fit 10,000 combinations and 100,000 cells before exclusions. No partial export. SKU collisions are retained and reported, never silently renamed. Runs on your device.

### Inputs and settings

Text input: Product option sets.

Example or placeholder shown in the interface (not a validated fixture):

```text
JSON object of arrays
```

Example: {"size":["S","M"],"colour":["Red","Blue"]} Results update as you type. Up to 1,000,000 characters.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `exclusions` | Exact exclusion rules | textarea | "[]" |  |
| `template` | Optional SKU template | text | "" |  |
| `separator` | SKU separator | text | "-" |  |
| `padding` | Sequence zero padding | number | 0 | min=0 max=12 step=1 |
| `maxLength` | Maximum SKU length | number | 100 | min=1 max=500 step=1 |
| `exportMode` | Spreadsheet formula handling | select | "Protect formulas" | Allowed: Protect formulas, Preserve original cells |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

The complete product must fit 10,000 combinations and 100,000 cells before exclusions. Each exclusion matches all named values exactly; overlapping exclusions count once. No partial result is exported. Maximum 1,000,000 input characters, 10,000 records and 100,000 result cells. CSV output is bounded to 4,000,000 characters.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "product-variant-matrix-generator",
  "category": "data-tools",
  "built": true,
  "requirements": "The complete product must fit 10,000 combinations and 100,000 cells before exclusions. Each exclusion matches all named values exactly; overlapping exclusions count once. No partial result is exported. Maximum 1,000,000 input characters, 10,000 records and 100,000 result cells. CSV output is bounded to 4,000,000 characters.",
  "implementation": {
    "fields": [
      {
        "key": "exclusions",
        "label": "Exact exclusion rules",
        "value": "[]",
        "type": "textarea",
        "help": "JSON array, for example [{\"size\":\"S\",\"colour\":\"Red\"}]. Each object matches all its values exactly. Separate objects match independently. Unknown attributes or values are rejected."
      },
      {
        "key": "template",
        "label": "Optional SKU template",
        "value": "",
        "type": "text",
        "help": "For example {size}{sep}{colour}{sep}{n}. Leave empty for combinations only. {n} is the retained one-based sequence."
      },
      {
        "key": "separator",
        "label": "SKU separator",
        "value": "-",
        "type": "text"
      },
      {
        "key": "padding",
        "label": "Sequence zero padding",
        "value": 0,
        "type": "number",
        "min": 0,
        "max": 12,
        "step": 1
      },
      {
        "key": "maxLength",
        "label": "Maximum SKU length",
        "value": 100,
        "type": "number",
        "min": 1,
        "max": 500,
        "step": 1
      },
      {
        "key": "exportMode",
        "label": "Spreadsheet formula handling",
        "value": "Protect formulas",
        "type": "select",
        "values": [
          "Protect formulas",
          "Preserve original cells"
        ]
      }
    ],
    "live": true,
    "background": true,
    "presentation": "metrics",
    "note": "Paste a JSON object of named arrays, for example {\"size\":[\"S\",\"M\"],\"colour\":[\"Red\",\"Blue\"]}. Use 1 to 10 options with distinct nonempty values, up to 200 characters each. The full product must fit 10,000 combinations and 100,000 cells before exclusions. No partial export. SKU collisions are retained and reported, never silently renamed. Runs on your device.",
    "experience": {
      "automatic": true,
      "single": false,
      "inputMaxLength": 1000000,
      "inputMode": "text",
      "label": "Product option sets",
      "placeholder": "JSON object of arrays",
      "help": "Example: {\"size\":[\"S\",\"M\"],\"colour\":[\"Red\",\"Blue\"]} Results update as you type. Up to 1,000,000 characters.",
      "action": null
    },
    "mode": "automatic",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Generate exact option combinations, remove explicit exclusions and optionally produce SKUs with visible collision reports.

### How to use Product variant matrix generator

1. Paste a JSON object mapping each option name to a list of distinct values.
2. Add exact exclusion objects and an optional SKU template.
3. Review kept and excluded counts, then download the complete CSV and JSON report.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

## Useful next steps

- [GTIN check digit calculator](https://happytails.ai/en/data-tools/gtin-check-digit-calculator/) ([Markdown](https://happytails.ai/en/data-tools/gtin-check-digit-calculator.md))

- [Product feed validator](https://happytails.ai/en/data-tools/product-feed-validator/) ([Markdown](https://happytails.ai/en/data-tools/product-feed-validator.md))

- [SKU naming generator](https://happytails.ai/en/data-tools/sku-naming-generator/) ([Markdown](https://happytails.ai/en/data-tools/sku-naming-generator.md))

## Exact matching and predictable order

Option names and values are case-sensitive. Results follow the input option and value order. A template can reference option names, {sep} and the retained sequence {n}. Empty, oversized or colliding SKUs remain visible for correction.

### Local processing and exports

Processing runs on your device. CSV downloads quote every cell and protect formula prefixes by default. JSON preserves original strings and includes the report and result tables. Spreadsheet import settings can still change identifiers; import them as text.
