Skip to main content
Version: 8.0

Pricing

Introduction

The Pricing in the Axelor application is an essential data structure that defines the calculation rules for different elements such as prices, discounts, etc. That is to say, Pricing allows creating calculation rules to evaluate a field (an integer, a decimal, a date, etc.) of an object (a quote/order line) based on parameters (called classification rules).

The Pricing allows considerable flexibility in pricing products, items, or services by taking into account factors such as ordered quantities, the specifics of each product, or each client, etc. This flexibility fact makes it possible to meet the specific needs of each one.

  • What objects are concerned: in v.8, it is currently possible to use Pricing on any AOS object.

  • Series of Pricing: it is possible to create a series of several Pricing to calculate several values.

  • Version management: you can historicize (archive) the current version of pricing and modify the new one via the “Historicize” button in the toolbar of the pricing form.

info

New feautre was added to Pricing v8.0: Generalization to all objects.

The Pricing have been made completely generic. This implies that the engine can be used on any AOS object. A generic button is also automatically added on the form views of the object concerned by a pricing.

In previous versions, the Pricing was launched if the product matched the product that was put on the pricing. However, it is now possible to put a groovy formula that will determine whether the pricing is launched or not (it is still possible to put the product or category to facilitate the writing of the formula).

caution

This generalization is blocked on certain objects to avoid any inconsistency ("Pricing", "PricingLine", "PricingRule", "Move", "MoveLine", "Invoice", "InvoiceLine").

Activate the Pricing

tip

The configurations for activating the Pricing and the calculation direction have been moved to the base app.

To use the Pricing in AOS, you must first activate the general configuration of the Pricing in:

  • Version < 8.2 AOS: Application config → Apps management → Sales, configure → activaite the feature "Enable pricing scale".

  • Version 8.2 AOS or higher: Application config → Apps management → Base, configure → In the Pricing tab, activaite the feature "Enable pricing scale".

Activating the Pricing scale will make appear two other options:

  1. Calculation direction of the Pricing: previous / next. This is the calculation order of the pricing.

  2. Enable calculation of the entire quotation using pricing: you will find this button on the quotes that allow recalculating the different lines (on an element that concerns the entire order). For example, you have a result rule that calculates the total quantity of a product ordered.

Activate this option from the sales application (access: Application config → Apps management → Sales, configure → Enable calculation of the entire quotation using pricing).

1.1. Activate the Pricing feature. For version 8.2, the path is: Application config → Apps management → Base, configure → In the Pricing tab, activate the feature Enable pricing scale.
1.1. Activate the Pricing feature. For version 8.2, the path is: Application config → Apps management → Base, configure → In the Pricing tab, activate the feature Enable pricing scale.

Configure a pricing scale

Access: Sales → pricing → New

  1. Name: the name you want to give to your pricing to be able to use it.

  2. The Company: Company to which the pricing applies. This pricing will concern all quotes and orders of the company.

  3. Concerned model: select the object concerned. It is possible to select any object. This generalization is blocked on certain objects to avoid any inconsistency ("Pricing", "PricingLine", "PricingRule", "Move", "MoveLine", "Invoice", "InvoiceLine").

  4. Classification rules: you can create and apply several classification rules (up to 4). You can create your own classification rules. Access: Sales → Configuration → pricing rules. For example, you can create a classification rule “Carrier” or “Category of third parties”. For more information, see the section on classification rules.

  5. Result rules: you can create and apply several result rules (up to 4). Access: Sales → Configuration → pricing rules. You can create your own result rules. For example, you can create a result rule “Price markup rate”.

caution

Create classification rules and result rules in advance to be able to apply them on the pricing scale creation page.

  1. Start Date / End Date: The date from which the pricing will be taken into account.

  2. Product/Product Model: product or product model on which you want to apply the pricing. The system checks if the product and the parent of this product (i.e., the model) are attached to a pricing.

  3. Product Category: product category on which you want to apply the pricing. This means that all items and services in this category will be associated with this pricing and identified as such.

  4. Previous/Next pricing: the previous or next pricing allows launching another pricing before or after the pricing you create. It is a link that is used to build a series of Pricing.

  5. Pricing lines: the values to which you can compare the classification rules and fill in the values that can be used in the result rules. The lines in the “Scale lines” table will be created automatically when the classification rules are selected, considering that these lines can be completed directly on the table.

1.1. Access: Sales → Pricing → New. Here, the pricing file and its settings.
1.1. Access: Sales → Pricing → New. Here, the pricing file and its settings.

Pricing rules

There are two types of pricing rules: classification rules and result rules. Create your own classification rules.

Access: Sales → Configuration → pricing rules

info

Result rules and classification rules can be used in multiple Pricing. That is why you must first create result rules and classification rules and then assign them to different Pricing.

It is important to note that it is often necessary to combine several classification and result rules to create complex scenarios. For example, you could have a classification rule based on the product and another based on the client, with corresponding result rules.

Classification rules

Classification rules "filter the entries" of the pricing and allow defining specific criteria or conditions that determine whether a rule should apply or not. They serve to classify transactions based on certain attributes. Classification rules are applied in order; that is, AOS ensures that the object first checks classification rule 1, then classification rule 2, and so on up to the fourth. It is possible to create up to 4 classification rules.

Here are some examples of classification rules:

a. Product classification: Define a specific rule for a group of products or a particular product.

b. Client classification: Apply a rule based on the type of client or a specific client.

c. Quantity classification: Define a rule based on the quantity of products ordered.

Parameters of a classification rule:

  1. Name.

  2. Company.

  3. Object concerned.

  4. Type: classification.

  5. Field type: text, integer, decimal.

  6. Operator: the operator allows comparing the value calculated by the classification rule with the value entered in the pricing lines.

  7. Formula: the groovy formula whose result will be compared to the value of the given field in the pricing. It allows calculating the value of the classification rule.

Explanation of the formula:

  • In the example, the name is “Carrier”. The object concerned is “SaleOrderLine”. The field type has been defined as “Text”.

  • If the carrier (carrierPartner) of the order (saleOrder) of the object concerned (SaleOrderLine) is not defined, the value given in the pricing will be compared to "None" otherwise, the value given in the pricing will be compared to the full name (fullName) of the carrier of the order line: if (!saleOrder.carrierPartner) None else saleOrder.carrierPartner.fullName

That is to say, the system will look for the name of the carrier attached to the order via the formula (saleOrder + carrier + its full name). In the image, in the list of pricing lines, the first column with the carrier lines will be compared to the value calculated by the formula from the order.

  • If the full name of the carrier of the order is « Mondial Relay », the pricing will select and keep only the first 4 lines and move on to the next classification rule.

  • A second classification rule could come and filter the column “Shipping mode” and select only home delivery.

  • The third classification rule could be used to filter the column “Total order weight” and, for example, select the order weight that does not exceed the value of 10.

1.1. Access: Sales → Configuration → Pricing rules. Here, the configuration of a classification rule.
1.1. Access: Sales → Configuration → Pricing rules. Here, the configuration of a classification rule.

Result rules

Result rules allow "calculating the outputs" of the pricing. This rule can be a constant value (e.g., a coefficient, a percentage, ...) or a formula to apply. It is also possible to use the previous result rule or the elements of the previous or next pricing rules.

Result rules define the specific actions to be taken once a classification rule is satisfied. They determine how to adjust prices, apply discounts, or calculate taxes. Here are some examples of result rules:

a. Price reduction: Apply a specific price reduction in percentage or fixed amount.

b. Tax addition: Apply a specific tax based on the classification rule.

c. Special discount: Apply a special discount for certain clients or products.

It is possible to create up to 4 result rules per pricing.

Parameters of a classification rule:

  1. Name.

  2. Company.

  3. Object concerned.

  4. Type: result.

  5. Field type: text, integer, decimal.

  6. Formula: the groovy formula allows calculating the result. This result will be assigned to a given field of the quote line / either this result will simply be retrieved in the pricing lines / or the result will be used in another calculation of a new value based on the previous result rules of the same pricing / or the previous or next pricing.

  7. Field to fill (for example, a discount). Precision: the decimal number was used in the formula calculation.

  8. Temporary variable name: in the case of using multiple Pricing, you can have intermediate Pricing that calculate values and that will not necessarily be assigned to a given field of the quote line. However, these Pricing can be recorded as temporary variables that will be reused in the following or previous Pricing.

Example of result rules

  1. Name: transport price.

  2. Object concerned: SaleOrderLine.

  3. Type: result.

  4. Formula: pricingline.resultParam1 + product.salePrice

Explanation of the formula: the formula adds the transport price to the product sale price

  • If: the carrier is « Mondial relay »; shipping mode is “Home delivery”; total order weight is 33kg; product sale price is 180 euros.
  • Result: the sale price of the order line (price) will be 190 (180 +10).
1.1. Access: Sales → Configuration → Pricing rules. Here, the configuration of a result rule.
1.1. Access: Sales → Configuration → Pricing rules. Here, the configuration of a result rule.

Pricing logs

Since version 6.3 of AOS, you can find the pricing logs in the Configuration tab of the order line. Pricing logs help to facilitate the monitoring of Pricing when they are used in an order line.

In these logs, you will find “Price calculation detail”. The “Price calculation detail” contains identified Pricing, the valued field, as well as classification and result rules with their evaluation results.

Consult and analyze the results of one or more Pricing

For example :

  1. The identified pricing is the “transport price”.

  2. The classification rule used is “carrier”.

  3. The value found (result of the classification rule evaluation): Mondial Relay

  4. The second classification rule used is “shipping mode”.

  5. Another value retrieved (result of the classification rule evaluation) is home delivery.

  6. The third value: the total order weight, here equal to 33.

The system from these three values will first classify and filter the pricing lines and then it will perform the evaluation of the result rule (here, the transport price). The transport price will then value the “Price” field with the transport price value entered in the pricing lines and then the system will add the product sale price. The total price is obtained (here, 190) and it is valued in the “Price” field.

Functional example of a pricing

Classification rule # 1

To apply the Pricing, first create classification and result rules. Classification and result rules use groovy formulas. For example: saleOrder.carrierPartner.simpleFullName.

Explanation of the formula: by specifying the object concerned (SaleOrder), and then by going through the field (carrierPartner i.e., the carrier), this formula allows finding the full name of the carrier (simpleFullName).

The information used in the formula (SaleOrder or even carrierPartner) can be found on the Quote page. For example, if you point the cursor to the Customer Quote tab, you will notice that it is the “SaleOrder” Model. When you point the cursor to the Carrier in the Delivery tab of the quote, you will notice that the field name is carrierPartner.

Access: Sales → Configuration → pricing rules → New

  1. Create a new classification rule, for example “Carrier”.

  2. Fill in the company.

  3. Select an object concerned, here it is “SaleOrderLine”.

  4. Select the type of the rule, here it is “Classification”.

  5. Select the field type, here it is “Text”.

  6. Fill in the groovy formula, here it is: if (!saleOrder.carrierPartner) None else saleOrder.carrierPartner.simpleFullName

Classification rule # 2

  1. Create a new classification rule, for example “Shipping mode”.

  2. Fill in the company.

  3. Select an object concerned, here it is “SaleOrderLine”.

  4. Select the type of the rule, here it is “Classification”.

  5. Select the field type, here it is “Text”. For the Text field type, there is no Operator. The system will directly compare the found value with the pricing value.

  6. Fill in the groovy formula, here it is: if (!saleOrder.shipmentMode) None else saleOrder.shipmentMode.name

Classification rule # 3 with an Operator

  1. Create a new classification rule, for example “Total order weight”.

  2. Fill in the company.

  3. Select an object concerned, here it is “SaleOrderLine”.

  4. Select the type of the rule, here it is “Classification”.

  5. Select the field type, here it is “Decimal”.

  6. Precision: 2.

  7. Operator: < < means that the operator “is less than”. The value of the pricing line (on the pricing sheet) must be less than the found value. The operator will compare the value calculated via the formula with the value in the pricing lines using the selected operator.

  8. Fill in the groovy formula, here it is: saleOrder.saleOrderLineList.collect() { (it?.qty * it?.product.netMass) }?.sum()

This formula allows calculating the total quantities (the total weight) in the order lines. For each line, the system retrieves the quantity (the net mass).

Result rule

  1. Create a new result rule, for example “Transport price”.

  2. Fill in the company.

  3. Select an object concerned, here it is “SaleOrderLine”.

  4. Select the type of the rule, here it is “Result”.

  5. Field to fill: price (this is the “sale price” field on the order line).

  6. Precision: 2.

  7. Fill in the groovy formula, here it is: pricingLine.resultParam1 + product.salePrice

The value of the result rule entered by the user in the pricing lines is added to the product sale price

The calculated value will be assigned to the “Price” field.

Pricing configuration

Access: Sales → pricing → New

  1. Create a new pricing, for example “Transport price”.

  2. Fill in the company and start and end dates.

  3. Specify the start and end dates if necessary.

  4. Select an object concerned, here it is “SaleOrderLine”.

  5. Apply the classification rules (carrier / shipping mode / total order weight).

  6. Apply the result rule (transport price).

  7. Select the product.

In the pricing example, you will find:

  • 4 lines of Mondial Relay carrier with two types of shipping, home delivery and relay point delivery.

  • 4 lines of UPS carrier, with two types of shipping, home delivery and relay point delivery.

  • For the total order weight, the value entered in the line will be compared with the value calculated by the system.

The line value (total order weight, 10) will be compared to check if it is less than the value calculated by the classification rule.

  • The transport price: is the result rule that will be assigned to the price. For example, if the total weight is equal to 33, the system will retrieve the closest lower value and calculate the price via the transport formula. This transport price will be added to the product sale price.

  • Historicize: click on this button to historicize (archive) the current pricing. It will be displayed in the “Historicized Pricing” table (v7.2) / History (v8.0).

1.2. Click on the “Historicize” button to historicize the current pricing. It will be displayed in the History table (v8.0).
1.2. Click on the “Historicize” button to historicize the current pricing. It will be displayed in the History table (v8.0).

Use Pricing on a sale quotation

Access: Sales → Customer quote → New

  1. Create a new quote.

  2. Select the client and fill in the essential information.

  3. In the delivery tab, select the shipping mode - home delivery.

  4. In the delivery tab, select the carrier. Select Mondial Relay.

  5. In the “Content” tab, select the product.

  6. Click on the “Calculate lines with a scale” button. Save.

  7. Open the “Sales Order Line” configuration page of the product. In the “Configuration” tab, you will find the pricing logs applied to the product.

The HT price is therefore estimated at 190 euros: the product price is equal to 180 euros + 10 euros of delivery calculated thanks to the Pricing that took into account the delivery and the type of delivery.