Restock Margin Guard
Under maintenancePricing
from $1.00 / 1,000 actionable restock quote revieweds
Restock Margin Guard
Under maintenanceReview your own SKU reorder quantity and verified landed gross margin against the required target. Explicit missing costs, MOQ, pack rounding and manual approval.
Pricing
from $1.00 / 1,000 actionable restock quote revieweds
Rating
0.0
(0)
Developer
AFK Digital
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Check your own SKU resale margin against a supplier reorder offer. Your procurement officer reviews every result; this Actor never buys, ranks sellers, scrapes catalogs or submits purchase orders.
Run with your own records
Choose exactly ONE product-list source and ONE quote source:
products/quotes: JSON arrays, ideal for integrations.productsCsv/quotesCsv: pasted UTF-8 CSV export text.productsFile/quotesFile: file uploads yielding an authorized Apify Key-Value Store record URL. No third-party hosting/link fetching is supported. Apify storage access must permit the running Actor to read the records. If file permissions prevent a run, paste CSV/JSON data directly.
The ready-to-run examples/input.json contains fully fictional data and covers a known-cost quote, missing freight, unavailable FX, and an expired quote. CSV headings are in examples/products.csv and examples/quotes.csv.
Products have sku (unique), salePrice (>0, excluding sales VAT), currency (uppercase ISO currency), saleUnit (e.g. each), and optional targetMarginPct overriding the global target.
Quotes have quoteId (unique source identifier), sku, supplier, currency, purchaseUnit, moq, packSize, validUntil (YYYY-MM-DD inclusive), tiers array of {minQty,unitPrice}, and costs object. For a case price on products sold by each, supply unitsPerPurchaseUnit, e.g. 12. Different units with no explicit conversion are incomparable. Unknown MOQ or pack size prevents a verified total cost. CSV uses a quoted JSON string in tiersJson, or a single unitPrice for a single price tier.
Quote expenses (quote currency, for the MOQ/pack-rounded quantity) are freightTotal, EITHER nonRecoverableTaxTotal OR nonRecoverableTaxRatePct (percentage of merchandise total), otherLandedTotal, and salesCommissionPct. For each, use 0 only when you have verified zero cost. An omitted fee is unknown; it is not assumed to be zero. Recoverable VAT does not belong in nonRecoverableTax. Selling commission is not part of gross COGS and has a separate illustrative after-commission margin.
Settings: requestedQuantity in your product's sale units, global targetMarginPct, targetCurrency, asOf UTC date (defaults to current UTC date), maxResults (1–500), and optional fxRates such as {"CNY":"0.14"}, meaning one CNY equals 0.14 target-currency units. Currencies with no supplied FX are incomparable; the Actor does not retrieve live or historical rates.
How the calculations work
- Compute base purchase quantity = ceil(desired sale units / confirmed units per purchase unit).
- Raise to the MOQ, then round up to a multiple of
packSize. Show applied purchase units, equivalent sale units and surplus. The unit price comes from the highest all-units tier whose minQty is no greater than actual purchased units; graduated/marginal tiers are NOT automatically supported. - Merchandise subtotal = applied purchase quantity × quoted price, converted to report currency with customer FX. Known fees are added to a clearly labelled
knownCostSubtotal. - If purchase quantity and all procurement fees are confirmed:
estimatedTotalCost = (merchandise + freight + nonrecoverable tax + other landed expenses) × FX;verifiableUnitCost = estimatedTotalCost / appliedSaleQuantity. grossMarginPct = 100 × (net retail unit price − landed unit cost) / net retail unit price;targetGapPercentagePoints = grossMarginPct − targetMarginPct.afterCommissionMarginPct = grossMarginPct − salesCommissionPct(optional, not net profit).- If freight, procurement tax or other landed expense is unknown, verifiable unit cost, total cost, gross margin and target gap are null;
indicativeGrossMarginCeilingPctis only an optimistic ceiling based on known costs. If sales commission alone is unknown, gross margin may still be valid, but after-commission margin stays null.
Date validation is by UTC calendar date, quote valid through validUntil. Output statuses: comparable (arithmetic supported), incomplete (expenses/quantity/validity missing), expired (old offer), incomparable (FX, unit or price ambiguity). Every row sets requiresHumanReview: true and decision: human_review_only; even a positive margin gap does not authorize purchasing.
Results and pricing
Dataset fields include sku, supplier, sourceQuoteId, requested/applied quantities, tier, target currency, quoted unit cost, verifiable landed unit cost/total when available, gross margin, target gap, missing expense types, currency/unit/expiration flags and human-review marker. The SUMMARY key-value record counts result types, actual saved rows, budget stop condition and billing events.
Planned paid events: USD 0.001 per eligible stored quote analysis, plus USD 0.00005 per Actor start. Incomparable/unusable quote rows have no per-quote fee; expired/incomplete-but-usable rows are chargeable. For 10 eligible quotes, event fee is USD 0.01005 before separate account costs and taxes. See PRICING.md and the official Pricing tab.
Privacy, scope and boundaries
Input is owned/authorized by the customer. Uploads stay within Apify infrastructure, which hosts all inputs, results and run history under platform retention and access controls; do not treat this as end-to-end private storage. This Actor makes no external calls to supplier sites, Shopify, currency APIs, LLMs, analytics services, emails or proxies. Its output excludes raw uploaded files and buyer contact information. Strip names, postal addresses, emails, bank accounts and secrets before submitting: unlisted fields are rejected.
The Actor is not a purchase recommendation, tax advisor, inventory projection or RFQ comparator. It does not know stock available, destination-dependent freight/tariff changes, recoverability of tax, or future demand. Revalidate expiry, quantities, product specifications, and final amounts with the supplier.
Max 1,000 products, 1,000 quotes, 100 tiers/quote and 2 MB/file; results capped at 500 per run. All cost inputs must match actual rounded order quantity. Price tiers mean all-units tiers; if your contract uses incremental volume pricing, calculate and supply the applicable price externally.
Local check
npm cinpm test# Set a local INPUT.json in your Apify storage directory, then:npm start
See SECURITY.md (data policy), COMPETITORS.md (Store differentiation) and PRICING.md (fees). API19 is independent from API10 and every other Apify project.