Documentation menu

Variants, import and bulk editing

This page is for stores with many products, or products with many options. It covers how to plan your variants so that every card, drawing and fit line is exact, how fabric grades add weeks to a lead time, and how to fill in the drawing and fit metafields without opening every product.

Plan your variants #

Treadle reads prices, sizes and lead times from real variants. A sofa in 3 sizes, 40 fabrics and 2 leg finishes is 240 variants, each with its own price.

At most 250 variants per product #

Shopify allows up to 2,048 variants per product, and the product page's option picker works with all of them. But the theme's cards, lineups and To scale rows look through a product's variants to pick the one a card shows, and Shopify gives a theme only the first 250. A product with more than 250 variants can show the wrong "From" price or the wrong size on its card.

Keep each product at 250 variants or fewer, with at most 3 options. Some ways to get there:

  • Sell a curated set of fabrics per product. 40 fabrics across four grades is plenty on one sofa. The fabric library page still lists every fabric you have, because it reads your fabric entries, not a product.
  • Split a range by grade or by body, for example "Harlow sofa" and "Harlow sofa in leather", and link them with Complete the set.
  • Make the corner a size, not a separate product. A Corner size with its own custom.drawing_type = sectional draws as a corner sofa. See sizes that change the shape.

A product can list up to 250 fabrics in its fabric list, but that many fabrics times any other option is far over the variant budget.

A priced finish is a variant option #

A leg finish that costs more, such as Walnut at +$150, must be a variant option, like the size and the fabric. The theme shows the surcharge on the button ("+$150") and in the price breakdown, and adds it to the total, because it comes from the variant prices.

A line item property can't change a price. That needs an app with a cart transform, which a theme can't provide. Keep priced choices as options, and use line item properties only for free choices that an app adds.

Example, the 240-variant flagship sofa:

OptionValuesNotes
Size2-seater, 180 cm; 3-seater, 220 cm; Corner, 280 cmEach value's variants carry their own custom.width. The Corner variants also set custom.drawing_type = sectional.
Fabric40 fabrics in grades A to DLinked to custom.fabrics. Grade B +$300, C +$600, D +$900 on the variant prices.
Leg finishOak; WalnutWalnut +$150 on every combination.

3 × 40 × 2 = 240 variants.

Put the cheapest value first #

Shopify opens a product page on its first available variant, and the theme's cards show the cheapest variant. Put the cheapest value first in every option (the smallest size, an included fabric, the standard finish). Then the card's "From $2,490", its drawing and its fit line match the page the card opens. It also keeps every surcharge positive: option prices count from the option's cheapest value.

For a pendant sold in drops, give each drop variant its own custom.drop. The "Clearance for each drop" list reads the Drop option wherever it stands in the option order, so a pendant sold in sizes and drops can list Size first. The list then shows every drop at the selected size.

Combinations you don't offer #

You don't need every combination. When one doesn't exist, the button says why: "Not made in leather" (from the selected fabric's material) or "Not offered with Corner, 280 cm". Delete the variants you don't make rather than leaving them at 0 stock.

Made-to-order variants don't track inventory #

A variant that tracks inventory at 0 shows "Sold out". Turn off Track quantity on every variant you build after the order, or tick Continue selling when out of stock. See made-to-order variants.

How grades add weeks #

A product has one base lead time. A fabric grade can take longer, and the theme adds the difference:

Arrives = the base lead time + the weeks the selected fabric's grade adds.

  • The base is the variant's own custom.lead_time (a size that takes longer), or else the product's.
  • A grade adds its lead time's Min weeks less the product's Min weeks, never less than 0. A grade can't make a piece arrive sooner.
  • A fabric's own Lead time field, when filled in, counts instead of its grade's.

Example, with "Made to order, 6–8 weeks" on the product:

GradeGrade's lead timeAddsArrives (ordered 13 Oct)
A, Performance linennone (the product's)0 weeksArrives 24 Nov – 8 Dec
B, Bouclé and weavesnone (the product's)0 weeksArrives 24 Nov – 8 Dec
C, VelvetSpecial order, 10–12 weeks4 weeksArrives 22 Dec – 5 Jan
D, LeatherExtended, 12–14 weeks6 weeksArrives 5–19 Jan

The fabric picker shows the same number on each folded grade row ("Grade C, Velvet · +$600 · adds 4 weeks"), so a row's "adds 4 weeks" is exactly what Arrives moves by. The rows always count from the product's base lead time, whatever is selected.

Tips:

  • Leave the included grades without a lead time, so they add nothing.
  • Give your fabric entries no lead time of their own unless one fabric really is slower than its grade. A fast fabric in a slow grade can't speed the piece up.
  • A piece that's slower in every fabric (a hand-shaped shell, a modular frame) gets its own product lead time, for example "Built in modules, 10–12 weeks". The grades then add their weeks on top of that base. A leather grade at 12–14 weeks adds 2 weeks to it.

See lead times for the setup.

Fill in metafields in bulk #

The drawing and fit metafields (custom.width, custom.drawing_type, the shape settings and the rest) are ordinary metafields. Create the definitions first (see the definitions reference), then fill them in one of these ways.

The bulk editor #

The bulk editor is the quickest way for most stores.

  1. Go to Products and select the products. Click Bulk edit.
  2. Click Columns and add the metafield columns, for example Width, Depth, Height, Drawing type and Arm style.
  3. Type or paste the values, then click Save.

Variant metafields have their own columns in the bulk editor. Add them to fill in each size's width or each drop.

Choice fields such as Drawing type only accept their listed values (sofa, sectional and so on). Dimension fields need a number and a unit. Shades (custom.shades) takes a whole number from 1 to 12: fill it in only on linear pendants with two or more shades on one bar, and leave it empty on everything else. See shades.

Product CSV import #

Shopify's product CSV can carry metafield values.

  1. Create the metafield definitions.
  2. Fill in one product by hand, including its variant metafields.
  3. Export that product as a CSV from Products > Export.
  4. Use the export as your template. It has a column for each metafield definition, with the exact header and value format Shopify expects.
  5. Fill in your rows and import them with Products > Import.

Two things a CSV can't do:

  • Link the Fabric option. A custom metafield such as custom.fabrics imports as a plain text option. Link the Fabric option in the admin after the import. See link the Fabric option.
  • Create fabric, grade or lead time entries. Add those in Content > Metaobjects.

The Admin API #

Developers can set every definition and value with the Shopify Admin GraphQL API (metafieldDefinitionCreate, metafieldsSet, productSet), using the types, keys and choices in the definitions reference. Setting up data through the API is outside theme support. See the support policy.

Checklist after an import #

  • Every product has a width and a height. A product without them has no drawing on its page, and its To scale row says "Dimensions on request".
  • Every product has a drawing type, and the Shape check drawings match the photos.
  • Size variants carry their own width (and depth and height when they change).
  • Pendants have a drop on each drop variant.
  • Linear pendants with several shades have custom.shades, a width for the bar and a depth for one shade.
  • No product has more than 250 variants.
  • The cheapest value is first in every option.
  • Made-to-order variants don't track inventory.
  • The Fabric option is linked on every product that uses the fabric picker.
  • Each grade's "adds N weeks" on the product page is what you expect.