Skip to content
SyncMyShop

Notes

Units of measure in an integration: each, box, case and pallet

A store sells a quantity, an ERP counts stock in a base unit, and a buyer's procurement system orders in a coded unit. When a customer orders 3 cases of 1,000 gloves, the ERP has to book 3,000 each; an integration that passes on the number 3 without its unit books 300 or 3.

Updated

One item, three units

An ERP counts stock in one unit and converts every other unit to it. The store does not. In Shopify the quantity on an order line is a required integer, and the line has no unit field. What a quantity of 3 means is in the product or variant title: "Box of 100", "Case of 1,000". The integration has to know it per item.

Take nitrile gloves, item GL-4410, at a janitorial supply distributor. The warehouse counts single gloves, the store sells boxes of 100 and cases of 10 boxes, and the purchasing team buys by the case. In NetSuite, with the Multiple Units of Measure feature on, that is one units type with three units:

Unit Abbreviation Conversion rate Used as
Each ea 1, base unit stock unit
Box bx 100 sale unit
Case cs 1,000 purchase unit, second sale unit

The item points to the units type in unitstype and names a stockunit, a saleunit and a purchaseunit. NetSuite's field help describes the sale unit as the unit used to sell the item on sales transactions. The sales order line carries quantity and units; the quantity is read in that unit.

How the systems store it, read from each vendor's documentation on October 3, 2026:

System Unit on the item Unit on the order line Conversion
Shopify none; unitPriceMeasurement only for showing a price per unit quantity, an integer none
NetSuite unitstype, stockunit, saleunit, purchaseunit units with quantity conversionrate per unit in the units type
Business Central Base Unit of Measure, Sales Unit of Measure, Purch. Unit of Measure, each Code[10] Unit of Measure Code, and Quantity (Base) Qty. per Unit of Measure in the Item Unit of Measure table

Business Central stores the converted figure on the sales line itself: Quantity (Base) is the quantity in the base unit, next to the quantity in the line's own unit. NetSuite converts through the rate on the units type.

Worked example: 3 cases of gloves

A customer orders 3 cases at 129.00 per case. Shopify sends this line:

{
  "sku": "GL-4410-CS",
  "variantTitle": "Case of 1,000",
  "quantity": 3,
  "originalUnitPriceSet": { "shopMoney": { "amount": "129.00", "currencyCode": "USD" } }
}

The integration reads the suffix CS, maps the SKU to item GL-4410 and sets units to Case. NetSuite books 3 x 1,000 = 3,000 gloves out of stock. The rate stays 129.00, because it is the price per case.

A Shopify order line for 3 cases of gloves mapped to a NetSuite sales order line Shopify sends SKU GL-4410-CS, quantity 3 and a price of 129.00. The integration maps the SKU to item GL-4410 and the unit Case, which holds 1,000 each, so NetSuite books 3,000 gloves. Without the unit, 3 is read as 3 boxes of 100: 300 gloves. Shopify order line NetSuite sales order line sku GL-4410-CS variantTitle Case of 1,000 quantity 3 an integer, no unit originalUnitPrice 129.00 item GL-4410 units type: Each, Box 100, Case 1000 units Case conversion rate 1,000 quantity 3 3 x 1,000 = 3,000 each in stock rate 129.00 price per case strip suffix suffix CS Sent without units, the line falls back to the sale unit Box: 3 x 100 = 300 gloves, 2,700 short of what the customer paid for.
Three cases of gloves from Shopify to NetSuite: the quantity only means something together with its unit.

If the integration maps only quantity, the line is read in the item's sale unit, Box: 3 x 100 = 300 gloves. That is 2,700 short of what the customer paid for. Map the SKU without stripping the suffix and the line fails on an unknown item, which at least raises an error. The silent version is the one where the number arrives and the unit does not.

Stock in the store, from one base figure

The same unit problem runs the other way for stock. In Shopify each variant has its own inventory item, so the Box variant and the Case variant hold two separate numbers. The ERP holds one: 18,400 each on hand.

Moment ERP stock in each Box variant (100) Case variant (1,000)
Start 18,400 18,400 / 100 = 184 18,400 / 1,000 = 18, rounded down
After an order for 3 cases 15,400 154 15
After an order for 7 boxes 14,700 147 14

A sale of one variant changes the stock of the other. The integration recalculates both from the base figure after every change in the ERP, and always rounds down: 18.4 cases is 18 that can ship. A store that decrements each variant on its own sells the same gloves twice, once as boxes and once as cases. Which figure counts as available in the first place is covered in which stock counts.

Prices per hundred and per thousand

Fasteners, labels and packaging are priced per hundred or per thousand. A hex cap screw at 38.50 per thousand costs 0.0385 each. A store that stores prices with two decimals per unit makes that 0.04.

  • Correct: 5,000 screws = 5 x 38.50 = 192.50
  • Stored as 0.04 each: 5,000 x 0.04 = 200.00
  • Difference: 7.50, which is 7.50 / 192.50 = 3.9% too much on every line

Either the store sells a box of 100 at 3.85, or the price basis travels with the price. The standards have a field for it:

Format Where the price basis goes Example
X12 850 or 810 PO105, basis of unit price code (element 639) TP price per thousand, HP per hundred, PE per each
cXML PriceBasisQuantity with quantity and conversionFactor quantity="1000"
OCI NEW_ITEM-PRICEUNIT, 5 characters 1000; empty means 1

The rounding effects on totals and tax are in money, tax and rounding.

Unit codes that procurement systems and retailers accept

Inside your own ERP a unit is whatever your team named it: ea, each, pcs, cs, case. The moment another company reads it, it has to be a code from their list, and each standard has a different list.

Unit X12, PO103 (2 characters) UN/CEFACT, cXML UnitOfMeasure
Each EA EA
Box BX XBX
Case CA XCS
Pallet PL XPX
Thousand TH MIL

OCI is the third list. In the SAP OCI 5.0 specification NEW_ITEM-UNIT is 3 characters and holds an ISO code that must exist as a unit in the buyer's SAP system, so the right value differs per buyer.

X12 version 4010 lists 794 codes for PO103. In it, CS is a cassette and CT a carton, so "cs" from your ERP sent as CS tells a retailer you shipped cassettes. In the UN/ECE lists that OpenPeppol publishes, the X12 codes CA, BX and PL do not exist at all; a case is XCS. The cXML Reference Guide states that UnitOfMeasure must conform to UN/CEFACT codes. A retailer that orders in cases sends CA in PO103 and expects the 810 invoice in the same unit; Kroger's 850 map, for example, orders in cases.

So the integration keeps one translation table per unit, with a column per standard, and a unit that has no entry goes to a review list instead of out the door. The X12 side is worked out on the 850 purchase order page and the PunchOut side on PunchOut integration.

Minimums, multiples and pallets

Next to the unit come the rules on the number. Gloves only by full case for one customer group. Cable not below 50 feet. A pallet of 40 cases as the only way a distributor ships to a retailer's DC.

These rules belong where the customer orders. Shopify B2B has quantity rules on a catalog price list, per variant: a minimum, an optional maximum and an increment, and only quantities divisible by the increment are accepted. They are available on Basic, Grow, Advanced and Plus. NetSuite has minimumquantity on the item, which its own web store enforces at checkout, and reordermultiple for purchasing, always counted in base units.

Rule Comes from Applies in When an order breaks it
Case only, increment 10 boxes ERP or price agreement store, at checkout quantity not accepted
Minimum 50 feet ERP item store order not possible
Buy per case of 1,000 ERP purchase unit purchasing only no effect on the store

A rule that only exists in the ERP lets a paid order through that the warehouse then cannot ship as ordered.

What this means for your integration

Per item we record the unit the store sells in, the base unit of the ERP and the conversion rate between them, plus the code each trading partner or procurement system expects. Order lines are converted with that rate, stock is recalculated per variant from the base figure, and a price per hundred or per thousand keeps its basis. An item without a conversion rate or a unit without a code goes to the review list; in the dry run you see how your existing orders land in the ERP before anything goes live.

Units belong with prices and customer agreements, described on prices and customer-specific pricing, and with the field mapping of the order as a whole. Send us a few items you sell by the box, the case or the thousand, and we show how the conversion works for your catalog.

Frequently asked questions

What is the difference between the base unit, the sale unit and the stock unit?

The base unit is the unit every other unit converts to, with a conversion rate of 1. In NetSuite the item also names a stock unit, a sale unit and a purchase unit, all from the same units type. Business Central has a base unit of measure on the item and a Qty. per Unit of Measure for each other unit. Gloves can be counted in each, sold by the box of 100 and bought by the case of 1,000.

Can Shopify sell by the case and by the box from one stock figure?

Not by itself. Each variant has its own inventory, so a Box variant and a Case variant hold two separate numbers. The integration keeps the stock in the ERP's base unit and writes both variants after every change: 18,400 each is 184 boxes and 18 full cases.

Which unit code do I send to a retailer or a procurement system?

The one its standard accepts. An X12 850 or 810 carries a two-character code from element 355, such as EA, BX or CA. cXML requires a UN/CEFACT code, in which a case is XCS. OCI allows 3 characters, and the code must exist as a unit in the buyer's SAP system. The integration keeps one translation table from your ERP units to each of them.

How do I handle prices per hundred or per thousand?

Keep the price basis with the price instead of dividing it down. X12 has codes for it in PO105, such as HP for price per hundred and TP for price per thousand, cXML has PriceBasisQuantity and OCI has NEW_ITEM-PRICEUNIT. A price of 38.50 per thousand stored as 0.04 each charges 3.9% too much.

Where should a minimum order quantity or a case multiple live?

In the store, where the customer orders. Shopify B2B has quantity rules per variant on a catalog price list: a minimum, an optional maximum and an increment, and every quantity must be divisible by the increment. The integration fills those rules from the ERP so an order the warehouse cannot ship is never placed.

Tell us what you need

Tell us which systems you use and what needs to work better. We reply personally within one working day. We help you define the work, then agree the price and timing before you commit.

  • You know the price and the timeline before you commit to anything
  • We work out the connection that takes the work off your hands
  • We handle the build, hosting, monitoring and maintenance
  • Your team has less information to retype and fewer discrepancies to chase

Suppliers, products, orders per day, a rough estimate is fine.

Or email directly: carsten@syncmyshop.com