Amirali YaghoutiSenior Software Engineer

business Case study

Marketplace Stock & Pricing Sync

Supplier data arrives as spreadsheets and has to end up as correct prices and stock across WooCommerce and the marketplaces. Every step of that is routine, and every step of it can silently mis-price a catalogue if the matching is wrong.

The business problem

The inputs are supplier sheets whose format varies, and the target is a live catalogue where a wrong price is a real transaction at that price. Matching a spreadsheet row to a product is the risky part: match on the wrong field and you update the wrong item, and the error is only visible once something sells.

What I delivered

  • a2-excel-price-sync, a WooCommerce operations plugin processing batch price and stock updates from CSV inputs generated from the spreadsheet workflow.
  • Brand and reference matching rules for locating the product a row refers to, rather than relying on a single identifier.
  • Warranty and other attribute data carried through the same pipeline, so the marketplace listings stay consistent with the store.
  • Timeout handling built for long-running imports, since a catalogue-sized update does not complete in one request.
  • Validation before mutation, so a sheet that does not match cleanly is reported rather than partially applied.

Technical approach

  • Matching rules are explicit and layered rather than depending on one field, because supplier sheets do not consistently carry the same identifier.
  • Validation runs before anything is written. A partially applied price update across a catalogue is far harder to unwind than a rejected file is to fix.
  • The import is built to survive being long. Timeouts on a batch this size are expected behaviour, and the design accounts for them rather than treating them as failures.
  • Supplier sheets, price lists and exports are kept out of the repository entirely, with the public description staying at the workflow level.

Result and evidence

Price and stock updates run as a controlled import with matching and validation, instead of as manual edits or an unguarded bulk update.

Commercial value

Pricing accuracy across channels is where marketplace selling is won or lost, and it is entirely an operations problem rather than a strategy one.

implementation-brief.readme

Readable implementation brief

implementation_brief {
  project: "Marketplace Stock and Pricing Sync"
  plugin: "a2-excel-price-sync (WooCommerce operations)"
  input: "CSV generated from the supplier spreadsheet workflow"
  matching: "layered brand + reference rules, not one field"
  order: "validate fully, THEN mutate; never partially apply"
  duration: "designed for long imports; timeouts are expected"
  excluded_from_repo: "supplier sheets, price lists, exports,
                       logs, credentials"
}

What this project shows

Validating before mutating is the invariant I would defend. On a live catalogue, the ability to reject a bad file is worth more than the ability to process a good one quickly.

Layered matching rules exist because supplier data is genuinely inconsistent. Assuming a clean identifier is the mistake that produces confidently wrong updates.