# Supplier Price Tier Impact (`h_murdock/supplier-price-tier-impact`) Actor

Compare all-units supplier quantity tiers at your planned quantities. Show MOQ changes, selected source tiers, purchase-spend deltas and merchandise margin. CSV or JSON in; JSON, CSV and HTML reports out.

- **URL**: https://apify.com/h\_murdock/supplier-price-tier-impact.md
- **Developed by:** [Gilad Ronen](https://apify.com/h_murdock) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

### What does Supplier Price Tier Impact do?

**Compare supplier quantity breaks at the quantities you actually plan to order.** Supply previous and proposed price tiers, then receive selected tier evidence, minimum order quantity changes, exact purchase-spend differences, and optional merchandise margin at your supplied selling price.

For example, an 80-unit plan previously qualifies for a 50-unit tier at $5. If the proposed discount begins at 100 units and the applicable base tier costs $6, the report shows previous spend of $400, proposed spend of $480, and an $80 increase. It does not recommend ordering additional units or changing selling prices.

The Actor processes your supplied files without contacting suppliers, stores, ERP systems, or external models. Use the [Apify API](https://docs.apify.com/api/v2) or a saved task to repeat the same analysis when a new price list arrives.

### How to compare supplier tiers

1. Prepare previous tiers, proposed tiers, and planned quantity scenarios with stable string identifiers.
2. Set `tierConvention` to `all-units` only when that convention describes your supplier's prices.
3. Provide each table as a JSON array or its CSV alternative. See the Input tab and the examples below.
4. Optionally supply a unit selling price per scenario and a minimum merchandise margin percentage for review.
5. Run the Actor and download the complete JSON, flat CSV evidence, and standalone HTML report.

**All-units means the selected price applies to every planned unit.** The largest minimum quantity less than or equal to the planned quantity wins. The lowest submitted tier minimum is the MOQ. Graduated pricing, where different slices of an order have different prices, is unsupported and rejected.

### Input fields and supported formats

Each tier row requires `rowId`, `supplierId`, `sku`, `unit`, `currency`, `taxBasis`, `minimumQuantity`, and `unitCost`. Each scenario requires the same identity fields and `rowId`, replacing the tier fields with `quantity`; `unitSellingPrice` is optional.

The exact comparison key is supplier, SKU, unit, currency, and tax basis. Case and leading zeros matter. Use `"0001"` for an identifier, not a JSON number. No fuzzy joins, case folding, pack conversion, exchange rates, or tax calculations are applied. Currency must be a three-letter uppercase label; it is not checked against a live currency registry. `taxBasis` must be `tax-exclusive` or `tax-inclusive`.

All quantities and amounts must be decimal **strings**: for example, `"80"`, `"0.3"`, or `"4.80"`. Up to 15 integer digits and six fractional digits are supported. Do not use comma grouping, exponents, negative prices, or currency symbols. Scenario quantity must be positive; tier minimum and cost may be zero. Each `rowId` must be unique within its table. Unknown JSON fields are rejected to catch mapping mistakes.

```json
{
  "tierConvention": "all-units",
  "previousTiers": [
    {"rowId":"old-50","supplierId":"S1","sku":"0001","unit":"each","currency":"USD","taxBasis":"tax-exclusive","minimumQuantity":"50","unitCost":"5"}
  ],
  "proposedTiers": [
    {"rowId":"new-1","supplierId":"S1","sku":"0001","unit":"each","currency":"USD","taxBasis":"tax-exclusive","minimumQuantity":"1","unitCost":"6"},
    {"rowId":"new-100","supplierId":"S1","sku":"0001","unit":"each","currency":"USD","taxBasis":"tax-exclusive","minimumQuantity":"100","unitCost":"4.8"}
  ],
  "scenarios": [
    {"rowId":"plan-80","supplierId":"S1","sku":"0001","unit":"each","currency":"USD","taxBasis":"tax-exclusive","quantity":"80","unitSellingPrice":"8"}
  ],
  "minimumMerchandiseMarginPercent": "30"
}
```

Use exactly one of each pair: `previousTiers` / `previousTiersCsv`, `proposedTiers` / `proposedTiersCsv`, and `scenarios` / `scenariosCsv`. A CSV alternative is an object containing `csv` text and optional `columnMapping`. The mapping is **canonical field to source header**, such as `{"rowId":"Line ID","sku":"Product Code"}`; include mappings for every required field. Without a mapping, headers must be canonical names. With a mapping, unselected source columns are ignored. BOM, quoted commas, and quoted line breaks are parsed; identifiers themselves cannot contain control characters. Duplicate headers, malformed quotes, padded headers, and irregular record widths are rejected. An empty optional selling-price cell means no selling price was supplied.

Limits are 10,000 combined tier rows, 2,000 scenarios, and 4 MB of total JSON input. Empty tier arrays represent missing submitted evidence. The complete report must remain below 8 MB and every download below 9 MB; large evidence expansions can require splitting a smaller input. Size checks happen before the report event.

### How ambiguity and missing prices are reported

Repeated SKUs with different minimum quantities are valid tiers. Duplicate minimum quantities within the same exact key make the **entire schedule ambiguous**, even when the duplicated costs agree or the duplicated tier is above the planned quantity. Numeric minima `"1"` and `"1.0"` are the same minimum. No duplicate silently overwrites another.

Below-MOQ, missing, incompatible, and ambiguous sides retain a null cost. A known cost on the other side remains visible, but the spend difference is null. Matching supplier/SKU records with another unit, currency, or tax basis are linked as incompatible evidence; they are never converted.

### Report downloads

One dataset item contains the complete report, a `rows` evidence array, and all normalized source records. `OUTPUT` holds the same report as JSON. `report.csv` flattens scenario findings, tier changes, MOQ changes, and duplicate-tier findings. `report.html` is a downloadable, standalone review page containing evidence and source records. Download the HTML attachment and open it locally.

| Field | Meaning |
|---|---|
| `oldMinimumQuantity`, `newMinimumQuantity` | Selected all-units tier boundaries |
| `oldMoq`, `newMoq` | Lowest submitted minimum for the exact key |
| `oldSpend`, `newSpend`, `spendDelta` | Exact quantity × unit cost; delta is proposed minus previous |
| `oldStatus`, `newStatus` | Selected, below MOQ, missing, incompatible, or ambiguous |
| `newMerchandiseMarginPercent` | Merchandise margin at the supplied selling price, when available |
| `oldSourceRefs`, `newSourceRefs` | Selected or relevant input evidence; maximum 20 per list |
| `oldSourceCount`, `newSourceCount` | Full evidence counts when reference lists are abbreviated |
| `severity`, `reason` | Review priority and explanation |

All source records remain in JSON and HTML. Source row numbers are one-based data-record numbers, excluding the CSV header; they are not physical line numbers for multiline CSV. Evidence IDs are deterministic for identical normalized inputs. CSV cells that could start spreadsheet formulas, including negative amount strings, receive a leading apostrophe; JSON keeps the exact decimal strings. No scenario monetary totals are added because scenarios can be alternative plans and have different currencies or bases.

### Merchandise margin and arithmetic

Merchandise margin is `(selling price − supplier unit cost) / selling price × 100`. Merchandise contribution is `(selling price − supplier unit cost) × quantity`. These figures **exclude freight, fees, overhead, and taxes** and are not net profit or historical accounting. Supply prices that match the scenario's unit, currency, and tax basis. Tax-inclusive spend remains comparable, but merchandise margin is unavailable because taxes cannot be removed from the supplied values.

A zero selling price has no percentage denominator; percentages are null while tax-exclusive merchandise contribution can still be calculated. Without a selling price, margin is not estimated. Percentages use six decimal places, rounded half away from zero; the optional 0–100% threshold is compared against the unrounded proposed margin. Spend and unit-cost calculations use exact decimal arithmetic without rounding to currency minor units.

### Pricing and interrupted runs

The price is **$0.50 per completed report**, with platform usage included. There is no startup or dataset-item charge. Invalid inputs and insufficient report budgets produce no report event. One new run is a new billable report, including a repeat of the same input.

The complete dataset JSON is the primary deliverable and is saved with the report event. Convenience downloads are written afterward. An interruption can leave some downloads missing even though the report was charged; resurrecting the same run verifies the input and saved report, then recreates the downloads without another event. If the dataset was saved but its event was interrupted, recovery completes that one charge. A charged run with a missing dataset, changed input, or modified report stops for review instead of silently starting again.

### Scope, privacy, and support

This is a review report for supplied tables. It does not establish supplier availability, actual transactions, contract validity, landed cost, tax treatment, or the best purchasing decision. It does not scrape a marketplace, accept credentials, perform ERP writes, or forecast demand. Submit only pricing data you are authorized to process. Inputs and results are retained in your Apify run storage under your storage and sharing settings; raw customer rows are not logged.

Use the Issues tab for reproducible problems and the API tab for programmatic access. Include a small synthetic example and the relevant source references instead of commercially sensitive price lists.

# Actor input Schema

## `tierConvention` (type: `string`):

Confirm all-units pricing: the largest eligible minimum prices every planned unit. Graduated pricing is rejected.

## `previousTiers` (type: `array`):

Provide this array OR previousTiersCsv. Decimal values must be strings. At most 10000 rows; previous and proposed tiers share a 10000-row total limit.

## `previousTiersCsv` (type: `object`):

Alternative to previousTiers: an object with csv text and optional columnMapping from canonical fields to header names. Empty optional selling-price cells mean omitted. Duplicate headers and irregular records are rejected.

## `proposedTiers` (type: `array`):

Provide this array OR proposedTiersCsv. Decimal values must be strings. At most 10000 rows; previous and proposed tiers share a 10000-row total limit.

## `proposedTiersCsv` (type: `object`):

Alternative to proposedTiers: an object with csv text and optional columnMapping from canonical fields to header names. Empty optional selling-price cells mean omitted. Duplicate headers and irregular records are rejected.

## `scenarios` (type: `array`):

Provide this array OR scenariosCsv. Decimal values must be strings. At most 2000 rows; previous and proposed tiers share a 10000-row total limit.

## `scenariosCsv` (type: `object`):

Alternative to scenarios: an object with csv text and optional columnMapping from canonical fields to header names. Empty optional selling-price cells mean omitted. Duplicate headers and irregular records are rejected.

## `minimumMerchandiseMarginPercent` (type: `string`):

Decimal string from 0 through 100. Compared with unrounded proposed margin at supplied selling price. Requires tax-exclusive basis and selling price greater than zero.

## Actor input object example

```json
{
  "tierConvention": "all-units",
  "previousTiers": [
    {
      "rowId": "old-a1",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "6"
    },
    {
      "rowId": "old-a50",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "50",
      "unitCost": "5"
    },
    {
      "rowId": "old-b",
      "supplierId": "SUP-001",
      "sku": "MOQ",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "10",
      "unitCost": "2"
    },
    {
      "rowId": "old-c",
      "supplierId": "SUP-001",
      "sku": "DUP",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "old-d",
      "supplierId": "SUP-001",
      "sku": "UNIT",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "old-e",
      "supplierId": "SUP-001",
      "sku": "FX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "old-f",
      "supplierId": "SUP-001",
      "sku": "ZERO",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "old-g",
      "supplierId": "SUP-001",
      "sku": "DECIMAL",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "0",
      "unitCost": "0.1"
    },
    {
      "rowId": "old-h",
      "supplierId": "SUP-001",
      "sku": "TAX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-inclusive",
      "minimumQuantity": "1",
      "unitCost": "4"
    }
  ],
  "proposedTiers": [
    {
      "rowId": "new-a1",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "6"
    },
    {
      "rowId": "new-a100",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "100",
      "unitCost": "4.8"
    },
    {
      "rowId": "new-b",
      "supplierId": "SUP-001",
      "sku": "MOQ",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "20",
      "unitCost": "1.9"
    },
    {
      "rowId": "new-c1",
      "supplierId": "SUP-001",
      "sku": "DUP",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2.2"
    },
    {
      "rowId": "new-c2",
      "supplierId": "SUP-001",
      "sku": "DUP",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1.0",
      "unitCost": "2.3"
    },
    {
      "rowId": "new-d",
      "supplierId": "SUP-001",
      "sku": "UNIT",
      "unit": "case",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "20"
    },
    {
      "rowId": "new-e",
      "supplierId": "SUP-001",
      "sku": "FX",
      "unit": "each",
      "currency": "EUR",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "new-f",
      "supplierId": "SUP-001",
      "sku": "ZERO",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "3"
    },
    {
      "rowId": "new-g",
      "supplierId": "SUP-001",
      "sku": "DECIMAL",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "0",
      "unitCost": "0.2"
    },
    {
      "rowId": "new-h",
      "supplierId": "SUP-001",
      "sku": "TAX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-inclusive",
      "minimumQuantity": "1",
      "unitCost": "5"
    }
  ],
  "scenarios": [
    {
      "rowId": "plan-80",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "80",
      "unitSellingPrice": "8"
    },
    {
      "rowId": "plan-100",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "100",
      "unitSellingPrice": "8"
    },
    {
      "rowId": "below-new-moq",
      "supplierId": "SUP-001",
      "sku": "MOQ",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "15"
    },
    {
      "rowId": "duplicate-tier",
      "supplierId": "SUP-001",
      "sku": "DUP",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5"
    },
    {
      "rowId": "changed-unit",
      "supplierId": "SUP-001",
      "sku": "UNIT",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5"
    },
    {
      "rowId": "changed-currency",
      "supplierId": "SUP-001",
      "sku": "FX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5"
    },
    {
      "rowId": "zero-denominator",
      "supplierId": "SUP-001",
      "sku": "ZERO",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5",
      "unitSellingPrice": "0"
    },
    {
      "rowId": "fractional-quantity",
      "supplierId": "SUP-001",
      "sku": "DECIMAL",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "0.3",
      "unitSellingPrice": "0.3"
    },
    {
      "rowId": "tax-inclusive",
      "supplierId": "SUP-001",
      "sku": "TAX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-inclusive",
      "quantity": "5",
      "unitSellingPrice": "10"
    },
    {
      "rowId": "missing-sku",
      "supplierId": "SUP-001",
      "sku": "MISSING",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5"
    }
  ]
}
```

# Actor output Schema

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

No description

## `json` (type: `string`):

No description

## `csv` (type: `string`):

No description

## `html` (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 = {
    "tierConvention": "all-units",
    "previousTiers": [
        {
            "rowId": "old-a1",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "6"
        },
        {
            "rowId": "old-a50",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "50",
            "unitCost": "5"
        },
        {
            "rowId": "old-b",
            "supplierId": "SUP-001",
            "sku": "MOQ",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "10",
            "unitCost": "2"
        },
        {
            "rowId": "old-c",
            "supplierId": "SUP-001",
            "sku": "DUP",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2"
        },
        {
            "rowId": "old-d",
            "supplierId": "SUP-001",
            "sku": "UNIT",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2"
        },
        {
            "rowId": "old-e",
            "supplierId": "SUP-001",
            "sku": "FX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2"
        },
        {
            "rowId": "old-f",
            "supplierId": "SUP-001",
            "sku": "ZERO",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2"
        },
        {
            "rowId": "old-g",
            "supplierId": "SUP-001",
            "sku": "DECIMAL",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "0",
            "unitCost": "0.1"
        },
        {
            "rowId": "old-h",
            "supplierId": "SUP-001",
            "sku": "TAX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-inclusive",
            "minimumQuantity": "1",
            "unitCost": "4"
        }
    ],
    "proposedTiers": [
        {
            "rowId": "new-a1",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "6"
        },
        {
            "rowId": "new-a100",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "100",
            "unitCost": "4.8"
        },
        {
            "rowId": "new-b",
            "supplierId": "SUP-001",
            "sku": "MOQ",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "20",
            "unitCost": "1.9"
        },
        {
            "rowId": "new-c1",
            "supplierId": "SUP-001",
            "sku": "DUP",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2.2"
        },
        {
            "rowId": "new-c2",
            "supplierId": "SUP-001",
            "sku": "DUP",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1.0",
            "unitCost": "2.3"
        },
        {
            "rowId": "new-d",
            "supplierId": "SUP-001",
            "sku": "UNIT",
            "unit": "case",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "20"
        },
        {
            "rowId": "new-e",
            "supplierId": "SUP-001",
            "sku": "FX",
            "unit": "each",
            "currency": "EUR",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2"
        },
        {
            "rowId": "new-f",
            "supplierId": "SUP-001",
            "sku": "ZERO",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "3"
        },
        {
            "rowId": "new-g",
            "supplierId": "SUP-001",
            "sku": "DECIMAL",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "0",
            "unitCost": "0.2"
        },
        {
            "rowId": "new-h",
            "supplierId": "SUP-001",
            "sku": "TAX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-inclusive",
            "minimumQuantity": "1",
            "unitCost": "5"
        }
    ],
    "scenarios": [
        {
            "rowId": "plan-80",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "80",
            "unitSellingPrice": "8"
        },
        {
            "rowId": "plan-100",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "100",
            "unitSellingPrice": "8"
        },
        {
            "rowId": "below-new-moq",
            "supplierId": "SUP-001",
            "sku": "MOQ",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "15"
        },
        {
            "rowId": "duplicate-tier",
            "supplierId": "SUP-001",
            "sku": "DUP",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5"
        },
        {
            "rowId": "changed-unit",
            "supplierId": "SUP-001",
            "sku": "UNIT",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5"
        },
        {
            "rowId": "changed-currency",
            "supplierId": "SUP-001",
            "sku": "FX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5"
        },
        {
            "rowId": "zero-denominator",
            "supplierId": "SUP-001",
            "sku": "ZERO",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5",
            "unitSellingPrice": "0"
        },
        {
            "rowId": "fractional-quantity",
            "supplierId": "SUP-001",
            "sku": "DECIMAL",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "0.3",
            "unitSellingPrice": "0.3"
        },
        {
            "rowId": "tax-inclusive",
            "supplierId": "SUP-001",
            "sku": "TAX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-inclusive",
            "quantity": "5",
            "unitSellingPrice": "10"
        },
        {
            "rowId": "missing-sku",
            "supplierId": "SUP-001",
            "sku": "MISSING",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("h_murdock/supplier-price-tier-impact").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 = {
    "tierConvention": "all-units",
    "previousTiers": [
        {
            "rowId": "old-a1",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "6",
        },
        {
            "rowId": "old-a50",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "50",
            "unitCost": "5",
        },
        {
            "rowId": "old-b",
            "supplierId": "SUP-001",
            "sku": "MOQ",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "10",
            "unitCost": "2",
        },
        {
            "rowId": "old-c",
            "supplierId": "SUP-001",
            "sku": "DUP",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2",
        },
        {
            "rowId": "old-d",
            "supplierId": "SUP-001",
            "sku": "UNIT",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2",
        },
        {
            "rowId": "old-e",
            "supplierId": "SUP-001",
            "sku": "FX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2",
        },
        {
            "rowId": "old-f",
            "supplierId": "SUP-001",
            "sku": "ZERO",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2",
        },
        {
            "rowId": "old-g",
            "supplierId": "SUP-001",
            "sku": "DECIMAL",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "0",
            "unitCost": "0.1",
        },
        {
            "rowId": "old-h",
            "supplierId": "SUP-001",
            "sku": "TAX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-inclusive",
            "minimumQuantity": "1",
            "unitCost": "4",
        },
    ],
    "proposedTiers": [
        {
            "rowId": "new-a1",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "6",
        },
        {
            "rowId": "new-a100",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "100",
            "unitCost": "4.8",
        },
        {
            "rowId": "new-b",
            "supplierId": "SUP-001",
            "sku": "MOQ",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "20",
            "unitCost": "1.9",
        },
        {
            "rowId": "new-c1",
            "supplierId": "SUP-001",
            "sku": "DUP",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2.2",
        },
        {
            "rowId": "new-c2",
            "supplierId": "SUP-001",
            "sku": "DUP",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1.0",
            "unitCost": "2.3",
        },
        {
            "rowId": "new-d",
            "supplierId": "SUP-001",
            "sku": "UNIT",
            "unit": "case",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "20",
        },
        {
            "rowId": "new-e",
            "supplierId": "SUP-001",
            "sku": "FX",
            "unit": "each",
            "currency": "EUR",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "2",
        },
        {
            "rowId": "new-f",
            "supplierId": "SUP-001",
            "sku": "ZERO",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "1",
            "unitCost": "3",
        },
        {
            "rowId": "new-g",
            "supplierId": "SUP-001",
            "sku": "DECIMAL",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "minimumQuantity": "0",
            "unitCost": "0.2",
        },
        {
            "rowId": "new-h",
            "supplierId": "SUP-001",
            "sku": "TAX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-inclusive",
            "minimumQuantity": "1",
            "unitCost": "5",
        },
    ],
    "scenarios": [
        {
            "rowId": "plan-80",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "80",
            "unitSellingPrice": "8",
        },
        {
            "rowId": "plan-100",
            "supplierId": "SUP-001",
            "sku": "0001",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "100",
            "unitSellingPrice": "8",
        },
        {
            "rowId": "below-new-moq",
            "supplierId": "SUP-001",
            "sku": "MOQ",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "15",
        },
        {
            "rowId": "duplicate-tier",
            "supplierId": "SUP-001",
            "sku": "DUP",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5",
        },
        {
            "rowId": "changed-unit",
            "supplierId": "SUP-001",
            "sku": "UNIT",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5",
        },
        {
            "rowId": "changed-currency",
            "supplierId": "SUP-001",
            "sku": "FX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5",
        },
        {
            "rowId": "zero-denominator",
            "supplierId": "SUP-001",
            "sku": "ZERO",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5",
            "unitSellingPrice": "0",
        },
        {
            "rowId": "fractional-quantity",
            "supplierId": "SUP-001",
            "sku": "DECIMAL",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "0.3",
            "unitSellingPrice": "0.3",
        },
        {
            "rowId": "tax-inclusive",
            "supplierId": "SUP-001",
            "sku": "TAX",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-inclusive",
            "quantity": "5",
            "unitSellingPrice": "10",
        },
        {
            "rowId": "missing-sku",
            "supplierId": "SUP-001",
            "sku": "MISSING",
            "unit": "each",
            "currency": "USD",
            "taxBasis": "tax-exclusive",
            "quantity": "5",
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("h_murdock/supplier-price-tier-impact").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 '{
  "tierConvention": "all-units",
  "previousTiers": [
    {
      "rowId": "old-a1",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "6"
    },
    {
      "rowId": "old-a50",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "50",
      "unitCost": "5"
    },
    {
      "rowId": "old-b",
      "supplierId": "SUP-001",
      "sku": "MOQ",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "10",
      "unitCost": "2"
    },
    {
      "rowId": "old-c",
      "supplierId": "SUP-001",
      "sku": "DUP",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "old-d",
      "supplierId": "SUP-001",
      "sku": "UNIT",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "old-e",
      "supplierId": "SUP-001",
      "sku": "FX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "old-f",
      "supplierId": "SUP-001",
      "sku": "ZERO",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "old-g",
      "supplierId": "SUP-001",
      "sku": "DECIMAL",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "0",
      "unitCost": "0.1"
    },
    {
      "rowId": "old-h",
      "supplierId": "SUP-001",
      "sku": "TAX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-inclusive",
      "minimumQuantity": "1",
      "unitCost": "4"
    }
  ],
  "proposedTiers": [
    {
      "rowId": "new-a1",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "6"
    },
    {
      "rowId": "new-a100",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "100",
      "unitCost": "4.8"
    },
    {
      "rowId": "new-b",
      "supplierId": "SUP-001",
      "sku": "MOQ",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "20",
      "unitCost": "1.9"
    },
    {
      "rowId": "new-c1",
      "supplierId": "SUP-001",
      "sku": "DUP",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2.2"
    },
    {
      "rowId": "new-c2",
      "supplierId": "SUP-001",
      "sku": "DUP",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1.0",
      "unitCost": "2.3"
    },
    {
      "rowId": "new-d",
      "supplierId": "SUP-001",
      "sku": "UNIT",
      "unit": "case",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "20"
    },
    {
      "rowId": "new-e",
      "supplierId": "SUP-001",
      "sku": "FX",
      "unit": "each",
      "currency": "EUR",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "2"
    },
    {
      "rowId": "new-f",
      "supplierId": "SUP-001",
      "sku": "ZERO",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "1",
      "unitCost": "3"
    },
    {
      "rowId": "new-g",
      "supplierId": "SUP-001",
      "sku": "DECIMAL",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "minimumQuantity": "0",
      "unitCost": "0.2"
    },
    {
      "rowId": "new-h",
      "supplierId": "SUP-001",
      "sku": "TAX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-inclusive",
      "minimumQuantity": "1",
      "unitCost": "5"
    }
  ],
  "scenarios": [
    {
      "rowId": "plan-80",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "80",
      "unitSellingPrice": "8"
    },
    {
      "rowId": "plan-100",
      "supplierId": "SUP-001",
      "sku": "0001",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "100",
      "unitSellingPrice": "8"
    },
    {
      "rowId": "below-new-moq",
      "supplierId": "SUP-001",
      "sku": "MOQ",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "15"
    },
    {
      "rowId": "duplicate-tier",
      "supplierId": "SUP-001",
      "sku": "DUP",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5"
    },
    {
      "rowId": "changed-unit",
      "supplierId": "SUP-001",
      "sku": "UNIT",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5"
    },
    {
      "rowId": "changed-currency",
      "supplierId": "SUP-001",
      "sku": "FX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5"
    },
    {
      "rowId": "zero-denominator",
      "supplierId": "SUP-001",
      "sku": "ZERO",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5",
      "unitSellingPrice": "0"
    },
    {
      "rowId": "fractional-quantity",
      "supplierId": "SUP-001",
      "sku": "DECIMAL",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "0.3",
      "unitSellingPrice": "0.3"
    },
    {
      "rowId": "tax-inclusive",
      "supplierId": "SUP-001",
      "sku": "TAX",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-inclusive",
      "quantity": "5",
      "unitSellingPrice": "10"
    },
    {
      "rowId": "missing-sku",
      "supplierId": "SUP-001",
      "sku": "MISSING",
      "unit": "each",
      "currency": "USD",
      "taxBasis": "tax-exclusive",
      "quantity": "5"
    }
  ]
}' |
apify call h_murdock/supplier-price-tier-impact --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,h_murdock/supplier-price-tier-impact"
        }
    }
}
```

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/C10TFJ0frxs6Terdd/builds/tzJOUObO9ULHy2Pv8/openapi.json
