Help Center

Feed rules: How to use calculator functions

GoDataFeed Technical Team
GoDataFeed Technical Team
  • Updated

Calculator functions in rules can be used to adjust numeric values in your feed. For example, you can add a markup or discount to your product's prices, or adjust quantity values. 

Calculator Function rules can only be applied to numeric fields. Learn more about data types.

How to create a calculator function

  1. In the feed's 'Rules' page, click the blue '+' button to create a new rule
  2. Name the rule
  3. In the SET section, input the feed field you would like to adjust with this rule
  4. In the TO section you will create a calculation, here's how:

    • Start the formula with two opening brackets [[

    • Select the product field from your product catalog that contains the numeric values you want to adjust with this rule (example: [P].[quantity] or [P].[price])

    • Use any common operator in your formula, such as:
      • Subtraction -
      • Addition +
      • Multiplication *
      • Division /
    • Close the formula with two closing brackets ]]
  5. WHERE for all products or some products conditionally
  6. Save the rule

Common calculator rules

Review the common calculator rules below. Follow these templates to perform similar calculator functions in your feeds:

Static Text you enter into blank fields: Orange, Product Fields: Blue

Add 20% to price for a markup

[[ [P].[price] + ( [P].[price] * .2 ) ]]

Multiply Price by .7 to discount price by 30%

[[ [P].[price] * .7 ]]

Subtract 2 from Quantity to create a buffer

[[ [P].[quantity] - 2 ]]

Was this article helpful?

2 out of 2 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.