Skip to content

Spreadsheets and stock feeds

StockBoss reads spreadsheets (CSV, TSV, text) and stock feeds (JSON or XML), however they reach it. You never have to describe the file. StockBoss reads a sample, works out which column or field is which, and shows you real values from your own file so you can check.

Where the file comes from is a separate choice, and the reading works the same for all of them. See Ways to connect a supplier. Sending a file by hand and pointing at a path on your own server share one setting. The box is a dropzone, and the path field folds out underneath it.

When the file arrives, StockBoss reads a sample and tells you what it found. How many columns, which one looks like the code, and which looks like the quantity. It prints three real values from each column, so you can see for yourself.

Correct anything that is wrong. What you change is remembered and used from then on.

Why the quantity column deserves a look

A file with the columns SKU, Description, Free To Sell, RRP is the awkward one. A price is exactly as numeric as a stock figure, so only the heading tells them apart. Getting it wrong sets your shop's stock to its prices. Nothing crashes, so nobody notices until the orders arrive. Read the quantity column before you save.

Separators are worked out too. A European export saved with semicolons, or a tab-separated file, would come out as one giant column if read with a comma. So the separator is detected, not assumed.

A stock feed is harder, because JSON and XML nest. StockBoss reads the document, finds the products inside it, then shows you the fields it picked with real values beside them.

You correct plain field names, written the way they read in the document: identifiers.supplierCode, or sku (attribute) for XML.

A figure spread across depots is added up. If a product carries a free figure in each of three warehouses, you can sell all three. Taking only the first would publish one warehouse and undersell the rest of the country.

A terse feed works too. Some suppliers publish nothing more than {"AB1": 12, "AB2": 0}, a map of codes to numbers with no field names at all. StockBoss reads it as exactly that.

Most feeds take a token, and the feed form has a box for one.

Some suppliers sign you in with an account number and a key instead. S&S Activewear are the named example. The feed form takes that pair too, and sends it the way those suppliers expect, so there is nothing to compose by hand.

Give it either the token or the pair, not both. If both are filled, the pair wins, because it is the more deliberate answer. The key is stored on your own server and never shown back once saved.

Suppliers’ files get large. A real one runs to 90,000 lines, and a full product export can be 54 MB.

StockBoss reads them in slices rather than whole. On a shop with an ordinary memory limit, that is the difference between working and a white screen. Read whole, a real stock file costs 73 MB of memory. Read in slices, it costs under 2 MB.

Spreadsheets and feeds are handled differently on purpose. Every row of a CSV is the same shape, so a few hundred rows are enough to learn it. A JSON document cut off partway is not a smaller JSON document, it is a syntax error. So a feed is read whole rather than peeked at.

A file StockBoss can read is not always a file it should write. See When it refuses for the full list. In short, it refuses:

  • a file that has shrunk by half since last time
  • an error page, a login page, or a maintenance notice, however healthy the reply code looks
  • a feed with an empty product list, which is a broken feed and not “everything is out of stock”
  • a product list or an order export with no quantities in it at all

A negative is not junk. Some suppliers write -8 to say they are oversold upstream. That is real information: they owe more than they have.

StockBoss keeps what they said, and sells nothing. “What did they say” and “what can I sell” are two different questions. The answer to the second never goes below zero.

Was this page helpful?