Catalog
Pricing

Pricing

Every product in TimberCloud gets a pricing formula — the logic that turns a customer's selections (material, size, options, quantity) into a price. You build that formula in the product's Pricing panel, and there are three ways to do it:

  1. AI Formula Assistant — describe your pricing in plain English and let AI build the formula for you.
  2. Simple Formula Builder — pick one of four common pricing strategies and fill in a couple of fields. Most products are done in under a minute.
  3. Advanced Formula Builder — a full step-by-step builder for complex logic: measurements, groups, named variables, and multi-branch conditionals.

All three save the same kind of step-based formula, so you can start in AI or Simple mode and switch to Advanced whenever you need more control.

Note: There is no JavaScript code editor for pricing. Pricing is authored entirely with the Formula Builder (Simple or Advanced) and the AI Formula Assistant. (Older products that were set up with legacy pricing scripts still calculate correctly — that logic runs on the backend — but it is no longer something you write or edit in the app. The moment you save a new formula in the builder, it takes over.)


Where to find pricing

  1. Open a product and go to its Pricing panel (the Pricing Logic Configuration card).
  2. To author a formula, you have two buttons:
    • AI Assistant — opens the plain-English assistant.
    • Create Formula / Edit Formula — opens the Formula Builder. The app automatically opens Simple mode for a simple formula and Advanced mode for a complex one, and you can switch between them at any time.

The same Formula Builder is also used for parts and inventory calculations elsewhere in the product, so once you learn it here it applies everywhere.


AI Formula Assistant (start here)

The fastest way to price a product is to describe it in words. Click the AI Assistant button (top-right of the pricing card) and type what you want, for example:

  • "Charge the material price per square foot, plus $25 if the finish is Premium."
  • "Base price of $40, then add $12 for every linear foot of edge banding."
  • "Give a 10% discount when quantity is 50 or more, and 15% at 100 or more."

Press Generate and the assistant returns:

  • A formula wired to your product's real fields and measurements.
  • A plain-language explanation of what it does.
  • Any warnings (for example, if it references a field that doesn't exist yet).

From there you can:

  • Accept — apply the formula to the product as-is.
  • Revise — keep refining it conversationally ("add a 10% rush surcharge," "change the rate to $60 per square foot"). The assistant remembers the conversation, so you can build the formula up step by step.
  • Edit Manually — hand the generated formula off to the Advanced Formula Builder to tweak it by hand.

The assistant works in edit mode too: open it on a product that already has a formula and describe the change you want, and it will modify the existing formula rather than starting over.

For a deeper walkthrough, example prompts, and tips, see the AI Pricing Assistant guide.


Simple Formula Builder (4 strategies)

When you click Create Formula for a new product, the builder opens in Simple mode. Pick the strategy that matches how you charge, fill in a couple of fields, and you're done.

StrategyWhat it doesGood for
Flat PriceEvery unit costs the same fixed amount.One-price items, accessories, flat fees
Price by SizeA rate per measurement (per square foot, board foot, linear foot, etc.).Panels, slabs, trim, anything priced by size
From Product FieldPulls the price straight from a field, such as a material's cost."The price is whatever the chosen material costs"
Field × MeasurementA field value multiplied by a size calculation (e.g. material.price × Square Feet).Material rate applied across an area or length

Each strategy also lets you add an optional +/− markup adjustment (a flat amount or a percentage) on top of the base calculation — handy for a standard margin or a small handling charge.

If your pricing outgrows Simple mode, click Switch to Advanced inside the builder to keep everything you've configured and add more steps.


Advanced Formula Builder

Advanced mode is the full step-by-step builder. It opens automatically for any formula that's too complex for Simple mode, and you can switch into it from Simple mode at any time. Use it when you need conditionals, reusable sub-calculations, or several stacked charges.

Building blocks (operand types)

TypeDescriptionExample
FieldReference a product attribute or line-item fieldwidth, material.price
NumberA fixed numeric value144, 1.10, 50
MeasurementA pre-built calculation (see below)Square Feet, Board Feet, Perimeter
GroupParentheses to control order of operations(Base + Material) × Qty
VariableA named, reusable sub-calculation referenced as $name$baseArea, $discount
ConditionalMulti-branch IF / ELSE IF / ELSE logicIF width > 48 THEN 50 ELSE 0

Named Variables ($name)

Variables let you define a sub-calculation once and reuse it. For example, define $sqFt as (width × height) ÷ 144, then reference $sqFt throughout the rest of the formula. Variables keep long formulas readable and make changes easy — adjust the variable once and every reference updates.

Multi-branch conditionals (IF / ELSE IF / ELSE)

Conditionals support more than a single if/else. You can add several branches — an IF, any number of ELSE IF branches, and a final ELSE — which is ideal for tiered pricing (quantity discounts, size brackets) without nesting.

Available measurements

The builder includes ten ready-made measurements. Add a Measurement step and pick one; TimberCloud handles the unit conversions automatically.

MeasurementFormulaUse case
Square Feet(W × H) ÷ 144Panel and area pricing
Board Feet(T × W × L) ÷ 144Lumber pricing
Linear FeetLength ÷ 12Trim, molding, edge banding
Cubic InchesW × H × DVolume for small items / packaging
Cubic Feet(W × H × D) ÷ 1728Volume for large items
Perimeter2 × (W + H)Edge banding, framing
Waste FactorQty × (1 + %)Adding a material-waste allowance
Lite CountTotal lites (glass panes) from the lite patternPricing glass doors by number of panes
Glass PanelsCount of panels marked as glassPricing by number of glass panels
Lite Price TotalSum of lite-pattern pricesPricing from the lite pricing table

Note: Lite Count, Glass Panels, and Lite Price Total are glass-door specific. They calculate automatically from the product's glass/lite configuration; Lite Price Total reads the lite pricing table you set up on the product's Parts tab. No manual entry needed.

Referencing fields (dot notation)

Any attribute or line-item field can be used in a formula by name. Field references use dot notation generated automatically from your attribute names — for example, an attribute named Material with a Price column becomes material.price. Other examples: material.name, design.stile_width, edge.price.

When you add a Field step, the builder lists every available field for you to pick, so you rarely need to type these by hand. (See Attributes and Line Items for how those fields are defined.)

Example: cabinet door pricing

A typical door formula combines a measurement, a field, and a conditional:

Square Feet(width, height) × material.price
+ Perimeter(width, height) × edge.price
+ IF width > 48 THEN 50 ELSE 0

This formula:

  1. Calculates square footage and multiplies it by the material price.
  2. Adds edge banding based on the door's perimeter.
  3. Adds a $50 upcharge for oversized (wider than 48") doors.

Common formula patterns

You don't need a template gallery — these patterns cover most products and are quick to build in Simple mode, the AI Assistant, or Advanced mode:

  • Price per square footSquare Feet × material.price
  • Price per board footBoard Feet × material.price
  • Base + per-unitbasePrice + (Qty × unitPrice)
  • Size-based upcharge — a conditional that adds a fee for oversized items
  • Tiered quantity pricing — a multi-branch IF / ELSE IF / ELSE that lowers the rate as quantity rises

Best practices

  1. Start with the AI Assistant. Describing your pricing in plain English is usually the fastest way to a working formula — then refine it with Revise or Edit Manually.
  2. Use Simple mode for straightforward products. Flat Price, Price by Size, From Product Field, and Field × Measurement cover the majority of cases in under a minute.
  3. Use named Variables in Advanced mode to keep complex formulas readable instead of repeating the same sub-calculation.
  4. Use Groups to control order of operations when a formula mixes addition and multiplication.
  5. Use clear attribute names — they become your field references (material.price), so good names make formulas easy to read.
  6. Test with sample orders to confirm the math before you publish.

Troubleshooting

Formula isn't calculating

  • Make sure every field the formula references actually exists on the product.
  • Check that the relevant attribute options have prices/values assigned.
  • Confirm line-item field names match what the formula expects.

Unexpected results

  • Check the order of operations and add Groups (parentheses) where needed.
  • Verify each measurement is using the correct dimensions.
  • Test with known values to validate the result.

Glass / lite measurements show zero

  • Lite Count, Glass Panels, and Lite Price Total require the product's glass/lite configuration to be set up, and Lite Price Total needs a lite pricing table on the Parts tab.

Related guides