Change walkthrough · for acceptance

Out-of-stock handling in order sync

Since Wednesday, an order with one short line no longer fails as a whole. The lines in stock go to the ERP and the warehouse as normal, the short line waits in the shop as a backorder, and the customer is told and can choose to wait or cancel that item.

For
Mette Ravn, Jens Kofoed, Karin Holm; Sofie in copy
From
Signe, with Tomasz Wójcik (build) and Ines Ferreira (admin screens, email), Fieldwork Digital
Date
Thursday 12 November 2026
Live since
Wed 11 Nov, 15:40 · tag v1.0.3 in the shop repo (branch fix/oos-lines)
Reply by
Wednesday 18 November 2026

What we need from you

A yes or a no on the change, and answers to four decisions we made on your behalf: how long a backorder may wait (Karin), free shipping on the second parcel (Karin, in writing), no choice email for trade customers (any of you), and a stock buffer of 2 (Jens). Everything can be seen in the shop admin under Orders › Backorders, and tried on staging with the steps further down.

Why we changed it

Stock syncs from the ERP every 5 minutes, as agreed for go-live on Monday 2 November. Inside those 5 minutes two customers can buy the last one or two pieces, or the ERP count is simply wrong, as with the showroom piece taken from stock on Bornholm and never booked.

Before the change, the ERP answered "line short" for one line and the whole order was rejected as "Sync failed". The customer had paid and had a confirmation email. Nobody picked the order. Mette only found these orders by looking at the failed list.

26 hours was the longest such an order sat: a pair of Skagen armchairs, from Tuesday 3 November in the evening to Wednesday 4 November at 19:00.

From Monday 2 to Tuesday 10 November the shop took 2,847 orders. 17 of them (0.6%) had a line the ERP could not cover:

Kind of orderOrdersWhat happened
Several lines, one short11Whole order "Sync failed", handled by hand by Mette and Tomasz. 6 were caught only because Jens happened to see the stock.
One line, short6Failed too; Mette cancelled and refunded each within the hour.
Total170.6% of 2,847 orders

What you will notice

Six stops, in the order you will run into them. Each says what happens now, what happened before, and where to see it.

1. The order is split instead of rejected

Now
The lines with stock go to the ERP and the warehouse as normal; Jens sees them on his pick list. The short line becomes a backorder line with status "Awaiting stock" and stays in the shop only.
Before
The whole order was rejected as "Sync failed".
Where to see it
The order shows as "Partly sent"; the short line is on Orders › Backorders.
Mostly for
Mette, Jens

2. The customer gets an email and a choice

Now
Right after the split the customer gets "Part of your order will ship later", in English, Danish, Norwegian and Swedish. It says what ships now, what is delayed, and the expected date if the ERP has one (the supplier delivery date in the ERP field exp_date; when it is empty, which is often, the email says "we'll write when we know"). Two links: "wait for it" (the default) and "cancel this item and refund it". The customer has 72 hours to click; no click means they keep waiting.
Before
No email. The customer had a confirmation for an order that was not moving.
Where to see it
On staging, the inbox at /dev/mail (step 2 of the checks below).
Mostly for
Mette

3. Cancelling refunds that line only

Now
"Cancel this item" refunds the price of that line through the payment provider, for all 4 payment methods. Shipping is not refunded unless the whole order is gone. A part paid by gift card goes back onto the gift card.
Before
Mette cancelled and refunded by hand.
Where to see it
Orders › Refunds, and the daily refund export, which has a new column "reason: backorder".
Mostly for
Sofie, Mette

4. A new list: Orders › Backorders

Now
Every open backorder line, oldest first, with order number, customer, SKU, days waiting and the customer's choice. Lines waiting more than 5 days carry a red badge. This is the list Mette works from.
Before
The failed-sync list, which only showed that something had gone wrong.
Where to see it
Shop admin, Orders › Backorders.
Mostly for
Mette

5. Stock comes back, the line ships by itself

Now
When the 5-minute sync shows stock again, the line is released automatically: it goes to the ERP as a new order line and onto Jens's pick list, and the customer gets the normal shipped email. If the order had flat-rate freight, the second parcel is not charged again (see the decision on free second parcels).
Before
Someone had to notice the stock and re-enter the order.
Where to see it
The line leaves Orders › Backorders and appears on the pick list.
Mostly for
Jens, Mette

6. The last two pieces show as out of stock

Now
For a SKU with ERP stock of 2 or less, the shop shows "out of stock", so the 5-minute gap cannot oversell the last pieces. The buffer of 2 is a first guess and can be changed per SKU in the admin (field "stock buffer"). 38 of 412 SKUs are affected right now.
Before
The shop sold down to the last piece the ERP reported.
Where to see it
Any product in the admin, field "stock buffer".
Mostly for
Jens, Karin

We have not changed how often stock syncs. It is still every 5 minutes.

Decisions we made for you

We had to pick something to ship. These are our picks; please say yes or no to each.

Decision

A backorder waits 14 days at most

After 14 days the line is cancelled and refunded automatically and the customer is emailed. 14 is our guess; Karin knows the suppliers' lead times better. Some suppliers, the teak ones from Bali, are at 8 to 10 weeks, and those SKUs should probably never go on backorder but show "out of stock" instead.

Karin: the right number of days, and the list of SKUs that should not take backorders.

Decision

The second parcel ships free

Each split order costs Arkona roughly DKK 80–120 in extra freight. At about 0.6% of orders, that is maybe 50 split orders a month at current volume, around DKK 5,000 a month. Karin said "sounds fine" on the phone on Tuesday; we need it in writing.

Karin: yes or no, in writing.

Decision

Trade customers get a phone call, not the email

The 212 active trade accounts, across the 4 price tiers, do not get the choice email. Their short lines go on the backorder list marked "trade", and Mette phones. Our reason: project customers often need all items together and may want the whole order held. We have not asked any of them.

Any of you: is that right for your trade customers?

Decision

A stock buffer of 2

We do not know how often the last piece really goes in the showroom, so 2 may be too cautious. It can be changed per SKU.

Jens: keep 2, lower it, or set it per SKU?

Things that surprised us

Flag

The ERP reports one short line at a time

The ERP's "short" answer (HTTP 409, code STOCK_SHORT) names only the first short line. For an order with two short lines we get one error and have to send again. We handle that in a loop of up to 5 lines. If you ever see an order with 3 or more short lines, tell us.

Flag

Dates in the email and time zones

The ERP sends exp_date in Danish time; the shop works in UTC. On staging we saw one date a day off. It is fixed, but please look at the dates in the emails you receive while testing.

Not done

Split orders to Norway mean two customs forms

Customs paperwork for Norway is per parcel, so a split Norway order needs two customs forms. We have not changed the packing slip. In the first 9 days there were 41 Norway orders and none was split. Jens, you know this better than we do: tell us what the second parcel needs.

How to check it on staging

On shop.staging.arkona.example, with the test login Mette has. No real money moves: the payment provider is in test mode. Step 4 waits on the 5-minute stock sync.

  1. An order with enough stock. In the admin open Products › TEST-STOCK-3 (a test chair with ERP stock 3). As a customer, put 2 in the cart and check out with the test card.

    You should see: the order accepted and confirmed, status "Sent to ERP".

  2. An order with one short line. Put 1 × TEST-STOCK-0 (stock 0) and 1 × TEST-STOCK-3 in the cart and check out.

    You should see: the order in status "Partly sent"; one line sent; one line on Orders › Backorders as "Awaiting stock"; and within 1 minute an email in the staging inbox at /dev/mail.

    Wrong would be: the order in "Sync failed".

  3. Cancel the item. In that email, click "cancel this item".

    You should see: the backorder line "Cancelled", and a refund in Orders › Refunds with reason backorder, for the price of that line only. Shipping unchanged.

  4. Stock comes back. Repeat step 2. Then, in the ERP test console, set TEST-STOCK-0 to 5. Tomasz can open the console for you.

    You should see: within 5 minutes the line leaves Orders › Backorders and appears on Jens's pick list.

    Wrong would be: the line still on Backorders after 10 minutes. Tell us.

  5. The buffer. As a customer, open TEST-STOCK-2 in the shop, then the same SKU in the admin.

    You should see: "out of stock" in the shop; stock 2 and buffer 2 in the admin.

  6. A trade customer. Log in as trade-test@arkona.example and do step 2.

    You should see: no email, and the short line on Orders › Backorders marked "trade".

What your answer sets off

Please answer by Wednesday 18 November, so we can close this before the hypercare invoice. Hypercare ends Friday 13 November.

If it is a yes

We mark v1.0.3 as accepted. Tomasz sets the stock buffer and the 14-day rule to what Karin decides. The invoice stays as it is: the work took about 1.5 days, inside hypercare, and we absorb it. Hypercare closes on Friday 13 November as planned.

If it is a no

Tell Signe what is wrong. Anything small we fix by Monday 16 November. Anything that changes one of the decisions above, we talk through on the daily call.