# Catalogue Import Rescue (`wellbuilt_orache/catalogue-import-rescue`) Actor

Merge and validate supplied product CSV files against explicit mappings. Preserve text IDs, normalize declared types and dates, remove authorized exact duplicates, and hold conflicting data. Download a CSV, audit and source lineage.

- **URL**: https://apify.com/wellbuilt_orache/catalogue-import-rescue.md
- **Developed by:** [Rajhan](https://apify.com/wellbuilt_orache) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$500.00 / 1,000 completed ready batches

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Catalogue Import Rescue

Merge supplied product CSV files and apply explicit field rules before a business import. Preserve text IDs, normalize declared types and dates, and trace released records back to their source.

**Price: $0.50 USD per completed READY batch.** One batch can contain up to 10,000 combined records within the limits below. No startup, per-row or dataset-item fee. HOLD and invalid requests have no completed-delivery event. Standard platform usage is included in this price. Check Apify's displayed price and set a maximum event budget of at least $0.50 before running. Own runs and free-credit tests are not paid demand or revenue.

### Use the tool

1. Open Input and restore the synthetic example to see the exact structure.
2. Supply `sources`: one to five objects with a simple `.csv` filename in `name` and its full UTF-8 text in `csv`. No URL is fetched and no external account is connected.
3. Supply an explicit `contract`: filenames in the same order, delimiter, all source-to-target column mappings, business key and exact-duplicate policy. Confirm that you are authorized to process the supplied data.
4. Start the run. Read `OUTPUT` in Delivery files before using other records. `complete: true` means all listed delivery artifacts were saved.
5. Download `DELIVERY.zip`. The default dataset contains a processing and billing summary; the CSV and diagnostics are in Delivery files. For READY, it contains `ready.csv`, `audit.json`, `issues.json`, `REPORT.md` and `lineage.json`. For HOLD, it contains diagnostics and no ready CSV. Correct the source or explicitly revise the contract and start a new run.

### Supported rules

- Text: preserves leading zeros. Trimming happens only where declared. Formula-like text beginning with `=`, `+`, `-` or `@` after whitespace is held, even if otherwise legitimate.
- Decimal: non-negative dot-decimal price, at most two decimal places, formatted to two places. No rounding or currency conversion.
- Integer: non-negative whole number; identifiers requiring leading zeros should use text.
- Date: explicitly declare `%Y-%m-%d`, `%d/%m/%Y` or `%m/%d/%Y`; output is ISO date text.
- Allowed values and required fields: explicit per-column rules.
- Duplicates: removal only when authorized and records are identical after declared normalization. Conflicting records with the same business key hold the whole delivery. Lineage retains every contributing source coordinate.

All source headers must be mapped exactly once. Reordered headers are accepted; extra, missing or duplicate headers are held. Empty parsed records are omitted and counted. Invalid values are reported by record/column and issue code; the issue list does not repeat raw cell values. Supplied source text is never overwritten.

### Limits and scope

Five files; two million UTF-8 bytes each; 10,000 combined parsed records after headers; 30 columns; 2,000 characters per cell. Comma, semicolon or tab is explicit. UTF-8 BOM and properly quoted multiline cells are supported. Source filenames must be simple CSV basenames. No Excel files, OCR, scraping, factual enrichment, inferred missing values, third-party account changes or direct shop imports.

READY means structural compliance with your declared contract. It does not guarantee that Shopify, WooCommerce or any other destination will accept the file. Verify the destination's current import specification and inspect output before importing. This tool does not make financial, medical or other consequential decisions.

### Data handling

Use non-personal product catalogue data that you may lawfully process. Do not submit passwords, API keys, customer/contact lists, employee records, special-category data or employer/client confidential information. The Actor uses limited permissions and only its own run storage. It sends no input to an LLM or external data service. Apify hosts the run and its records under its applicable storage, retention and access controls. Download anything you need to retain. The operator does not promise a separate archival service or a particular UK-only processing region.

### Automation and support

An existing workflow may send the same declared contract with new authorized CSV text through the Apify API and read `OUTPUT` after completion. Each new batch needs a new run. No external API key is required by this Actor itself.

Report reproducible defects through this Actor's Issues tab, using a synthetic example and issue codes rather than private data. The scope is software functionality and documented input rules; custom data repair and destination import work are not included. No accuracy testimonials, customer results or earnings are claimed.

# Actor input Schema

## `contract` (type: `object`):

Declare files, delimiter, column mappings, business key and duplicate policy.

## `sources` (type: `array`):

One to five objects containing name and csv; each source must match the declared contract.

## `confirm_authorized_data` (type: `boolean`):

Confirm that supplied data is synthetic or that you hold the required processing rights.

## Actor input object example

```json
{
  "contract": {
    "files": [
      "supplier_a.csv",
      "supplier_b.csv"
    ],
    "delimiter": ",",
    "key": [
      "sku"
    ],
    "remove_exact_duplicates": true,
    "columns": [
      {
        "source": "SKU",
        "target": "sku",
        "type": "text",
        "trim": true
      },
      {
        "source": "Title",
        "target": "title",
        "type": "text",
        "trim": true
      },
      {
        "source": "Price",
        "target": "price",
        "type": "decimal",
        "trim": true
      },
      {
        "source": "Currency",
        "target": "currency",
        "type": "text",
        "allowed": [
          "GBP",
          "USD",
          "EUR"
        ]
      },
      {
        "source": "Stock",
        "target": "stock",
        "type": "integer"
      },
      {
        "source": "Updated",
        "target": "updated",
        "type": "date",
        "format": "%d/%m/%Y"
      }
    ]
  },
  "sources": [
    {
      "name": "supplier_a.csv",
      "csv": "SKU,Title,Price,Currency,Stock,Updated\n 0001 , Example product ,12.5,GBP,03,19/10/2026\n0002,\"Two-part, sample\",0,GBP,0,03/04/2026\n0003,\"Quoted \"\"sample\"\"\nwith two lines\",9.99,USD,10,18/10/2026\n0003,\"Quoted \"\"sample\"\"\nwith two lines\",9.99,USD,10,18/10/2026\n"
    },
    {
      "name": "supplier_b.csv",
      "csv": "SKU,Title,Price,Currency,Stock,Updated\n0004,Fourth example,100,EUR,1,17/10/2026\n0005,Fifth example,2.00,GBP,5,16/10/2026\n0006,Sixth example,3.00,GBP,6,15/10/2026\n0005,Fifth example,2.00,GBP,5,16/10/2026\n"
    }
  ],
  "confirm_authorized_data": true
}
```

# Actor output Schema

## `files` (type: `string`):

Read OUTPUT first. READY includes a CSV and lineage; HOLD includes diagnostics only.

# 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 = {
    "contract": {
        "files": [
            "supplier_a.csv",
            "supplier_b.csv"
        ],
        "delimiter": ",",
        "key": [
            "sku"
        ],
        "remove_exact_duplicates": true,
        "columns": [
            {
                "source": "SKU",
                "target": "sku",
                "type": "text",
                "trim": true
            },
            {
                "source": "Title",
                "target": "title",
                "type": "text",
                "trim": true
            },
            {
                "source": "Price",
                "target": "price",
                "type": "decimal",
                "trim": true
            },
            {
                "source": "Currency",
                "target": "currency",
                "type": "text",
                "allowed": [
                    "GBP",
                    "USD",
                    "EUR"
                ]
            },
            {
                "source": "Stock",
                "target": "stock",
                "type": "integer"
            },
            {
                "source": "Updated",
                "target": "updated",
                "type": "date",
                "format": "%d/%m/%Y"
            }
        ]
    },
    "sources": [
        {
            "name": "supplier_a.csv",
            "csv": "SKU,Title,Price,Currency,Stock,Updated\n 0001 , Example product ,12.5,GBP,03,19/10/2026\n0002,\"Two-part, sample\",0,GBP,0,03/04/2026\n0003,\"Quoted \"\"sample\"\"\nwith two lines\",9.99,USD,10,18/10/2026\n0003,\"Quoted \"\"sample\"\"\nwith two lines\",9.99,USD,10,18/10/2026\n"
        },
        {
            "name": "supplier_b.csv",
            "csv": "SKU,Title,Price,Currency,Stock,Updated\n0004,Fourth example,100,EUR,1,17/10/2026\n0005,Fifth example,2.00,GBP,5,16/10/2026\n0006,Sixth example,3.00,GBP,6,15/10/2026\n0005,Fifth example,2.00,GBP,5,16/10/2026\n"
        }
    ],
    "confirm_authorized_data": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("wellbuilt_orache/catalogue-import-rescue").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 = {
    "contract": {
        "files": [
            "supplier_a.csv",
            "supplier_b.csv",
        ],
        "delimiter": ",",
        "key": ["sku"],
        "remove_exact_duplicates": True,
        "columns": [
            {
                "source": "SKU",
                "target": "sku",
                "type": "text",
                "trim": True,
            },
            {
                "source": "Title",
                "target": "title",
                "type": "text",
                "trim": True,
            },
            {
                "source": "Price",
                "target": "price",
                "type": "decimal",
                "trim": True,
            },
            {
                "source": "Currency",
                "target": "currency",
                "type": "text",
                "allowed": [
                    "GBP",
                    "USD",
                    "EUR",
                ],
            },
            {
                "source": "Stock",
                "target": "stock",
                "type": "integer",
            },
            {
                "source": "Updated",
                "target": "updated",
                "type": "date",
                "format": "%d/%m/%Y",
            },
        ],
    },
    "sources": [
        {
            "name": "supplier_a.csv",
            "csv": """SKU,Title,Price,Currency,Stock,Updated
 0001 , Example product ,12.5,GBP,03,19/10/2026
0002,\"Two-part, sample\",0,GBP,0,03/04/2026
0003,\"Quoted \"\"sample\"\"
with two lines\",9.99,USD,10,18/10/2026
0003,\"Quoted \"\"sample\"\"
with two lines\",9.99,USD,10,18/10/2026
""",
        },
        {
            "name": "supplier_b.csv",
            "csv": """SKU,Title,Price,Currency,Stock,Updated
0004,Fourth example,100,EUR,1,17/10/2026
0005,Fifth example,2.00,GBP,5,16/10/2026
0006,Sixth example,3.00,GBP,6,15/10/2026
0005,Fifth example,2.00,GBP,5,16/10/2026
""",
        },
    ],
    "confirm_authorized_data": True,
}

# Run the Actor and wait for it to finish
run = client.actor("wellbuilt_orache/catalogue-import-rescue").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 '{
  "contract": {
    "files": [
      "supplier_a.csv",
      "supplier_b.csv"
    ],
    "delimiter": ",",
    "key": [
      "sku"
    ],
    "remove_exact_duplicates": true,
    "columns": [
      {
        "source": "SKU",
        "target": "sku",
        "type": "text",
        "trim": true
      },
      {
        "source": "Title",
        "target": "title",
        "type": "text",
        "trim": true
      },
      {
        "source": "Price",
        "target": "price",
        "type": "decimal",
        "trim": true
      },
      {
        "source": "Currency",
        "target": "currency",
        "type": "text",
        "allowed": [
          "GBP",
          "USD",
          "EUR"
        ]
      },
      {
        "source": "Stock",
        "target": "stock",
        "type": "integer"
      },
      {
        "source": "Updated",
        "target": "updated",
        "type": "date",
        "format": "%d/%m/%Y"
      }
    ]
  },
  "sources": [
    {
      "name": "supplier_a.csv",
      "csv": "SKU,Title,Price,Currency,Stock,Updated\\n 0001 , Example product ,12.5,GBP,03,19/10/2026\\n0002,\\"Two-part, sample\\",0,GBP,0,03/04/2026\\n0003,\\"Quoted \\"\\"sample\\"\\"\\nwith two lines\\",9.99,USD,10,18/10/2026\\n0003,\\"Quoted \\"\\"sample\\"\\"\\nwith two lines\\",9.99,USD,10,18/10/2026\\n"
    },
    {
      "name": "supplier_b.csv",
      "csv": "SKU,Title,Price,Currency,Stock,Updated\\n0004,Fourth example,100,EUR,1,17/10/2026\\n0005,Fifth example,2.00,GBP,5,16/10/2026\\n0006,Sixth example,3.00,GBP,6,15/10/2026\\n0005,Fifth example,2.00,GBP,5,16/10/2026\\n"
    }
  ],
  "confirm_authorized_data": true
}' |
apify call wellbuilt_orache/catalogue-import-rescue --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wellbuilt_orache/catalogue-import-rescue"
        }
    }
}
```

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/BD6AqcSpfgzEEA8J2/builds/X1DzaX92FEboFnvOK/openapi.json
