Sun - Thu, 9am - 5pm
Guides

Linking your online store to your stock: why the site sells what ran out, and what stops it

ZEMAVO Technology 10 minutes read
Linking your online store to your stock — ZEMAVO Technology

The store shows one number, the warehouse holds another, and between them somebody corrects by hand. So you sell what is not there, or hide what is there. A practical guide to what settles it: who owns the balance, why the codes are the whole project, why speed does not close the gap, and five questions to ask anyone offering you an integration.

Anybody selling online in Egypt with a real warehouse behind them knows this phone call: a customer ordered from the site, the item sold in the shop yesterday, and somebody now has to ring them and say the order is not going out. The customer does not come back.

The problem is not the employee’s attention. The problem is that the balance has two sources, and any number with two sources will disagree. This article is about what actually settles that, and about what is said to settle it and does not.

Two errors, and one is far more expensive

When the store’s balance differs from the warehouse’s, exactly two errors follow:

Selling what is not there. You see this one. It costs you an apologetic phone call, possibly a refund, a bad review, and the customer. In a market where people buy from whichever site came up first, the customer you apologised to does not return, because they found somebody else in the same minute.

Hiding what is there. This one you never see. An item reached the warehouse on Sunday and appeared in the store on Thursday, so for five days it read “out of stock” while sitting on the shelf. Nobody complains about an order that never happened, so this error shows up in no report and you cannot say what it cost. For anyone who has measured both, it is the larger of the two by a clear margin — because it happens every day and never makes a noise.

So the objective is not “better accuracy” in general. The objective is removing the second source.

Who owns the balance? One question to answer before anything else

Before any software, any integration and any quotation, answer this: which of your systems owns the balance? Everything else reads from it.

In eight businesses out of ten the right answer is the warehouse system, not the store. The reason is simple: the warehouse is where receipts from suppliers, issues, inter-branch transfers, returns and stocktakes are recorded. The store knows one kind of movement only: an online sale. Making the store own the balance is letting the blind lead.

From that, the direction of sync is one way: quantities go down from the warehouse system to the store, and orders come up from the store to the system. There is no third direction.

If anybody offers you “two-way stock sync”, ask what happens when the two numbers disagree at the same moment. There is no answer in which one side does not lose its data. Two-way stock sync looks like generosity and is in fact a refusal to name the owner.

The codes are the whole project — not the integration

This is where most projects die, and it is the part the quotation does not mention.

The software matches a store product to a system item on one thing: SKU or barcode. Not the name, and it never will be the name, because the name in the store is written for a customer and the name in the system is written for a storekeeper. So if your store catalogue has no codes, or has codes typed by whoever uploaded the products without looking at the system, you do not need an integration yet. You need a week of work on the item list.

Three common traps:

  • Sizes and colours. What sells is not “cotton shirt” but “cotton shirt, blue, large”. Each of those has its own balance and its own code. Any integration matching at product level rather than variant level will push a meaningless aggregate: the store shows thirty in stock and none of them is your size.
  • The item entered twice in the system. Two codes means two balances, each correct on its own line and both wrong in the total. The integration will carry one of them.
  • Units of measure. Bought by the carton, sold by the piece, listed in the store by the piece. If the conversion factor is wrong, the integration carries a wrong number with complete confidence.

So ask anyone quoting for one report before the contract: the list of your store’s products that have no code in your system. That report tells you the real size of the job, and anybody who cannot produce it has not opened your store yet.

The gap speed does not close

Everybody asks how often it syncs. The answer matters less than it looks.

Say every five minutes, which is good. Within that five-minute window the last piece can sell in the shop and a customer can order it on the site. Say it is instant, by push notification: there are still seconds between the customer clicking buy and the quantity being deducted, and in fast-moving retail that is enough for two orders on one piece.

So speed lowers the probability without removing it. What removes it is something else entirely, and simpler than any of the above: hold a quantity back from online selling. Do not push the full balance — push the balance minus two, or five, depending on your turnover. The store stops selling while there is still stock in the warehouse.

You pay for that in goods you do not sell online, and you buy something more expensive with it: not apologising to a customer. The figure is not theoretical — it is tuned against your real turnover over the first fortnight, and it differs between a fast mover and an item that sells one piece a month. Anybody giving you a single figure for every item on day one is giving you a figure off the top of their head.

The order: a row in a report, or an invoice in your book?

The second half of an integration is the other direction: the order coming down to you. Here there is a fundamental difference between two things that look alike in a demo.

The weak version copies orders into a table called “online orders” that you look at on a screen, and then somebody types them up as invoices. That is not an integration, it is a report. The error you set out to remove — retyping by hand — is still exactly where it was, and the only difference is that it now looks organised.

The right version makes the order a sales invoice in your own book, in the same number sequence, deducting stock and posting its entry. Only then are your reports correct, because the website’s sales went into the same place as the shop’s.

Details that show up at month end: does the customer get matched against your existing customers by phone number, so they are not a new customer on every order? Is shipping its own line or buried in the item price — because only the first lets you know your net collection? Does a card-paid order settle to a collection account separate from cash? And does cash on delivery stay genuinely outstanding?

Five questions to ask anyone offering you an integration

None of these is answered by “yes, we do that”. Each one separates somebody who has built a real integration from somebody who will build their first on you:

  1. “If the same order’s notification arrives twice, what happens?” The only correct answer: no second invoice is created, because the order is keyed on its number in the store. Duplicate notifications are not a rare edge case — platforms retry on any slow response. Anyone without an answer here will hand you duplicate invoices in your first busy week.
  2. “If an order contains an unlinked item, what happens?” Wrong answer one: “we create the invoice and you add it later” — that is a short invoice in your books. Wrong answer two: “we skip the order” — that is a lost order. Right answer: the order stops with a status naming the missing item, and goes in by itself once you link it, without being asked.
  3. “If the customer cancels after the invoice exists?” Correct answer: the order is flagged and you are told, and the system does not touch a posted entry by itself. Voiding an invoice or raising a credit note is an accounting decision affecting stock, entries and possibly your e-invoicing record, and no program should take it because a customer clicked a button.
  4. “Which warehouse does the quantity come from?” Wrong answer: “total stock”. Goods in another branch are not goods the site can ship. Right answer: one warehouse you nominate for that store.
  5. “What if the platform changes its API?” The honest answer: the integration breaks and fixing it is work we do. Anyone saying “that does not happen” has either never integrated a platform or is selling you words. What matters is knowing before the contract who does that work and under which clause.

Platforms: the practical difference is not the name

The difference that matters to you between store platforms is not their quality but how an order reaches you:

  • Platforms that push instantly — WooCommerce and Easy Orders among them. The order arrives in seconds, and the invoice and stock deduction follow immediately.
  • Platforms your system polls — Shopify and YouCan usually among them. The order arrives on the next sync cycle.

The difference the question usually misses: does the platform have both routes or only one? A platform with a push and a poll lets the cycle pick up whatever the notification dropped. A platform that only ever pushes — and that case is real — never brings back an order whose notification failed, so you need a screen that reconciles the day’s order count against what went in, and a button that imports the stragglers. Ask about that in particular before you choose.

And if your store is custom-built there is no platform and no ready-made connector: the integration happens over an API in the warehouse system, called by whoever wrote the store. That is the clearest case rather than the hardest, because both ends are yours.

E-invoicing: the recurring surprise

Many people assume integrating the store means the website’s invoices will go to the Egyptian Tax Authority on their own. The truth is more precise.

An invoice created from a store order is an ordinary sales invoice, so yes, it goes to the authority from the same screen. But the authority asks for details an online order does not supply: the order gives a name, a phone number and a delivery address, and no tax registration number for companies and no national ID for individuals above a threshold. So a small invoice to an individual goes through, while a company invoice needs its details completed first.

That is the authority rather than the integration, and for the detail of what it asks: what your system actually needs for e-invoicing.

What an integration does not fix

An integration moves numbers; it does not correct a wrong one. That is the most important sentence here.

If your warehouse balance in the system is wrong to begin with — goods leaving without authority, counts done by approximation, returns never recorded — the integration carries that error to your store faster and more accurately. The problem gets worse rather than better, because before the integration you doubted the number and afterwards you trust it.

So the right order is: fix warehouse movements first, then fix the codes, then integrate. Anybody selling you an integration without asking about the first two is selling you something that will work technically and fail operationally.

The first week: how to know it actually works

Do not open every store and every item on day one. Do it in this order:

  1. Link one store to one warehouse.
  2. Run one real order end to end yourself: order from the site and watch the invoice get created, the stock deducted, the entry posted and the money collected. Open the invoice and read its lines: the right item, shipping in its own field, tax as agreed.
  3. Run the integration alongside your manual tracking for a week. That week costs an hour a day and reveals everything: an item matched wrongly, a tax rate defined in two places, a held-back quantity too small or too large.
  4. Once the numbers agree in front of you rather than on anyone’s word, open the rest.

Anybody refusing that week of parallel running as unnecessary is refusing the week in which their mistakes would be found.

And where we stand in this

At ZEMAVO Technology we write Zemavo ERP, and e-commerce to ERP integration is a module inside it rather than a third-party middleman — so it sees stock, customers and entries from the inside. We also build the store itself for anyone who does not have one, under e-commerce store development.

This article has said several things that make our own job smaller: that if your codes are not in order the first work is organisational rather than technical, that an integration does not fix a wrong balance, and that a held-back quantity costs you goods you do not sell online. We say them because somebody who knows them before the contract does not discover them a month later and conclude they were misled.

And because all of the above is talk, here it is measured: a demo WooCommerce store whose quantities come down from the warehouse of a demo copy of the system you sign into as admin. Open an item on both and compare the numbers, place an order and look at its invoice. Orders are for trying and are not shipped.

We are in New Maadi beside the Technology Village. If you have a store that sells and a warehouse that complains, start with one question: who owns the balance?

Blog

Further Reading

Ready to start your IT project?

Get in touch with our team for a free consultation and a detailed quotation within one working day.