Miedema · second location Heerenveen · MSI

Stock per location in Magento: the plan, the limits and the tests

Magento's stock system for multiple locations (MSI) only lowers stock when an order is shipped in Magento, and Business Central never does that today. This page explains the problem, what Vendic builds for it, what we propose for products sold without stock, and how we test it. For Miedema, and for the developer who guides the tests. Please review it before we estimate the module.

24 November 2026 · Vendic · task MIEMW-155 · test environment from pull request #503

202
orders in a recent copy of the shop
0
of them shipped in Magento
~1 min
reservation time with the plan
wk 51/52
target to switch on
In short
  1. With MSI every web order holds a reservation until it is shipped in Magento. Today no order is ever shipped in Magento, so reservations would pile up and the shop would show too little stock.
  2. Vendic builds a module: as soon as Nvision marks an order "ERP processing" in Magento (it already does), the module ships the order in Magento. Nvision builds nothing new.
  3. The module ships each product from a location that has it, with one shipment per location. That solves pickup in Heerenveen for products that are only in Leeuwarden.
  4. Products sold without stock, like Keralit: we propose switching off stock management for them. They are then not shipped in Magento, and that is fine, because there is no stock to correct.
  5. After your review we estimate the module, then build it and test it together with our developer André before switching on in week 51 or 52.

1How Magento counts stock

Each location has its own physical stock. What the shop shows as available is that stock minus open reservations. Example: Leeuwarden has 10, a customer orders 5.

Before the order

Stock 10Available 10

Order placed

Stock 10Available 5

Shipped in Magento

Stock 5Available 5
in stock and availablereserved for an open ordertaken off the stock

The reservation only disappears with a shipment, cancellation or credit memo in Magento. An order finished somewhere else keeps its reservation.

What that would do at Miedema today

Orders are handled in Business Central and Magento never gets a shipment. With MSI on, every order would keep its reservation. Illustration of one product over twelve weeks:

010203040wk 1wk 3wk 5wk 7wk 9wk 11wk 13 On the shelf: 40 Shop shows: 11 stuck reservations
physical stock (from Business Central)available in the shop

2The plan: Magento ships the order itself when it reaches Business Central

Nvision already sets the status "ERP processing" in Magento once an order is in Business Central, and Miedema handles every order that lands there. A Vendic module reacts to that status and ships the order in Magento. The reservation lives about a minute, and Nvision does not need to build anything.

Customer
Magento
Nvision
Business Central
1Places orderDelivery or pickup.
2Reserves stockAvailable drops, stock stays.
3Sends order to BCAs today.
4Order createdMiedema handles every order that lands here.
5Sets status in Magento"ERP processing", as today. Nothing new for Nvision.
6Sees the statusOur module puts the order in a queue.
7Ships per locationPicks a location with stock per product, one shipment per location. Reservation cleared. No e-mail.
8Picks and deliversPhysical stock goes down in BC.
9Sends stock per locationOverwrites Magento's quantities, as today.
new: Vendic module

How the module behaves

In the background
The module never ships inside Nvision's status update. It queues the order and ships a moment later, so a problem never breaks Nvision's call.
Once per order
Only the first switch to the ERP status counts. An order is never shipped twice, also when the status is sent again.
Shipment only
No invoice. A shipment is all Magento needs to clear the reservation, also for orders on account.
No e-mails
Shipped without notifying the customer, and the invoice, shipment and credit memo e-mails go off. The order confirmation stays.
Retry and alert
If a shipment fails, the module tries again and sends an alert to Vendic. The order itself is never blocked.
Payment check
Creating a shipment can trigger a payment capture with some pay-later methods at Mollie. We test this with every payment method Miedema offers.

3Where standard Magento shipping breaks

When Magento ships, it takes the quantity off one location. If that location has less than the shipped quantity, Magento refuses the whole shipment: Not all of your products are available in the requested quantity. Our module works around this in two cases.

Case A: pickup in Heerenveen, product only in Leeuwarden

Order: pickup Heerenveen
BProduct B4 ×
standard Magento
Heerenveen
Product B: 0
0 − 4 < 0: refused
Vendic module
Leeuwarden
Product B: 30
30 − 4 = 26: shipped

The product physically comes from Leeuwarden for the pickup, so the stock comes off Leeuwarden.

Case B: one order, products at different locations

Order: pickup Heerenveen
AProduct A · in Heerenveen2 ×
BProduct B · only Leeuwarden4 ×
Standard: one location for the whole order, one line always fails
Shipment 1 Heerenveen
AProduct A2 ×
Shipment 2 Leeuwarden
BProduct B4 ×

Which location comes first

Delivery
1Leeuwarden
×Heerenveen
Pickup Leeuwarden
1Leeuwarden
×Heerenveen
Pickup Heerenveen
1Heerenveen
2Leeuwarden (transfer)

4Products sold without stock, like Keralit

Miedema sells several products with stock 0, mainly the Keralit range, and wants to sell more of them next year. Allowing backorders lets the customer order them, but Magento still refuses to ship them:

Keralit, 3 ×stock 0, still sold
May the customer order?Backorders on: yes
May Magento ship?0 − 3 < 0: refused
Our proposal: switch off stock management for these products

For products that Miedema sells without stock, Magento stops tracking stock ("Manage Stock: No"). The module then simply leaves them out of the shipment. That is no problem: there is no stock to take off, and Magento ignores stock for these products, so nothing gets stuck in the shop. The rest of the order ships normally.

What it solves
Keralit and similar products never block the automatic shipment, and the list can grow next year without extra work.
What Miedema decides
  • Which products get stock management off, and who keeps that list up to date.
  • What the product page shows for them, now that Magento does not look at stock: the text "Bestelbaar, wordt nageleverd" must keep showing.
  • Whether these products can be picked up, and which date the shop promises for them.
OrderStockStandard MagentoWith the Vendic module
Pickup Heerenveen: 2 × AA: Heerenveen 5 ships1 shipment · Heerenveen
Pickup Heerenveen: 4 × BB: Heerenveen 0, Leeuwarden 30 fails1 shipment · Leeuwarden
Pickup Heerenveen: A + Bas above fails2 shipments · both locations
Delivery: 4 × BB: Leeuwarden 30 ships1 shipment · Leeuwarden
Any order: 3 × D Keralitstock management off fails with backordersleft out, no error

5How we test

The test environment
A copy of the shop with MSI on and the latest code, at miedema-feature-miemw-155-msi-6b0560b306f68.vendic.cloud. Miedema connects the Business Central test company to it. Vendic sets up the two locations and, once built, the module.
How a test runs
Miedema places the order and does the BC steps. The test environment does not run background jobs by itself: ask in the Slack channel with the test number and André runs them. Per test, share the order number, what you did and what you saw, with a screenshot.

Test products: A in stock in both locations, B only in Leeuwarden, D a Keralit product with stock management off.

Test and what to doExpectedWho
1Stock per location
BC sends stock for A, B and D.
Magento shows the right quantity per location for A and B.Miedema
2Delivery order
Order 5 × A. Nvision brings it into BC and sets the ERP status.
Within minutes: one shipment from Leeuwarden, stock Leeuwarden −5, nothing reserved, no e-mail.Miedema with André
3Stock update after shipping
BC sends stock again while the order from test 2 is still in the building.
Available stock does not go back up by 5 (no double sale).Miedema
4Pickup Heerenveen, in stock there
Order 2 × A for pickup Heerenveen.
One shipment from Heerenveen.Miedema with André
5Pickup Heerenveen, only in Leeuwarden
Order 4 × B for pickup Heerenveen.
One shipment from Leeuwarden (the transfer), no error.Miedema with André
6Mixed order
Order A + B for pickup Heerenveen.
Two shipments: A from Heerenveen, B from Leeuwarden.Miedema with André
7Not enough in Heerenveen
Order more A than Heerenveen has.
The shortfall ships from Leeuwarden, or a clear alert. Result decides the final rule.Miedema with André
8Product sold without stock (Keralit)
Order D, alone and together with A.
D is not shipped and causes no error; A ships normally.Miedema with André
9ERP status sent twice
Nvision sends the status again for an order from test 2.
Nothing happens: no second shipment.André
10Sale in the store
Lower the stock of A in BC without a web order.
Magento follows after the next stock update.Miedema
11Cancellation
Cancel an order in BC after Magento shipped it.
Stock follows BC; what the customer sees is acceptable.Miedema
12Payment methods
One test order per payment method (iDEAL, on account, others).
No unexpected capture or payment error after the automatic shipment.Miedema with André

6Who does what

Miedema

1Test products: A in stock in both locations, B only in Leeuwarden, D a Keralit product sold without stock.
2The Business Central location codes for Leeuwarden and Heerenveen.
3Decision: stock management off for all products sold without stock (see section 4), and the list of those products.
4What customers should see in Mijn Miedema once an order is shipped in Magento while it is still being picked.
5Confirm that only the order confirmation e-mail goes out from Magento.
6Which payment methods are active, so each one is tested.
7Connect the BC test company to our test environment; Vendic provides the API access. Nvision only if you need them for it.
8Check that the "ERP processing" status is set for every order that lands in BC, which stock number is sent per location, and whether the stock sync changes a product's stock management setting. Ask Nvision only where you cannot see it yourself.
9Who creates the transfer order from Leeuwarden to Heerenveen, and which order fields are needed from Magento.

Vendic, with developer André

André already knows this shipping logic per location from another Vendic shop and guides the tests.

1Set up the two locations and the API access on the test environment.
2Fire the triggers, run the queues and the cron jobs whenever a test needs them; the test environment does not do this by itself.
3Guide the tests together with Miedema and check the result of each test in Magento.
4After your review of this plan: estimate the module, then build it.

7Next steps

Test environment with MSI on and the latest codeVendic · ready
Review this plan and give feedbackMiedema
Estimate the module with the developerVendic
Test products, location codes, decision on stock management, BC test company connectedMiedema
Build the module: react to the ERP status, ship per location, skip products without stock managementVendic
Run tests 1 to 12 together, share results in SlackMiedema with André
Review results, then the shop side (pickup per location, first possible pickup date)Both
Switch off invoice, shipment and credit memo e-mailsVendic, at go-live
Switch on, before the opening in JanuaryWeek 51 or 52

For the developer

Where things are

Module to build

Guiding the tests