Shopify Price & Promotion Diagnostics avatar

Shopify Price & Promotion Diagnostics

Pricing

from $1.00 / 1,000 audit completeds

Go to Apify Store
Shopify Price & Promotion Diagnostics

Shopify Price & Promotion Diagnostics

Audit one public Shopify storefront for compare-at claims, variant price consistency and repeat-run promotion changes, with ranked fixes.

Pricing

from $1.00 / 1,000 audit completeds

Rating

0.0

(0)

Developer

Practical AI Lab

Practical AI Lab

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Features

Limited permissions

Share

Audit one public Shopify storefront for the prices it actually publishes, the compare-at ("was") prices it shows, how consistent variant pricing is, and how promotions change between runs. The result is one severity-ranked fix list with concrete product URLs, evidence and caveats, plus JSON and CSV you can reproduce.

It is built for ecommerce pricing and merchandising teams who need to answer: Which products should we fix first, and which discount claims deserve a second look?

Start with one URL

The only required input is storeUrl.

{
"storeUrl": "https://www.allbirds.com"
}

The URL above is only a format example. Replace it with a store you are allowed to analyse. The Actor reads only the store's public /products.json feed and respects robots.txt; if the site disallows the feed, the run stops and reports ROBOTS_DENIED.

First run. The Actor stores a compact snapshot for the domain and emits an explicit baseline_created record with status BASELINE_CREATED. You still get the full single-snapshot audit (compare-at integrity, variant consistency, ranked fixes). Cross-run promotion changes need a second run, and the output says so.

Repeat runs. The Actor loads the stored snapshot, emits promotion_change_tracking records for what changed, and reports status DELTA_REPORT. An unchanged catalogue says so explicitly instead of returning an empty result.

Scheduling later runs

Nothing in this Actor runs by itself and it sends no alerts or notifications. To get repeat-run comparisons:

  1. Save your input as an Apify Task.
  2. Create a Schedule for that Task (for example weekly) in Apify Console.
  3. Read the dataset or the FIX_PRIORITY.csv record after each scheduled run, or connect the Task to your own integration.

The snapshot is stored in a named key-value store (default pal-shopify-price-promotion-state), one record per domain, because a run's default store is new for every run and could not keep a baseline. Keep the name unchanged for the history to continue. Avoid running two jobs for the same domain at the same time.

What you get: four buyer outcomes in one workflow

All rows share one dataset with a recordType column, a severity, and the product URL, so they join on productUrl/productId.

OutcomerecordTypeNeeds a repeat runExample codes
1. Published price and compare-at auditprice_compare_at_auditNoPRICE_MISSING_OR_ZERO, COMPARE_AT_BELOW_PRICE, COMPARE_AT_EQUALS_PRICE, DEEP_DISCOUNT_CLAIM, EXTREME_DISCOUNT_CLAIM
2. Variant pricing consistencyvariant_pricing_consistencyNoMIXED_COMPARE_AT_ACROSS_VARIANTS, INCONSISTENT_DISCOUNT_DEPTH, VARIANT_PRICE_SPREAD, SKU_PRICE_CONFLICT
3. Repeat-run promotion changespromotion_change_trackingYesPRICE_DROP, PRICE_INCREASE, PROMOTION_STARTED, PROMOTION_ENDED, COMPARE_AT_RAISED_WITHOUT_PRICE_DROP, PERSISTENT_DISCOUNT_CLAIM, NEW_PRODUCT, REMOVED_PRODUCT
4. Prioritised merchandising fixesfix_priorityNoOne row per product, joining signals from outcomes 1-3

Plus baseline_created (first run only), run_summary (every successful run) and run_error (failed runs, never charged).

Severity and ranking

Severities are critical, high, medium, low and info, worth 50, 25, 10, 3 and 0 points. A product's priorityScore is the sum of its signals, halved when every variant is unavailable. fix_priority rows are ranked by score and carry rank; the detail rows for each ranked product carry the same rank. Only the top topProducts products get rows; the summary reports how many were suppressed.

Other outputs

  • OUTPUT (key-value store): run summary with counts, thresholds, request counts, robots status, caveats, state info and a small sample of top fixes and first changes.
  • FIX_PRIORITY.csv and PROMOTION_AND_PRICE_DETAILS.csv (key-value store): CSV exports. Store-controlled text that starts with a spreadsheet formula character is prefixed with an apostrophe.
  • The dataset itself can be exported as JSON or CSV from Apify Console or the API.

Illustrative record shape

This is a shape example with placeholder values, not output from a real run.

{
"recordType": "fix_priority",
"rank": 1,
"priorityScore": 35,
"severity": "high",
"code": "COMPARE_AT_BELOW_PRICE",
"codes": ["COMPARE_AT_BELOW_PRICE", "MIXED_COMPARE_AT_ACROSS_VARIANTS"],
"productUrl": "https://shop.example.com/products/example-item",
"productTitle": "Example Item",
"recommendedFix": "Clear or correct the compare-at price ... | Apply the promotion consistently ...",
"affectedVariants": 2,
"allVariantsUnavailable": false
}

Input

FieldDefaultPurpose
storeUrl (required)noneOne public HTTPS storefront URL. Only the host is used.
maxPages4Feed pages of up to 250 products each (1-10). Also bounds the request budget.
maxProducts1000Product cap (50-2500).
topProducts100Ranked products to report (10-500).
deepDiscountPercent60Review threshold for implied discount. 80% or more is always EXTREME_DISCOUNT_CLAIM.
variantSpreadRatio3Flag products whose top variant price is this many times the lowest.
persistentDiscountDays30Days of observed discount before PERSISTENT_DISCOUNT_CLAIM.
requestDelaySeconds1Pause between requests (0.5-10).
stateStoreNamepal-shopify-price-promotion-stateNamed store holding the per-domain snapshot.

Safety and politeness

  • HTTPS only, default port only, no credentials in URLs, no IP literals, no localhost/.local/.internal-style hosts.
  • Every hostname is resolved and all answers must be public addresses; the connection is then made to the validated address while TLS is verified for the hostname.
  • robots.txt is fetched first and checked before every storefront request, including each page and redirect. A 403/401 robots file, a server error, or a timeout means access rules are unknown and the run refuses to continue. A missing robots file (404/410) is treated as no restrictions.
  • Redirects are followed only within the same host over HTTPS; a redirect elsewhere is refused with a hint to use the canonical URL.
  • Hard limits: request budget (maxPages + 4), 8 MB per feed page, 20 s timeout, bounded state size. No proxies, no login, no cookies, no contact or personal data collection.
  • Only public product price fields are read.

Limitations and sample-size caveats

  • A compare-at price is a merchant-entered value. The feed cannot show whether it was ever charged. Findings are review prompts, not proof of a false discount or any legal conclusion; rules differ by market.
  • Currency is not in the public feed. Prices are reported as published and never converted.
  • Small catalogues give weak evidence. The summary warns when fewer than 30 products were analysed or fewer than 10 discounted products were observed.
  • Truncated catalogues are partial. If maxPages or maxProducts cuts the catalogue short, results cover a prefix of the feed and new/removed product detection is disabled until a complete run is stored. Complete coverage is assumed when a page returns fewer than 250 products.
  • Two observations only. Changes that happen and reverse between runs are invisible.
  • "Observed since" is a lower bound. PERSISTENT_DISCOUNT_CLAIM uses the first run that saw the discount and assumes it continued between runs. It can only fire once your stored history spans the threshold.
  • Stores that disable or password-protect /products.json, or that disallow it in robots.txt, cannot be analysed and fail with a clear error. No data is guessed.
  • Products with more than 100 variants are analysed on the first 100.
  • Availability weighting uses the feed's available flag only.

Pricing

The code defines one billing event, audit-completed, and submits it once only after a run has fetched products, pushed all results and saved state. Failed runs (robots denial, unsafe host, no product data, fetch errors) never reach that step and are not charged. This package does not configure any payable plan; the pricing for that event must be set up separately by the Actor owner, and the platform decides whether a charge applies.

Development

The unit tests use only the Python standard library and fake transports; they make no network calls and do not need the Apify platform. From the project folder:

$python -m unittest discover -s tests -t .

Core logic lives in src/ (safety, robots, http_client, parsing, analysis, state, diff, reporting, pipeline); src/main.py and src/storage.py are the only modules that touch the Apify SDK.