Work / Integration · 2025

PlayWell Bikes stock and product sync

PlayWell Bikes' Shopify store follows its supplier's catalog through two generations of this integration. The first is a Lumen 9 app whose routes are the job steps: it downloads the supplier CSV over FTP, then uploads, updates and deletes products through the Shopify REST API, driven by cron. The 2025 version, which I wrote, is a set of Python scripts that cache products in SQLite and push only changed stock in batched GraphQL inventory mutations. The integration is live.

  • live
  • client work
  • integration
Type
Integration · E-commerce integration: supplier feed → Shopify stock sync
Built with
PHP, Lumen, MySQL, Flysystem (FTP), Shopify REST Admin API, Python, SQLite, Shopify GraphQL Admin API, Bash, cron
Also uses
PHPUnit
Last active
2025

What it does

  • v1: FTP download and parse of the supplier CSV, then upload, update and delete as separate endpoints.
  • v1: price-bracket markup rules and a brand/ID exclusion list.
  • v1: cron-driven schedule (import every 3 h, update every 10 min).
  • v2: Shopify products and variants cached in SQLite by SKU and inventory item.
  • v2: configurable authenticated feed download.
  • v2: changed-quantity detection with batched inventory mutations and audit logs.

How it is built

  • v1 is a Lumen HTTP app whose routes are the job steps (download, parse, upload, update, delete), triggered by external cron + curl and talking to Shopify over REST. v2 replaces the stock path with stateless Python scripts and an SQLite cache, chained by a bash pipeline, sending batched GraphQL inventory mutations.

My part

  • Rewrote the stock sync in Python with an SQLite cache and batched GraphQL mutations.

Decisions

  • Rewrite the stock sync from REST per-item calls to GraphQL batch mutations.
  • Only push quantities that changed, tracked in SQLite with audit rows.
  • Drive v1 jobs from external cron hitting HTTP endpoints rather than Lumen's scheduler.

Skills

  • Shopify API integration (REST and GraphQL)
  • Supplier feed ingestion (FTP, authenticated HTTP)
  • Batch API optimization
  • PHP (Lumen) and Python scripting

No public link or repository for this project.

All projects →