# Supplier CSV to WooCommerce Variations — Files + Exceptions (`winstonvale/supplier-csv-to-woocommerce-variations`) Actor

Turn a generic supplier CSV into draft WooCommerce parent/variation rows, a source map, and explicit exceptions. Up to 10,000 rows; no store access or guessed matches.

- **URL**: https://apify.com/winstonvale/supplier-csv-to-woocommerce-variations.md
- **Developed by:** [Winston Vale](https://apify.com/winstonvale) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.995 / completed corrected-file bundle

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Supplier CSV to WooCommerce Variations — Files + Exceptions

Have a generic supplier catalog but no WooCommerce-specific file? Convert one
declared supplier CSV into a reviewable draft WooCommerce import without giving
an automation access to your store. One run handles up to 10,000 data rows and
also delivers a row-by-row source map plus a separate exceptions file for
relationships it cannot establish truthfully.

### Good fit

Use this Actor when you or your implementer can identify the source columns and
parent-SKU pattern, but need deterministic parent/variation rows, normalized
size or color labels, case-to-each inventory conversion, and an audit trail.
This is a file-preparation step for a controlled WooCommerce import—not a store
repair service, product-information manager, or recurring supplier sync.

Do not buy a run expecting it to infer unknown relationships, clean arbitrary
descriptions or categories, modify an existing store, or process more than
10,000 rows. Review the free public synthetic input and actual output first:
https://github.com/troublerone/winston-supplier-catalog-sample

The same input and mapping are prefilled in this Apify Example Task:
https://apify.com/winstonvale/supplier-csv-to-woocommerce-variations/examples/prepare-supplier-csv-for-woocommerce-variations
Starting the task is a paid USD 9 completed-bundle run; inspect the free files
above, then replace the synthetic CSV and mapping with your own before running.

This first version is intentionally narrow: UTF-8 comma-delimited CSV, one
declared schema, at most 10 MiB and 10,000 data rows. You identify the source
columns, the parent-token pattern, any removable case-pack SKU suffix, and unit
and variant synonyms. Missing parents, missing case sizes, duplicates, unsafe
spreadsheet formulas, and unsupported units are excluded as explicit exceptions
instead of guessed.

The outputs are:

- `woocommerce-corrected.csv` — draft parent, variation, and simple-product rows;
- `source-to-output-mapping.csv` — one decision for every source row;
- `exceptions.csv` — every refused row and the required correction; and
- `OUTPUT` plus a dataset manifest containing counts and SHA-256 hashes.

The Actor does not connect to or write to WooCommerce. Review the draft and keep
a backup before importing it. An exception-bearing completed bundle is useful
and chargeable; a fatal input or schema failure does not produce the bundle
event.

### Billing recovery

`OUTPUT` reports `chargeState`, `bundleChargedCount`, and
`reconciliationRequired` separately from conversion status. A pre-charge
artifact write or readback failure records zero bundle charges. A confirmed
charge remains recorded as confirmed even if the final summary write fails. If
the platform charge call returns an exception or unusable response, the count is
`null` and the state requires reconciliation against the run's platform event
records before any retry. Never rerun an ambiguous or confirmed-charge request
merely because its final `OUTPUT` is incomplete.

### Price

A completed bundle costs **USD 9.000**: Apify's one-time USD 0.005 Actor-start
event plus one USD 8.995 `corrected-file-bundle` event after all files have been
stored and read back successfully. There is no dataset-item charge and platform
usage is included. The USD 0.005 start event can still apply when fatal input
validation prevents a bundle; the USD 8.995 event does not.

Set the maximum total charge to at least USD 9.000. Output records are stored in
the run's default Apify storage. Treat their URLs as data-bearing links, not as a
confidentiality guarantee, and download the files promptly. Retention and access
depend on your Apify plan and storage settings.

This tool does not prove an arbitrary supplier catalog will import into a live
store. It provides a reviewable draft from the declared mapping and records what
it refused.

# Actor input Schema

## `supplierCsv` (type: `string`):

One UTF-8 comma-delimited CSV, at most 10 MiB and 10,000 data rows.

## `mapping` (type: `object`):

Column names, a safe parent-token rule, explicit SKU suffix removal, and synonym lists. Unknown relationships become exceptions.

## `maxRows` (type: `integer`):

Optional lower run ceiling; the product hard limit is 10,000.

## Actor input object example

```json
{
  "mapping": {
    "supplierSkuColumn": "supplier_sku",
    "productNameColumn": "supplier_product_name",
    "parentTokenRegex": "^([A-Z][0-9]{3})-",
    "caseSkuSuffixRegex": "-CASE$",
    "sizeColumn": "size_label",
    "colorColumn": "color_label",
    "inventoryCountColumn": "inventory_count",
    "inventoryUomColumn": "inventory_uom",
    "caseSizeColumn": "case_size",
    "retailPriceColumn": "sell_price_each_usd",
    "sizeSynonyms": {
      "S": "Small",
      "M": "Medium",
      "L": "Large",
      "XL": "Extra Large"
    },
    "colorSynonyms": {},
    "eachSynonyms": [
      "EA",
      "each"
    ],
    "caseSynonyms": [
      "case",
      "cases"
    ]
  },
  "maxRows": 10000
}
```

# Actor output Schema

## `summary` (type: `string`):

No description

## `woocommerceCsv` (type: `string`):

No description

## `sourceMapCsv` (type: `string`):

No description

## `exceptionsCsv` (type: `string`):

No description

## `manifest` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("winstonvale/supplier-csv-to-woocommerce-variations").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("winstonvale/supplier-csv-to-woocommerce-variations").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call winstonvale/supplier-csv-to-woocommerce-variations --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,winstonvale/supplier-csv-to-woocommerce-variations"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YKuPAWZaN7RMc3Npb/builds/bBNoGhpnpgBwPSPAP/openapi.json
