Skip to main content

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 Product is the item as the merchant describes it: a wine cuvée, a beer, a cheese. It has one Tax and can have a Category.
  • A Variant is 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.

Tip

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:

KindForAlso required at creation
WINEWinescolor, wineType, region, designation
BEERBeerscolor, beerType
SPIRITUOUSSpirits: whisky, vodka, armagnac…family
SIMPLEAnything 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: capacityUnit and capacityPrecision are set. Quantities are integers scaled by 10^capacityPrecision: with capacityPrecision: 3 and unit kg, a raw quantity of 1500 means 1.5 kg.
  • Per unit: capacityValue and capacityUnit give the size of one item, when the merchant sets it, for example 0.75 and L.
  • bulk can 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 VariantPrice gives valueIncludingTax and valueExcludingTax. The list's taxIncluded says which one is the reference: true means the prices are set tax included.
  • Within one list, a variant can have quantity tiers: several VariantPrice with fromQuantity and toQuantity, for example 14 € from 1 to 5 bottles, then 13.50 € from 6 (toQuantity: -1 means 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: add filterBy: { archived: INCLUDED } to get them too.