Help CenterFormula Pricing

Formula pricing: expressions, variables & rounding

A pricing formula is a short expression BulkOps.ai evaluates for every product to produce its new price. This guide covers what you can put in an expression while configuring a formula. For the exhaustive list of functions, see the Formula syntax reference.

Variables

Variables are lowercase and pull live data from each product:

VariableMeaning
costCost per item (Shopify)
priceCurrent selling price
compare_at_priceCurrent compare-at price
shipping_cost, packaging_costCustom costs, if set via metafield

Operators & expressions

  • Arithmetic: + - * / and parentheses for grouping.
  • Conditionals: cost < 20 ? cost * 3 : cost * 2.2 prices cheap and premium items on different rules.
GoalExpression
2.5× markupcost * 2.5
True 45% margincost / (1 - 0.45)
Net margin incl. $4 ship & fees(cost + 4) / (1 - 0.55)

Rounding

After the expression runs, an optional rounding step tidies the result:

ModeExample ($42.13)
Charm — nearest $X.99$41.99
Round up to nearest $1$43.00
No rounding$42.13

Always previewed. Whatever you write, BulkOps.ai shows the calculated old → new price and resulting margin for every product before you apply — and skips products missing a variable (like cost) rather than mis-pricing them.

Troubleshooting

Formula returns 0 or blank. Check variables are lowercase (cost, not Cost) and the product actually has that data.

Prices look too low. You likely used a markup where you meant a margin — see Gross margin vs. markup.

Ready to try it?

Add BulkOps.ai to your Shopify store — free plan available, no credit card required.

Add to Shopify — Free

Was this helpful?