- set up a large or detailed option set with an AI assistant,
- copy a set to another store, or keep a backup,
- make many similar changes at once.
Getting JSON in and out
- Shopify and WooCommerce
- Standalone builder
Open an option set in the builder and click More (the ⋯ button at
the top right):
- Export JSON… shows the whole set as text, with Copy and Download .json.
- Import JSON… takes pasted text or a
.jsonfile and replaces the options you’re editing. The builder checks the JSON first and lists any problem, and the import can be undone. Nothing reaches your store until you Publish (Shopify) or Save (WooCommerce).
Working with an AI assistant
An assistant that can read web pages can write option sets for you:- Export the set you want to change, or start from a template that is close, and export that.
-
Give the assistant the exported JSON, a link to this page, and your price
list or a description of the product. For example:
- Import the JSON it returns. The builder lists any problem with the field it is in; fix it, or paste the message back to the assistant.
- Check the Preview, then publish or save.
The shape of an option set
A complete example
Flyers in three sizes, two papers and one or two printed sides, priced per flyer with quantity breaks, plus a $5 setup fee and a $20 minimum:Fields
Every field has an
id (unique across the whole option set) and may have
label, helpText, required, visibleWhen and priceModifiers.
Choices (options) have an id (unique within the field) and a label,
and may have description, image (an https:// URL or a data: image,
for cards and grids), color (for swatches),
default, sku, disabled and priceModifiers.
Prices
The base price, underpricing.basePrice, has an amount and per:
"order" (once) or "unit" (× the quantity), and may have quantity tiers.
Price rules (priceModifiers) go on fields and choices:
Every rule has an
amount (0 on a formula rule). A per-unit, per-page,
per-area or per-length rule can have tiers instead of a single rate:
basis is quantity, pages, area or length; mode is flat (the
whole quantity at the matched row’s rate) or graduated (each band at its own
rate, summed). Every row but the last has an upTo, increasing; the last has
none.
A formula rule:
A price matrix
variants gives an exact price for each combination of single-choice fields.
axes lists the field ids; each combination names one choice per axis:
price replaces the base amount (and follows its per
setting); "available": false rules the combination out. Base price
quantity breaks take precedence over matrix prices, so leave them out. See
Price matrix.
Showing fields only when they apply
visibleWhen shows a field only when its rules hold. Hidden fields are left
out of the price.
all, any or not (groups can nest). Operators are eq,
neq, gt, gte, lt, lte, in, isSet and notSet. A ref is
another field’s id, or quantity, file.pages, file.colorPages,
file.monoPages or file.status.
Rules the builder checks
Import refuses JSON that breaks these, and says where:versionis"2.0".- Field and section ids are unique across the whole option set; choice ids
are unique within their field. A field id can’t be
quantityor start withfile.. - Single and multiple choice fields, and quantity per option fields, have at
least one choice. Choice ids on a quantity per option field use only
letters, digits,
-and_. - At most one quantity field shows at a time: any others need a
visibleWhen. - Tier rows: every row but the last has an increasing
upTo; the last has none. A graduated base price needs"per": "unit". - Per-area and per-length rules (and formulas that use the size) read a
dimensionsfield named indimensionsField, or the uploaded file’s size. - A formula is valid as described in Pricing by formula.
- Each role (
size,pages,material,orientation) is used by at most one field.
- Price in your store’s own currency (
pricing.currency, such as"USD"). Import warns when it differs, and publishing is refused until it matches. productIdcan be anything: your store sets it when you publish or save.- Option sets can be up to 1 MB. Images embedded as
data:count towards it, so large pictures are better linked by URL.