Commerce Software

Warehouse Stock to Shopify — Synchronized Safely, Automatically, Auditably

Import ERP stock exports into Shopify without overselling. A four-step wizard with full diff preview, oversell-safe inventory logic, snapshot exports, complete audit logging, and CLI automation for scheduled syncs.

01

Oversell Protection

On-hand-based sync preserves committed stock; optimistic locking blocks stale writes during concurrent orders

02

Operational Safety

Four-step wizard with full diff preview, explicit confirmation, snapshot exports, and dry-run CLI mode

03

Time Savings

Replaces manual per-product stock edits with a one-click sync or a fully automated nightly cron with FTP fetch

04

Compliance & Auditability

Complete JSONL audit trail — user, IP, timestamp, and every SKU change — for accountable inventory operations

What it's about

PM Shopify Stock Sync

PM Stock Sync for Shopify bridges the gap between your warehouse ERP and your Shopify store. Your ERP exports physical stock levels as XLS, XLSX, or CSV files — the tool parses them, compares every SKU against your live Shopify inventory, shows you exactly what would change, and only then pushes the update via the Shopify GraphQL Admin API.

The core design principle: the tool sets Shopify's on-hand quantity, never the available quantity. Shopify then calculates availability itself, so stock reserved for in-flight orders is never accidentally restored — eliminating the classic oversell scenario that plagues naive inventory imports.

Run it interactively through the step-by-step web wizard, embed it directly inside your Shopify Admin, or automate it entirely via CLI and cron — including automatic retrieval of the newest export file from your data server via FTP. Every action is written to an audit log, and one-click snapshot exports give you a rollback point before every sync.

Features

Thought through to the daily workflow.

Every building block is focused on a clear benefit and fits into existing processes.

01
Feature Section

The web interface breaks the sync into four independent steps: Parse, Fetch, Diff, Apply. After each step you see the results and decide whether to continue. Nothing is written to Shopify until you explicitly confirm the final step.

01

Four-Step Sync Wizard — Preview Before You Push

The web interface breaks the sync into four independent steps: Parse, Fetch, Diff, Apply. After each step you see the results and decide whether to continue. Nothing is written to Shopify until you explicitly confirm the final step. The diff table shows every planned change per SKU: current on-hand, new on-hand, delta, committed stock, and the estimated available quantity after the sync. Items with open orders are flagged so you can see exactly how reservations are preserved.

  • Step 1 parses the file and shows row counts, categories, brands, and warehouse breakdown
  • Step 2 fetches complete Shopify inventory via paginated GraphQL queries
  • Step 3 computes a full diff — old value, new value, delta, committed, and estimated available
  • Step 4 applies changes only after explicit confirmation
  • Unmatched SKUs are listed separately so discrepancies between ERP and Shopify are visible immediately
02

Oversell-Safe Inventory Logic

Most import tools blindly overwrite the available quantity — and silently restore stock that is already reserved for unshipped orders. PM Stock Sync sets the on-hand quantity instead and lets Shopify calculate availability as on-hand minus committed minus reserved. Reserved stock stays reserved. Writes use Shopify's modern inventory mutation with per-quantity optimistic locking: if a quantity changed in Shopify between fetch and apply — for example, because a customer ordered during the sync — the update for that item fails safely instead of overwriting fresh data. Idempotency keys make retries safe.

  • Sets on-hand, not available — committed stock for open orders is never overwritten
  • Optimistic locking detects concurrent changes and prevents stale writes
  • Idempotent mutations make retries safe without double-applying changes
  • Changes are pushed in batches of up to 100 items per API call
  • Built-in rate limiting respects Shopify API throttling
03

Flexible File Import — XLS, XLSX, and CSV

The parser auto-detects columns by matching header names against German and English aliases — SKU, Artikelnummer, Stock Value, Bestand, Pick Location, Lager, and many more. CSV delimiter detection is automatic. If your ERP uses unusual column names, the mapping is configurable via environment variables. Matching against Shopify can run on SKU or on barcode/EAN — useful when the same article number appears across multiple sizes and the barcode is the reliable unique key.

  • Supports XLS, XLSX, and CSV with automatic delimiter detection
  • Auto-detection of columns via German and English header aliases
  • Configurable match key: Shopify SKU or barcode/EAN
  • Configurable stock column override for non-standard exports
  • Filters by SKU, parent article, category, and brand for targeted partial syncs
  • Duplicate SKU rows (for example, one row per warehouse) are summed automatically
04

Multi-Warehouse Mapping

A central configuration file maps each warehouse identifier from your ERP export to a Shopify location. Multiple warehouses can feed the same Shopify location (quantities are summed), map to separate locations (for example, a B2B/B2C split), or be excluded entirely.

  • One configuration file as the single source of truth for backend and UI
  • Sum multiple physical warehouses into one Shopify location
  • Split warehouses across separate Shopify locations for B2B and B2C
  • Exclude specific warehouses (for example, returns storage) from the sync
  • Per-warehouse default selection, adjustable per run via UI checkboxes
05

Automation — CLI, Cron, and FTP Auto-Fetch

Everything the wizard does interactively also runs as a single CLI command: parse, fetch, diff, and apply in one invocation. Without the apply flag it is a dry run — perfect for a scheduled preview before the real sync. With FTP credentials configured, the tool automatically downloads the newest export file from your data server before each run.

  • Full sync pipeline as one CLI command for cron scheduling
  • Dry-run mode: preview all changes without writing anything
  • Silent mode for clean cron logs
  • Automatic FTP fetch of the newest XLS/XLSX/CSV from a remote data server
  • Optional zero-missing mode: set stock of SKUs absent from the import file to zero — for discontinued products
  • All CLI filters available: SKU, parent, category, brand, warehouse selection
06

Snapshot Export and Full Audit Logging

Before any sync, export the current Shopify inventory as an XLSX file that matches the import format — a snapshot you can re-import for a manual rollback. Every action is logged as structured JSON: who did what, when, from which IP, with every single SKU change recorded old-to-new.

  • One-click XLSX export of live Shopify stock, including on-hand, available, and committed per location
  • Export format matches the import format — round-trip verified
  • JSONL audit log records every parse, fetch, diff, apply, and export with user, IP, and run ID
  • Every applied change logged per SKU with old and new values
  • Built-in log viewer in the web UI
07

Runs Standalone or Embedded in Shopify Admin

The tool works in two modes. Standalone, it is protected by HTTP Basic Auth, CSRF tokens, and an optional IP whitelist. Embedded, it loads directly inside the Shopify Admin as a custom app, authenticated via App Bridge session tokens — your team never leaves the Shopify backend.

  • Embedded mode with Shopify App Bridge and verified session tokens (JWT)
  • Standalone mode with HTTP Basic Auth and CSRF protection
  • Optional IP whitelist as an additional network-level barrier
  • Path-traversal-safe file handling for uploads and server-side files
  • Configurable UI: filters and diff table columns adjustable via environment variables
08

Sales Reporting Module

A companion reporting module pulls sold line items for any date range from Shopify via GraphQL: product, variant, SKU, EAN, quantities sold, and selling prices — aggregated per variant and exported as an Excel-ready CSV. An empty purchase-price column plus a prebuilt margin formula turn it into an instant profitability worksheet, with direct deep links to edit each product in the Shopify Admin.

  • Sales export for any date range, paid orders only
  • Report variants for net revenue and net revenue minus returns
  • CSV output optimized for German Excel (semicolon-separated, UTF-8 with BOM)
  • Purchase price column and automatic margin formula for cost analysis
  • Deep links to each product and variant in the Shopify Admin
How it works

A clear path to the result.

  1. 01

    Step 1 — Connect Your Store

    A Shopify custom app with product and inventory scopes provides API access. Warehouse identifiers from your ERP export are mapped to Shopify locations in a single configuration file.

  2. 02

    Step 2 — Load Your Stock File

    Upload the ERP export in the web UI, point to a file on the server, or let the tool fetch the newest file automatically from your data server via FTP. Columns are detected automatically; filters narrow the sync to specific SKUs, categories, or brands if needed.

  3. 03

    Step 3 — Review the Diff

    The tool fetches your live Shopify inventory and presents a complete change preview: old and new on-hand values, deltas, committed stock, and the estimated availability after the sync. Unmatched SKUs are listed separately.

  4. 04

    Step 4 — Apply with Confidence

    After explicit confirmation, changes are pushed in batches with optimistic locking and idempotent retries. Every applied change is written to the audit log.

  5. 05

    Step 5 — Automate

    Once the mapping is verified, schedule the full pipeline as a cron job: automatic FTP fetch, dry-run previews, silent apply runs, and optional zeroing of discontinued SKUs — hands-off daily synchronization.

Who is it for?

Made for concrete requirements.

The solution is a particularly good fit for these teams, roles and business models.

Retailers with ERP-Managed Warehouses

Your ERP is the source of truth for physical stock. PM Stock Sync makes Shopify reflect it accurately — without overwriting reservations from open orders and without manual spreadsheet work.

Fashion and Apparel Stores

Large catalogs with size and color variants, article numbers repeated across sizes, and frequent stock movement. Barcode/EAN matching and per-variant diffing are built for exactly this.

Multi-Warehouse Operations

Several physical warehouses, one or more Shopify locations, B2B and B2C channels. The mapping layer sums, splits, or excludes warehouses per your setup.

Agencies and E-Commerce Operators

Run syncs for client stores with full auditability: every action logged with user, IP, and per-SKU detail. Snapshot exports create rollback points before every intervention.

Operations Teams

Set up the automation once, then monitor via the log viewer. Dry-run crons preview the daily changes; apply crons execute them overnight.

Tech & scope

The key details at a glance.

Type
Self-hosted web application with CLI mode
Runtime
PHP 8.3+
Spreadsheet engine
PhpSpreadsheet (XLS, XLSX, CSV read; XLSX write)
Shopify integration
GraphQL Admin API, custom app, three scopes
Deployment modes
Standalone web UI, embedded Shopify Admin app, CLI/cron
Interface language
German UI
File formats
XLS, XLSX, CSV (auto-detected delimiter)
Match keys
Shopify SKU or barcode/EAN
Batch size
Up to 100 inventory updates per API call
Logging
JSONL audit log with per-SKU change records
Rollback
XLSX snapshot export matching the import format
Data storage
Local server only — no third-party services
Author
premotion media
Availability
On request from premotion media
FAQ

Frequently asked questions.

How does the tool prevent overselling?

It sets Shopify's on-hand quantity instead of the available quantity. Shopify then calculates availability itself by subtracting committed and reserved stock, so units reserved for open, unshipped orders are never accidentally restored by a sync.

What happens if a customer orders while a sync is running?

Every write uses optimistic locking: the update includes the on-hand value that was fetched earlier, and if Shopify's value has changed in the meantime, that item's update fails safely instead of overwriting the newer data. Retries are idempotent.

Which file formats and column layouts are supported?

XLS, XLSX, and CSV. Columns are detected automatically via German and English header aliases (SKU, Artikelnummer, Stock Value, Bestand, Pick Location, Lager, and more). Custom column names and an alternative match key (barcode/EAN instead of SKU) are configurable.

Can I test a sync before applying it?

Yes — that is the default. The wizard shows a complete diff of every planned change before anything is written, and the CLI runs as a dry-run preview unless the apply flag is set. You can also filter to a single SKU, category, or brand for a small test sync.

Does it support multiple warehouses and Shopify locations?

Yes. Each warehouse identifier in your ERP export maps to a Shopify location. Multiple warehouses can be summed into one location, split across locations (for example, B2B vs. B2C), or excluded from the sync entirely.

Can the sync run automatically?

Yes. The full pipeline runs as one CLI command suitable for cron: automatic FTP retrieval of the newest export file, silent mode for clean logs, and an optional mode that zeroes out SKUs no longer present in the import file.

What happens to products in Shopify that are not in the import file?

By default they are left untouched. The optional zero-missing mode sets their on-hand stock to zero — useful for clearing discontinued products — and every such change appears in the diff preview and the audit log.

Is there a record of what was changed?

Yes. Every parse, fetch, diff, apply, and export is logged as structured JSON with timestamp, user, IP, run ID, and every single SKU change old-to-new. A built-in log viewer shows recent activity, and pre-sync XLSX snapshots provide manual rollback points.

Ready?

Your Warehouse and Your Shopify Store — Finally in Sync

PM Stock Sync for Shopify turns error-prone manual inventory updates into a safe, repeatable, fully audited process. Parse your ERP export, review every change before it happens, and push updates that respect open orders — interactively in the wizard, inside your Shopify Admin, or fully automated overnight. Developed and supported by premotion media in Austria. Deployment, integration into your hosting environment, and pricing are available on request.

Discuss your project