Skip to content

Vendor-neutral, engineer-written explanations. Clear definitions first, then practical steps with real examples — no fluff.

How to implement real‑time stock and back‑order rules from WMS?

SB
Written by StageBit Engineering Team
Updated May 2026 5 min readVerified by engineers

Quick Answer

You can implement real-time stock sync and back-order logic in Shopware by connecting your WMS through the Shopware API, then separating available stock, reserved stock, incoming stock, and purchasable stock rules. The key is making sure Shopware never becomes the system deciding inventory truth—your WMS should own the final stock state. The setup below covers API sync structure, back-order conditions, queue handling, overselling prevention, and the validation steps most stores skip.

Before You Start

  • A WMS with API or webhook support — polling CSV exports every hour is not enough for live inventory.
  • SKU consistency across systems — mismatched SKUs are the fastest way to corrupt stock data.
  • Shopware scheduled tasks and queues working — delayed message queues cause stock drift during traffic spikes.
  • Separate staging environment — you should never test stock reservation logic on live orders.
1

Define inventory ownership

Decide which system controls final inventory numbers before building anything. In most setups, the WMS should be the inventory source of truth and Shopware should consume updates. That means stock adjustments, warehouse transfers, purchase order receipts, and returns all originate in the WMS first. Stores get into trouble when admins manually edit stock in Shopware while the WMS is also updating quantities every few minutes.

  • Define whether Shopware can ever overwrite stock values
  • Separate physical stock from sellable stock
  • Document reservation and cancellation timing
IMPORTANT If two systems can both edit stock directly, you will eventually oversell during busy periods.
2

Build the stock sync layer

Connect the WMS to Shopware using either API push events or a middleware layer. Middleware is usually the safer option because it lets you validate stock payloads before they hit Shopware. Real-time sync should update available quantity, incoming quantity, warehouse location, and fulfillment status separately. Avoid rebuilding products through imports every time stock changes—that creates unnecessary indexing load.

  • Use webhooks where possible instead of polling
  • Queue inventory updates asynchronously
  • Log every failed inventory update payload
PRO TIP Keep a separate stock audit table outside Shopware so you can trace exactly which system changed inventory and when.
{
"sku" : "TSHIRT-BLK-M",
        "available_stock" : 42,
        "reserved_stock" : 5,
        "incoming_stock" : 20,
        "backorder_allowed" : true
}
3

Configure stock reservation rules

Real-time stock only works if reservations happen immediately during checkout. Otherwise two customers can buy the same final unit before the WMS receives the order. In Shopware, reservation handling is usually implemented through order state transitions, custom subscribers, or middleware logic tied to checkout completion. Most stores reserve stock too late—after payment capture instead of during checkout confirmation.

  • Reserve inventory as soon as the order is created
  • Release reservations automatically on failed payment
  • Expire abandoned checkout reservations after a timeout
COMMON MISTAKE Developers often reserve stock only after payment succeeds, which breaks during delayed payment methods like bank transfer or Klarna.
4

Implement back-order conditions

Back-orders should never simply mean “allow negative stock.” Good implementations check supplier ETA, inbound stock quantity, warehouse priority, and customer promise windows before allowing purchase. For example, you may allow back-orders only if inbound stock arrives within seven days and the incoming quantity already exists in the WMS purchase order feed.

  • Create separate sellable stock rules for pre-orders and back-orders
  • Display accurate dispatch estimates on PDP pages
  • Block checkout when supplier ETA becomes unknown
IMPORTANT Negative stock without inbound inventory validation creates customer support problems faster than almost any other inventory issue.
5

Validate high-traffic scenarios

Most inventory integrations look stable during testing because only one person is placing orders. Problems appear during flash sales, marketplace imports, ERP sync bursts, or warehouse delays. Simulate concurrent checkouts against the same SKU and monitor whether reservations, cancellations, and WMS acknowledgements remain accurate. This is where race conditions usually appear.

  • Test multiple simultaneous orders against one SKU
  • Verify queue retry behaviour during API failure
  • Compare WMS stock against Shopware every few minutes
PRO TIP Add automatic alerts when inventory drift exceeds a small threshold instead of waiting for customer complaints.

Shopware WMS Inventory Checklist

0 of 8 complete

Mistakes Most Developers Make

! Updating stock with imports

What happens: Large imports trigger reindexing delays and stock lag during traffic spikes.

Fix: Push lightweight stock updates through API endpoints or queues instead.

! Allowing unlimited negative stock

What happens: Customers purchase products that suppliers cannot actually deliver on time.

Fix: Tie back-order permissions to verified inbound purchase orders and ETA rules.

! Missing reservation expiry logic

What happens: Abandoned carts keep inventory locked for hours and products appear out of stock.

Fix: Automatically release reservations after a defined timeout window.

Key Takeaway

The short version: successful Shopware inventory setups treat the WMS as the inventory authority and use Shopware mainly for storefront availability and checkout control. Real-time stock sync alone is not enough—you also need reservation timing, queue retry handling, and strict back-order validation. Most overselling problems come from delayed reservations or multiple systems editing inventory simultaneously. Test concurrency hard before launch and monitor inventory drift continuously after go-live. Start with Step 1—that one alone handles most of it.

Was this answer helpful?

Your feedback helps us improve our answers.

Still need help?

Talk to our Shopware experts

We've handled GDPR/CCPA compliance for dozens of EU & US Shopware stores.

Talk to Shopware Experts

Tell us more about your brand!

Rohit Kundale, Our VP of Sales and Marketing is ready to meet with your team.