# Supplier Price List Checker (`btvglobalco/my-actor`) Actor

Compare two supplier price list CSVs by SKU. Find cost increases, added or missing items, duplicates, and margin drops. Sample: cost rose from $24 to $29, cutting margin to 27.5% at a $40 retail price. $0.50 per report. Inputs and reports are stored in Apify.

- **URL**: https://apify.com/btvglobalco/my-actor.md
- **Developed by:** [BTVGlobalCo](https://apify.com/btvglobalco) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / completed comparison 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?

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

## Supplier Price List Checker by btvglobalco

Compare two supplier price lists by SKU. Upload both CSVs or paste their contents into the two supplier CSV fields. Open Output to find your report and summary. The CSV is also available under Storage → Key-value store → REPORT.csv.

#### See a sample result

| SKU | Earlier cost | Current cost | Retail | Gross margin | Retail for 30% margin |
| --- | ---: | ---: | ---: | ---: | ---: |
| 1048 | $24.00 | $29.00 | $40.00 | 27.5% | $41.43 |

The prefilled comparison also identifies one new SKU, one missing SKU, and one cost decrease. A completed report costs **$0.50**. The example above is visible without running the Actor.

### Input

Use UTF-8, comma-delimited CSVs, up to 10,000 rows and 5 MB per file. Use the same currency and unit of sale across both lists. Include SKU and cost, and optionally current retail price. Common headings work automatically. For custom headings, map sku, cost and retail under Custom column headings. Treat SKU as text in your spreadsheet to preserve leading zeros.

### Results

The checker reports added and missing SKUs, cost increases and decreases, duplicate SKUs and items below your chosen gross-margin target. Gross margin excludes fees, tax and shipping. The target retail price rounds up to the next cent when needed. Open the summary for counts. A completed comparison with no exceptions returns an empty report with column headings.

For example, a supplier cost increase from 24 to 29 at a retail price of 40 puts the gross margin at 27.5%. A retail price of 41.43 meets a 30% target.

### Storage and billing

The checker processes only the two inputs supplied for the run. Inputs and reports are stored in your Apify run storage. See the Store pricing panel for the applicable charge.

Checking invoice charges against a purchase order? Use the [Purchase Order vs. Supplier Invoice Checker](https://apify.com/btvglobalco/my-actor-1).

# Actor input Schema

## `previousFile` (type: `string`):

Upload a UTF-8 CSV. An upload takes priority over the corresponding text field.

## `currentFile` (type: `string`):

Upload a UTF-8 CSV. An upload takes priority over the corresponding text field.

## `previousCsv` (type: `string`):

Paste the CSV file contents, including headers.

## `currentCsv` (type: `string`):

Paste the CSV file contents, including headers.

## `marginTarget` (type: `number`):

Used for SKUs with a positive current retail price.

## `columns` (type: `object`):

Optional map using sku, cost, and retail keys. Applied to both sheets.

## Actor input object example

```json
{
  "previousCsv": "sku,cost,retail\n1048,24,40\n002,8,20\n003,12,20\n",
  "currentCsv": "sku,cost,retail\n1048,29,40\n002,7,20\n004,4,12\n",
  "marginTarget": 30
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "previousCsv": `sku,cost,retail
1048,24,40
002,8,20
003,12,20`,
    "currentCsv": `sku,cost,retail
1048,29,40
002,7,20
004,4,12`
};

// Run the Actor and wait for it to finish
const run = await client.actor("btvglobalco/my-actor").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 = {
    "previousCsv": """sku,cost,retail
1048,24,40
002,8,20
003,12,20
""",
    "currentCsv": """sku,cost,retail
1048,29,40
002,7,20
004,4,12
""",
}

# Run the Actor and wait for it to finish
run = client.actor("btvglobalco/my-actor").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 '{
  "previousCsv": "sku,cost,retail\\n1048,24,40\\n002,8,20\\n003,12,20\\n",
  "currentCsv": "sku,cost,retail\\n1048,29,40\\n002,7,20\\n004,4,12\\n"
}' |
apify call btvglobalco/my-actor --silent --output-dataset

```

## MCP server setup

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

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/zphEkmrQwkEhmOUwR/builds/A2DbOpqd0U9Uw1xe3/openapi.json
