This is the early access documentation preview for Custom Views. This documentation might not be in sync with our official documentation.
Managing Prices
Learn about how price selection works in Composable Commerce.
After completing this page, you should be able to:
- Describe how to create and publish Prices in Composable Commerce.
- Describe how the Price of a Line Item in a Cart is selected by Composable Commerce.
How to create and publish Prices
As an administrator of Composable Commerce, it's important to understand the different ways of creating and managing the three types of Prices in the system:
Embedded Prices are created in the Merchant Center, and you can find a step-by-step guide to creating them here. Remember, these prices are associated with specific Product Variants.
Standalone Prices, are also created in the Merchant Center, and you can find a step-by-step guide to creating them here. You can create Standalone Prices for Products that do not exist yet in the Project.
External Prices are managed in an external pricing system. These prices are not stored within Composable Commerce, but can be integrated with your system using API calls.
Factors which influence Prices
Pricing in Composable Commerce doesn't end with defining a Price for a Product Variant. Throughout the lifecycle of a commerce transaction, the following aspects of your Project influence the total Price of a Product or Cart.
- Taxes: Composable Commerce supports tax charged as an additional cost on top of the Product Price or as a percentage of the Product Price. If you do not include the tax in the Price, the base Price of the Product is higher when tax is included. (Deciding whether or not taxes are included in the Prices or not is a decision that needs to be made in your Project set up. See Taxes for more information.)
- Prices: the base Prices defined for a Product Variant have the single largest influence on its final cost.
- Product Discounts: Product Discounts reduce the base selling Price of a Product Variant.
- Cart Discounts and Discount Codes: If any active Cart Discount or Discounts apply, the Price for the Cart and each Line Item in the Cart is re-calculated accordingly. Some Cart Discounts apply to the entire Cart, whereas others can target specific Line Items in a Cart, multi-buy scenarios or shipping costs.
- Final total is calculated: The last step before creating an Order is calculating the final total of the Cart.
When you add a Product Variant to the Cart in Composable Commerce, the most specific Price available is selected, tax rates are calculated, and shipping costs are calculated too. These actions provide the final total Price.
A Price is more than just a monetary value and Currency code. You can define a number of optional fields which affect Price selection in the Cart. Based on the properties present on the Price itself and the fields present on the Cart, Composable Commerce selects the best possible Price for a Line Item.
On the base Price, you can define the following properties:
- Validity dates (valid from and valid until).
- Countries for which the Price is valid (country).
- Customer groups for which the Price is valid (Customer Group).
- Channels for which a Price is valid (Channel).
These properties become important when we look at how Line Item Price selection works.
Line Item Price selection
Composable Commerce can employ a fallback pricing model. When adding a Product Variant to a Cart, Composable Commerce selects the most specific Price available by analyzing any optional properties defined for the Prices on the Product Variant.
After selecting a Price, Composable Commerce calculates the value of the Cart itself. If optional values are present on the Cart, like Customer Group, the total price of the Cart may change. In general, Composable Commerce calculates the Line Item Price first, then the Cart Price.
When you add a Product Variant to a Cart, Composable Commerce takes a snapshot of the Variant at that point in time and adds it to the Cart as a Line Item. If the Cart has a Customer Group or country set, or if the Product Variant's inventory has a distribution Channel, those are taken into account when selecting Prices.
Line Item Price selection works for both Embedded Prices and Standalone Prices, and is influenced by whether Embedded or Standalone is set as the Product Variant's Price Mode value. With these two pricing types, Composable Commerce selects the Price from the Product Variant. An external pricing type however, adds the Price directly to the Line Item regardless if there are any Prices in the Product Variant.
The following graphic shows a simplified version of the process followed in Line Item Price selection. For a more detailed version of this process see Line Item Price selection.
What is important to note in this process is the following:
- Customer Group has precedence in Price selection over Channel, which also has precedence over country.
- If a Price selected has Price tiers defined, and one of the Price tiers is valid, the tiered Price is used. If not, the base Price is used.
- For every Price selection step in the process, validity dates are checked. If a currently valid Price is found, then it is selected.