Automating Pre-Order Inventory and Arrival Dates on Shopify

Overview
For high-performing eCommerce operations, keeping customers informed while avoiding operational friction is crucial—especially when dealing with incoming stock and pre-orders. One Shopify merchant approached me with a challenge: they needed a way to automate inventory updates and arrival date messaging for products that were on the way but not yet received.
Using Shopify's Admin API and Stocky's Purchase Order data, I built a custom automation system that helped them manage pre-orders at scale, improve customer transparency, and eliminate manual work.
The Challenge
The client's inventory was spread across multiple Shopify locations:
- Retail store
- Warehouse
- Pre-Order location (for items in transit)
The problem? Shopify doesn't natively expose "available" inventory per location or allow dynamic syncing of Stocky's expected delivery data to the storefront. That meant:
- Manual tracking of POs and variant quantities
- No way to display "arrival dates" for pre-orderable products
- Operational risk due to overselling or outdated stock info
The team needed a system that would automatically track changes to incoming inventory, update Shopify's available stock for the Pre-Order location, and reflect expected delivery dates—all without human intervention.
Solution Design
I built a custom Node.js app that runs every 30 minutes (or on demand) and fully automates their pre-order logic:
Syncing Stocky POs to Shopify
- Pulls all active purchase orders from Stocky
- For each variant with an incoming quantity > 0, the app:
- Updates the Pre-Order location's available quantity
- Sets a variant-level arrival date metafield
- When incoming quantity drops to 0 (e.g., after PO receipt or cancellation):
- Resets the Pre-Order quantity to zero
- Deletes the arrival date metafield
Enabling Safe Pre-Orders
- While items are in the Pre-Order location, Shopify can sell them as long as stock exists
- Shopify's inventory system prevents overselling by respecting location-level available stock
Post-Arrival Logic
- When stock is marked "Received" in Stocky:
- Shopify automatically moves the inventory to the destination location
- The app clears out pre-order inventory and arrival dates to reflect the live state
Technical Highlights
- Shopify Admin API usage: for precise updates to variant inventory and metafields
- Stocky API integration: for accurate PO and delivery date syncing
- Rate-limit protection: delays applied to avoid API throttling
- Batch processing: handles hundreds of variants efficiently
- Manual override support: via a secure POST /preorder endpoint
Tech Stack
Component | Purpose |
---|---|
Node.js + Express | Server framework |
Stocky API | Source of PO data and delivery estimates |
Shopify Admin API | Inventory and metafield updates (GraphQL) |
node-cron | Scheduled automation |
dotenv, fetch | Environment config and HTTP integration |
Results
The automation delivered clear wins across the board:
Metric | Before Manual Automation | After Implementation |
---|---|---|
Manual inventory edits | Frequent | Eliminated |
Arrival date accuracy | Manual, often delayed | Automatic & always current |
Overselling risk | Moderate | Fully controlled |
Update speed after PO changes | Hours/days | Within 30 minutes |
"We no longer have to touch a single setting after placing a PO. The storefront just updates itself."
Why It Matters to eCommerce Managers
If you're responsible for:
- Site accuracy
- Customer satisfaction
- Operational alignment with logistics and marketing
…then a pre-order automation system like this one frees up your team to focus on growth, not repetitive admin work. It supports:
- Seamless customer experiences
- Smarter inventory management
- Reduced operational overhead