# Shopify Product CSV Preflight Checker (`rishabhbalabomma/shopify-product-csv-preflight`) Actor

Check Shopify product CSVs before import. Find duplicate variants, broken headers, invalid prices and inventory risks. Get row-level fixes, JSON and an issues CSV. Supports current and legacy headers; no store connection or automatic changes.

- **URL**: https://apify.com/rishabhbalabomma/shopify-product-csv-preflight.md
- **Developed by:** [Rishabh Balabomma](https://apify.com/rishabhbalabomma) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.25 / completed csv report

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

## Shopify Product CSV Preflight Checker

Find common product CSV problems before attempting an import. Paste your CSV and receive a report with the exact row, affected column, issue and suggested correction. Useful for merchants, catalog assistants and agencies preparing repeated imports.

This is an independent tool. It checks selected file rules and cannot guarantee Shopify will accept an import. It never connects to or changes your store.

### What you get

- A summary: rows checked, product groups, variant rows, errors and warnings.
- Row-level findings for malformed rows, missing required headers, duplicate variants, inconsistent option names, duplicate SKUs, invalid prices and inventory risks.
- A full JSON report and a downloadable issues CSV.
- Support for both current product headers and common legacy headers, quoted commas, multi-line cells and UTF-8 BOMs.

Extra image rows are distinguished from variant rows. SKU strings keep their leading zeros. The tool reports issues without silently changing your data.

### Run it

1. Export or prepare a Shopify **product** CSV, then paste its text into **Product CSV text**.
2. Choose **Create new products** or **Update existing products**.
3. Select whether the store has one or multiple inventory locations, if known.
4. Run the Actor and open the full report or issues CSV from the output.

Maximum input: **1 MiB**, **5000 non-empty data rows**, **300 columns**. Findings are capped at 1000; summary counts include additional findings. A malformed quoted row stops parsing and marks the report incomplete. Oversized or empty input fails validation.

### Example

The prefilled example is synthetic:

```csv
Handle,Title,Option1 Name,Option1 Value,Variant SKU,Variant Price
demo-shirt,Demo Shirt,Size,S,SHIRT-001,19.99
demo-shirt,,Size,S,SHIRT-002,$24.00
```

The report flags row 3 because the size duplicates row 2 and the price contains a currency symbol. It does not guess the intended size or currency.

```json
{
  "summary": {
    "rowsChecked": 2,
    "errors": 2,
    "warnings": 0,
    "verdict": "FIX_ERRORS"
  }
}
```

The full output also contains `issues`, `limitations` and a reference to Shopify's rules. API users can read the single dataset report item or the `REPORT` key-value record. `ISSUES.csv` contains the flat findings.

### Interpreting the result

- **FIX\_ERRORS**: correct the reported errors and run the checker again.
- **REVIEW\_WARNINGS**: review inventory, price or update risks with your actual store settings.
- **NO\_ISSUES\_IN\_CHECKED\_RULES**: the implemented checks found no issues. Other Shopify rules and store-specific conflicts can still cause an import to fail.

Update mode always reminds you that existing store state was not checked. Keep a backup and test a small import before changing a catalog.

### Limits and data handling

This version does not check inventory CSVs, live store state, category taxonomies, metafield definitions, custom fulfillment integrations, remote image reachability or existing variant IDs. It does not generate or import a corrected file.

The Actor uses deterministic Python rules, without an LLM call, paid API or third-party enrichment service. CSV text is processed on Apify and stored as the run input under Apify's normal storage controls; results are stored in the run dataset and key-value store. The code does not log the input or transmit it to outside services. Only provide product data you are authorized to process. You can delete run/storage records through your Apify account.

One completed report is the intended billing unit. The pricing shown in Apify Console at run time is authoritative. Each run produces one report, even when many issues are found; individual errors are not separate billing units.

Report bugs through the Actor's Issues tab with a small redacted or synthetic example. Rules were checked against Shopify documentation on September 6, 2026.

### Local verification

```sh
python -m unittest discover -s tests -v
```

The checker itself uses the Python standard library. The cloud runner uses the Apify SDK pinned in `requirements.txt`.

# Actor input Schema

## `csvText` (type: `string`):

Paste UTF-8 comma-separated CSV including its header. Maximum 1 MiB and 5000 non-empty data rows. New and legacy Shopify product headers supported. No URL fetch or store connection.

## `mode` (type: `string`):

Update mode adds checks for handle requirements and variant replacement risks. The checker cannot see your existing store.

## `inventoryLocations` (type: `string`):

Product CSV inventory quantities apply to single-location stores. Choose unknown if unsure.

## Actor input object example

```json
{
  "csvText": "Handle,Title,Option1 Name,Option1 Value,Variant SKU,Variant Price\ndemo-shirt,Demo Shirt,Size,S,SHIRT-001,19.99\ndemo-shirt,,Size,S,SHIRT-002,$24.00\n",
  "mode": "new",
  "inventoryLocations": "unknown"
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `report` (type: `string`):

No description

## `issues` (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 = {
    "csvText": `Handle,Title,Option1 Name,Option1 Value,Variant SKU,Variant Price
demo-shirt,Demo Shirt,Size,S,SHIRT-001,19.99
demo-shirt,,Size,S,SHIRT-002,$24.00`
};

// Run the Actor and wait for it to finish
const run = await client.actor("rishabhbalabomma/shopify-product-csv-preflight").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 = { "csvText": """Handle,Title,Option1 Name,Option1 Value,Variant SKU,Variant Price
demo-shirt,Demo Shirt,Size,S,SHIRT-001,19.99
demo-shirt,,Size,S,SHIRT-002,$24.00
""" }

# Run the Actor and wait for it to finish
run = client.actor("rishabhbalabomma/shopify-product-csv-preflight").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 '{
  "csvText": "Handle,Title,Option1 Name,Option1 Value,Variant SKU,Variant Price\\ndemo-shirt,Demo Shirt,Size,S,SHIRT-001,19.99\\ndemo-shirt,,Size,S,SHIRT-002,$24.00\\n"
}' |
apify call rishabhbalabomma/shopify-product-csv-preflight --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rishabhbalabomma/shopify-product-csv-preflight"
        }
    }
}

```

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/H78KSRTdooJfhrbBT/builds/vsnJT3UbVoepksWxH/openapi.json
