Price Group Criteria
Starting with Ucommerce 10.6.0, you can assign different criteria to price groups, enabling you to filter accessible price groups based on specified properties. This document outlines how to manage these criteria, utilize inheritance, set priorities, and handle the activation of price groups.
Managing Price Group Criteria
The criteria section can be found in the backoffice on the price group page. Here, you can add, remove, or edit criteria as needed. The current built-in criteria are:
Time-based criteria
Restricts the validity of a price group to a specific time period.
Customer group criteria
Restricts the price group to be usable only by customers within the given customer group(s).
Organization criteria
Restricts the price group to be usable only by customers within the given organization(s).
To add your own custom criteria, refer to the guide on extending price group criteria.
Fetching Valid Price Groups
The process for fetching valid price groups is handled through the GetPriceGroups
pipeline from the Ucommerce.Web.Website
headless package. To retrieve accessible price groups, you can use the headless endpoint GET price groups
. This endpoint supports query parameters prefixed with filters-
. These parameters are used in the pipeline to evaluate and determine which price groups are accessible based on their criteria. See the headless price groups reference and extending price group criteria for more details on how to use these parameters.
Price Group Inheritance
Getting price groups traverses the inheritance tree to identify the deepest accessible price groups. If a price group’s criteria are not met, none of its derived price groups will be accessible. This feature is particularly useful for applying a criterion to a group of price groups by making them derive from a common base with the criterion.
Setting Price Group Priority
Ucommerce 10.6.0 also introduces the concept of price group priority, which determines the order in which price groups are returned. The priority value ranges from 0 upwards, with higher numbers taking precedence in the returned list. This feature is useful for specifying which price group should be prioritized when multiple price groups are accessible.
Enabling and Indexing Price Groups
From Ucommerce 10.6.0 onwards, when creating a new price group, it is disabled by default. This means that the price group will not be indexed until it is explicitly enabled. This default behavior allows you to fully configure a price group before making it accessible in the index. When inheritance is used, the enabled/disabled status of a price group also affects the accessibility of its derived price groups.
Last updated