Skip to content

Import older Shopify orders as stock-neutral history - #5

Merged
mpge merged 7 commits into
mainfrom
feat/historical-orders
Oct 23, 2026
Merged

mpge merged 7 commits into
mainfrom
feat/historical-orders

Conversation

@mpge

@mpge mpge commented Oct 23, 2026

Copy link
Copy Markdown
Member

TL;DR: Adds an optional date cutoff for importing older Shopify orders as history, so backfills preserve current stock instead of treating past sales as new warehouse work.

Orders before the cutoff use core's historical creation path: no stock/bin/serial allocation, reservations, approvals or new-order announcements. Fulfilled history is recorded as shipped and cancelled history as cancelled; later updates remain historical and never restock it. Orders on/after the cutoff retain normal behavior. Mappings and external references keep imports idempotent. Date-filtered records skipped by this version can be revisited as history; manually ignored records remain ignored. Older start dates trigger a clear read_all_orders scope check.

Set the import start date, choose the history cutoff, test the connection and run a full sync. Dates use UTC; variant mappings are required. No shipment is created for a historical order.

Stacked on #4; merge #3 and #4 first. Validation: all 138 plugin tests pass (801 assertions); UI bundle builds. Tests cover zero current stock, repeat deliveries, cancellations, changed cutoffs, ignored records and older-order scopes. No live store was changed.

GitHub-hosted CI currently cannot start: GitHub reports failed account payments or a spending-limit restriction. This is a runner-start restriction, not a build/test failure; the local results above are available for review.

@mpge
mpge changed the base branch from feat/client-credentials-auth to main October 23, 2026 15:46
@mpge
mpge merged commit 1adfb99 into main Oct 23, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant