OFBiz Tutorial – Price Rules

HotWax SystemsPublished: Updated:

In this OFBiz tutorial we will be focusing on the Price Rules tab.  The Price Rules tab in the catalog manager allows one to create very complex pricing structures based on basic price data and variables such as the customer, product, or quantity involved. For example, it would be possible to specify quantity discounts, special discounts for a particular group of products, for a particular group of customers, or pricing based on average cost rather than list pricing if certain conditions are met.

Price rules are a series of rules which help determine the prices of products. Each rule is a series of conditions and actions. When Open for Business needs a price for a product, such as in an order entry or ecommerce application, it will search through all price rules and use the applicable ones to generate the price.  With this OFBiz tutorial, we will go over how to add a price rule, and also how to edit an existing price rule.

To Create or edit price rules, the user must be a catalog manager or administrator in the system.

Add Price Rule

Prerequisite Data

  • Following data should be modeled properly :
    • Product Price Rule
    • Product Price Type
    • Product Price Condition
    • Product Price Action
  • Price rules will only be run if an item has a List Price associated with it.

Execution Steps

  1. Go to “Catalog” component and click on “Price Rules” tab.
    ofbiz-tutorial-price-rules-1sm

    “Price Rules” is one of the options under the “Catalog” application menu

  2. Click on “New” tab.ofbiz-tutorial-price-rules-2
  3. Fill in price rule name in “Name” field in “Add Price Rule” section.
    ofbiz-tutorial-price-rules-3

    Use a descriptive name when creating price rules for easy management later on

  4. Click on “Add” button.ofbiz-tutorial-price-rules-4
  5. Added price rule will get displayed in “Global Price Rules” section.ofbiz-tutorial-price-rules-5sm
  6. Click on “Edit” button to edit the rule.
  7. Fill in following information on “Global Price Rule” page :
    ofbiz-tutorial-price-rules-6sm

    This is a rule that will take 10% off any product that is over $10.00. It is crucial to fill out all the options for the price rule to ensure the rule covers only the products you want it to. If the conditions field is left blank, the rule will apply to everything on the site.

    • Rule Details :
      • Rule Name
      • From Date
      • Thru Date
      • Sale Price (Specify if the new price will be sales price or not (Yes/No))
    • Rule Conditions :
      • New (Select any one of the following from drop down)
        • Product (Select to add price rules on Product)
        • Product Category (Select to add price rules on Product Category)
        • Product Catalog (Select to add price rules on Product Catalog)
        • Product Feature (Select to add price rules on Product Feature)
        • Website (Select to add price rules on Website)
        • Quantity (Select to add price rules on Quantity)
        • List Price (Select to add price rules on List Price)
        • Party (Select to add price rules on Party)
        • Party Group (Select to add price rules on Party Group (Organization))
        • Party Group Members (Select to add price rules on Party Group Member)
        • Party Classification (Select to add price rules on Party Classification)
        • Role Type (Select to add price rules on Role Type)
        • Currency Uom Id (Select to add price rules on Currency)
      • Operator (Select any one of the following from drop down)
        • Is
        • Is Not
        • Is Less Then
        • Is Less Then or Equal To
        • Is Greater Then
        • Is Greater Then or Equal To
      • Fill in information in last text box (like if condition is on “Product” then fill in “Product Id”, if on “Party” then fill in “Party Id”)
      • Click on “Create” button.
      • More then one condition can be added in to the price rule. Fill in above mentioned information again to create more conditions.
    • Rule Actions :
      • New (Select any one of the following action from drop down)
        • Flat Amount Modify (This action modifies the price by a flat amount)
        • Flat Amount Override (This action overrides the flat amount)
        • Percent of Average Cost (This action takes the assigned percentage times of the established Average Cost. For example, if you wanted to have 100 percent margin over the Average Cost, enter 200 for the value.)
        • Percent of Default Price (This action takes the assigned percentage times of the established Default Price.)
        • Percent of List Price (This action assigns a percent against the established List Price.)
        • Percent of Margin (This refers to List Price – Average Cost. Some companies like to do margin based pricing and not just list or cost based pricing this makes such possible.)
        • Promo Amount Override (This action use the ‘Promotional Price’ for this item as fixed amount, overriding all other price actions, this is not an adjustment of any existing price but rather a replacement of that price.)
        • Wholesale Price Override (This action takes charge only on the Wholesale Price, whatever that might be.)
      • Fill in information in text box (like if action is “Flat Amount Override” then fill in override amount or fill in percent if action is “Percent of List Price”)
      • Click on “Create” button.
      • More then one action can be added to price rule.

Expected Outcome

  • Price Rule will added and displayed on “Price Rules” page and “Find Price Rules” page.ofbiz-tutorial-price-rules-5sm
  • Price Rule will be applied on the added condition.

Edit Price Rule

Prerequisite Data

  • Following data should be modeled properly :
    • Product Price Rule
    • Product Price Type
    • Product Price Condition
    • Product Price Action
  • Price rule should exist in system.

Execution Steps

  1. Go to “Catalog” component and click on “Price Rules” tab.
    ofbiz-tutorial-price-rules-1sm

    “Price Rules” is one of the options under the “Catalog” application menu

  2. Select the price rule by clicking on “Price Rule Id” in “Global Rules” section or by clicking “Edit” button.ofbiz-tutorial-price-rules-5sm
  3. Update the existing details on “Price Rule” page.
    ofbiz-tutorial-price-rules-6sm

    This is a rule that will take 10% off any product that is over $10.00. It is crucial to fill out all the options for the price rule to ensure the rule covers only the products you want it to. If the conditions feild is left blank, the rule will apply to everything on the site.

Expected Outcome

  • Selected price rule information will be updated.

 

—Chris Gaughan—

chris-gaughan

Chris Gaughan is an OfBiz Designer specializing in Client Training and Support for HotWax Media.

HotWax Systems About HotWax Systems
HotWax Systems is the leading global service provider for Apache OFBiz application development, and creators of HotWax Commerce, the world’s leading open-source Unified Commerce Platform. In 2017, HotWax Systems expanded its portfolio to include a full set of consulting services and custom business solutions based on the Moqui Ecosystem of open source projects.

Comments 1

  1. Avatar for HotWax Systems

Leave a Reply

Your email address will not be published. Required fields are marked *