Understanding the Price Factory

Objective

After completing this lesson, you will be able to explain the purpose of the price factory.

The SAP Commerce Cloud Price Factory

In SAP Commerce Cloud, the Price Factory determines the prices of all products on the site, including discounts and taxes.

Note

The price for a product might depend on several factors, such as currency or number of items purchased, a special price could be defined for a specific user or user group, or a more general price might exist for a group of products. The current date could also be a factor, and so on. Stay tuned as we cover all these details.

Once the correct price for the product has been determined, promotional discounts are subtracted where applicable for this product or the cart in general. Finally, all applicable taxes are added.

The Price Factory Mechanism

Rather than the limited approach of having a single price for each product, SAP Commerce Cloud lets us define many prices, each represented in a price row. And it's the Price Factory’s responsibility to determine the most appropriate price row to use when pricing a given product. The best candidate is selected as a base price, and other price rows are ignored.

Once the base price has been determined, the Price Factory applies discounts and taxes. After that, the SAP Commerce Pricing Mechanism applies any promotions that affect the product or cart and persists all pricing data in the Cart (an Order object). This ensures that the calculated final price available to the order and checkout processes remains consistent throughout the customer journey.

In a nutshell:

  • All possible prices for products and customers are represented by PriceRows.
  • Each PriceRow object represents a potential price, depending on several factors like product, user, currency, and many others. 
  • The Price Factory locates applicable PriceRow objects and sorts them by priority.
  • The PriceRow with the highest priority becomes the selected price, and the evaluation stops.

The Price Factory uses contextual information to determine a product’s price, as well as applicable taxes and discounts. The following overview diagram shows the related entities the Price Factory interacts with.

Price Factory provides prices by interacting with these main entities: Product, User, UserGroup, PriceRow, TaxRow, DiscountRow. The following text and images will describe the relationship between those entities more closely.

Prices

For prices, the Price Factory finds the correct price row based on one or more of the following factors:

  • The product itself.
  • The product’s productPriceClass. Price Classes are used to group together similar products or product variants, allowing you to manage their pricing collectively. For example, various color variants of a given product can be priced using a single price group, which simplifies the process and helps ensure pricing consistency.
  • The currently selected currency.
  • The quantity (scale) of products ordered. This allows you to provide bulk pricing.
  • Time factors. Used, for example, to set seasonal event pricing.
  • The current user.
  • The Customer Price List associated with any user group the current user belongs to. A Customer Price List is used to offer custom prices to specific segments of your customer base, allowing you to vary individual product prices depending on a customer’s loyalty status, geographic location, membership level, and so on.
  • The channel used by the customer to access the website.

This is shown in the following diagram:

Details of previous image matching the previous description: How product, product price class, customer price list, and user are elements associated with PriceRow.

Configuring Prices in Backoffice

The Price Factory uses contextual information to determine a product’s price, along with applicable taxes and discounts. This context includes other factors beyond the product being priced, the current user, and any group the user or product belongs to.

Note

Please note: Some entity names used in Backoffice dialogs differ from their technical representation, for example:
BackofficeTechnical term
Product Price Class

(A price-relevant group of products)

ProductPriceGroup
Product Tax ClassProductTaxGroup
Product Discount ClassProductDiscountGroup
Customer Price ListUserPriceGroup
Customer Tax Jurisdiction, or Tax GroupUserTaxGroup
Customer Discount GroupUserDiscountGroup

The following diagram shows where to view the details of a specific price configuration in Backoffice. A Price Row typically displays the Pricing information associated with a specific combination of attributes.

The left-hand side shows the Administration Cockpit in the BackOffice where you can edit the Price Settings. From top to bottom is Price, Product Price Classes, Customer Price Lists, Price Rows and the right-hand side diagram shows the relationship between the Product and the Product Price Group.

PriceRows in the Backoffice

The following diagram illustrates a use case where a single product has several potential prices (also known as price rows) based solely on currency and scale. Thus, if you buy a single product, it costs US$12.00, but if you purchase one hundred or more, the price drops to US $10.25 for each product.

This sample can be extended to different currencies, leading to more and more price rows.

Price calculation for a product with potentially more than one price. In this case, price is calculated based on scale and currency.

Note

You might wonder whether it's possible to automatically calculate the price in a given currency by converting from a base currency using the current conversion rate? Yes, it is.

Unfortunately, this typically results in unattractive prices like US $11.04 rather than a more conventional price, such as US $10.99. For this reason, automatic conversion is very uncommon for business to consumer (B2C) scenarios, although it's occasionally found on business to business (B2B) websites.

Taxes

Taxes are based on TaxRows; these are similar to PriceRows, but calculated by the PriceFactory in a different way:

Unlike prices, taxes accumulate (instead of a single best match for a price). The PriceFactory will search for all applicable TaxRows and combine them to compute the final tax amount to levy on the customer’s purchase.

Any TaxRow represents a tax rule and has an associated Tax object, which specifies either a percentage or a fixed currency amount. The associated TaxRow objects is used to selectively apply a given tax rate based on currency and the following factors:

  • The product and its associated Product Tax Class.
  • The current user and their assigned Customer Tax Group, including the Tax Group of any user group this user belongs to.

Each Tax object, referenced by multiple TaxRows, defines the tax rate for a dedicated jurisdiction, for example, a given country or region. For example:

  • UK VAT full (20%)
  • UK VAT half (5%)
  • DE VAT full (19%)
Tax calculation in Price Factory based on product, Product Tax Class, User and Customer Tax Group. TaxRows are associated with a Tax entity, which usually represents a country/jurisdiction area with full and half tax.

Configuring Tax

The following diagram shows where to view the details of a specific Tax in Backoffice.

A Tax typically displays the Discount information associated with that specific combination of attributes.

The left-hand side shows the Administration Cockpit in the BackOffice where you can edit the Price Settings. From top to bottom is Taxes, Product Tax Classes, Customer Tax Jurisdictions and Tax Rows. The right-hand side diagram shows the relationship between the Product and the Product Tax Group.

Discounts

SAP Commerce Cloud stores all possible discounts as DiscountRow objects – each representing a certain discount arrangement. DiscountRows are optionally related to a certain date range, customer, group of customers, product, or group of products. In addition, we have GlobalDiscountRows, which are not assigned to products or product groups, because they apply discounts at the cart and order level.

Every Discount object is a potential discount. They can be combined, like tax calculations, but instead of adding to the total cost of the order, they reduce it.

Note

The discounts available in DiscountRows and GlobalDiscountRows are separate from promotions. They are applied using the criteria given above, whereas promotions can take advantage of the sophisticated Rules Engine to determine applicability. Promotions are only computed after the Price Factory has come up with a taxed and discounted price.

It is also possible to apply a discount that sets a fixed target price for a product in the cart, and to apply discounts at the order level. Please consult the documentation for further details.

Relationship between a discount row and the discount. There are two types of discount rows: product specific and global. Both discount row types inherit properties from abstractdiscountrow, for example, the discount property itself.

Configuring Discount

The following diagram shows where to view the details of a specific Discount in Backoffice.

A Discount Row displays the Discount information associated with that specific combination of attributes.

The left-hand side shows the Administration Cockpit in the BackOffice where you can edit the discounts settings. From top to bottom, 1 Discounts, 2 Product Discount Classes, 3. Customer Discount Groups, 4. Discount Rows. The right hand side diagram shows the relationship between a Product or group of products (Product Discount Class) and a user or group of users (Customer Discount Group), resulting in a discount row.

Price Factory Review

The Price Factory offers solutions to flexibly manage prices, taxes, and discounts:

  • Per line item: The base price is provided, along with taxes and discounts (multiple taxes/discounts are combined). 
  • Per order: Global discounts are possible (even multiple ones) and apply to the order subtotal. 
  • Multiple units: Products can be sold in different (packaging) units, for example, 10 individual printer cartridges could be available for purchase or a single pack of 10.
  • Scaled prices: You can wish to offer reduced prices when the number of units ordered exceeds a predefined threshold.
  • Date ranges: You can offer special prices/discounts for specific time periods.
  • Grouping per customer and/or product: You can offer your customers lower prices as a result of business negotiations. When a customer is logged in, the system displays the negotiated prices. You are able to set up product price groups instead of assigning a price to each product individually. 
  • Net/gross prices: It's possible to display both the gross price, which includes taxes, and the net price, which does not.

Log in to track your progress & complete quizzes