Catalog
Wino is the point-of-sale and back-office software of the shops that use it. The catalog is what a shop sells: its products, their variants, prices and stock. This page explains how these entities fit together. Every field is described in the GraphQL schema.
Shops
A Shop is a store or warehouse of a Wino account. Almost everything belongs to one shop: products, price lists, taxes, categories, devices. With a key for several shops, each shop has its own copy of the catalog.
Products and variants
- A
Productis the item as the merchant describes it: a wine cuvée, a beer, a cheese. It has oneTaxand can have aCategory. - A
Variantis the item actually sold: the same product in a given vintage, bottle size or packaging. A product has one or more variants. The Wino app calls them "articles".
The Samorens wine is one product: its producer, country and color are the same however it's sold. Sold in a 0.75 L bottle and in a 10 L BIB, it has two variants, each with its own stock and prices.
For an online store or a marketplace, treat each variant as a product of your own: list the catalog with the variants query rather than products.
Each product has a kind, and each kind has its own fields. Every product needs name, kind, country, shopId and taxId. Some kinds need more:
| Kind | For | Also required at creation |
|---|---|---|
WINE | Wines | color, wineType, region, designation |
BEER | Beers | color, beerType |
SPIRITUOUS | Spirits: whisky, vodka, armagnac… | family |
SIMPLE | Anything else: juices, cheeses, accessories… | nothing more |
Fields that don't apply to the kind are null. Fields starting with formatted (formattedName…) are ready to display: don't parse them.
Bulk variants
A variant is sold either per unit or in bulk, by weight or volume (bulk: true). A cheese can be sold as a single piece, as a 0.15 kg piece, or cut to order by the kilo: three variants of the same product.
- Bulk:
capacityUnitandcapacityPrecisionare set. Quantities are integers scaled by10^capacityPrecision: withcapacityPrecision: 3and unitkg, a raw quantity of1500means 1.5 kg. - Per unit:
capacityValueandcapacityUnitgive the size of one item, when the merchant sets it, for example0.75andL. bulkcan only be set when the variant is created.
Stock
Each variant has its own stock in its shop: compute with stock.rawQuantity, display stock.formattedQuantity. The stock changes only through stock movements (StockActivity): sales, refunds, losses, deliveries, transfers, resets. Each movement is recorded by a device (see Your shop and your device). The movement kinds are listed in the Glossary.
stock.state is computed from the variant's thresholds:
OK: above the reorder level.ALERT: above the minimum level, and at or below the reorder level (stockOrderTriggerThreshold, 5 when unset).DANGER: at or below the minimum level (minStockThreshold, 0 when unset).
Bulk variants in cl, g, L or kg don't use the thresholds: DANGER at 0 or below, ALERT below 100 (cl or g) or below 1 (L or kg), OK from 100 or 1.
Price lists and variant prices
A shop has price lists (Price), such as "Tarif Boutique" or "Tarif Ecommerce". A variant has a selling price (VariantPrice) in each list it's sold in.
- Each
VariantPricegivesvalueIncludingTaxandvalueExcludingTax. The list'staxIncludedsays which one is the reference:truemeans the prices are set tax included. - Within one list, a variant can have quantity tiers: several
VariantPricewithfromQuantityandtoQuantity, for example 14 € from 1 to 5 bottles, then 13.50 € from 6 (toQuantity: -1means no upper limit).
Active and archived
- A variant can be inactive (
active: false): the merchant took it off sale. It still appears in lists. - The API has no delete: records are archived instead (
archivedAt). Most lists hide archived records by default: addfilterBy: { archived: INCLUDED }to get them too.