- Configuration
Working with product specs
What is a spec?
A product spec is a specification that allows users to provide text input or select options to customize a product or choose variations. For example:
- Text input: Adding an engraved name to a pen
- Options selection: Choosing a television size from available variants
Spec types
Specs define how users interact with products. The main types are:
Open text spec
The AllowOpenText property enables user text input for product customization:
Options spec
Options specs provide controlled product configuration choices, such as business card design templates:
Spec options
Options represent available choices for an options spec:
Variant spec
A variant spec creates unique product variants for each option, such as different television sizes:
Variant specs must be Required as the base product represents a collection of variants.
Generate variants
Create variants after assigning variant specs to a product:
Multiple variant specs create a matrix of combinations. Example with Color (Red, Blue) and Size (Small, Medium, Large):
- Red, Small
- Red, Medium
- Red, Large
- Blue, Small
- Blue, Medium
- Blue, Large
Use overwriteExisting=true to regenerate variants. Deactivate unwanted variants by setting Active to false.
Variant IDs
Variants need unique identifiers. Override generated IDs using PUT/PATCH endpoints.
Disambiguating properties
Variants can have specific values for properties like Name and Description, separate from the base product.
Inventory
Manage inventory at:
- Product level: All variants share inventory
- Variant level: Each variant has separate inventory
Enable variant-level tracking with Inventory.VariantLevelTracking set to true.
Spec product assignments
Assign specs to multiple products to share configurations:
Create unique specs for products needing different option subsets.
Spec features
Required flag
Required specs must be defined when adding products to orders.
Default values
DefaultValue: Default text for open text specsDefaultOptionID: Default selection for options specs- Set
DefaultOptionIDafter creating spec and options - Override defaults in spec product assignments
Option features
Open text
Options can allow text input with IsOpenText property.
Price markup
Adjust prices based on selections using:
PriceMarkupType:- NoMarkup: No price change
- AmountPerQuantity: Price per unit
- AmountTotal: Fixed amount
- Percentage: Percentage increase
PriceMarkup: Value for calculation
Pricing summary
Example: Base price $50, PriceMarkup 10
| PriceMarkupType | PriceMarkup | Quantity 1 | Quantity 10 |
|---|---|---|---|
| NoMarkup | 10* | $50 | $500 |
| AmountPerQuantity | ($)10 | $60 | $600 |
| AmountTotal | ($)10 | $60 | $510 |
| Percentage | 10(%) | $55 | $550 |
*NoMarkup values are ignored in calculations