Hybris provides a flexible, scalable and configurable way to handle prices using PriceRows.
PriceRows in Hybris defines the prices rules, In short to prices can be configured based on user group, channel, timeframe, unit…etc.
A single price is qualified by product, product price group, user, user group, currency, unit, min quantity and a date range.
Hybris uses Europe1 Price factory by default
A PriceFactory is responsible for calculating product and order prices with respect to taxes and discounts.
How to create customer specific price in SAP Hybris using UserPriceGroup:
To create customer specific price using UserPriceGroup, we need to follow these steps:
1.Create UserPricingGroup
INSERT_UPDATE UserPriceGroup ; code[unique=true] ; name[lang=en]
; 01 ; "ecommerce"
2. Assign userPriceGroup to PriceRow.
# Macros / replace yourProductCatalog name
$productCatalog=traningProductCatalog
$catalogVersionStaged=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default='$productCatalog:Staged']
INSERT_UPDATE PriceRow ; product(code, $catalogVersionStaged)[unique=true] ; currency(isocode)[unique=true] ; price ; net[unique=true,default=false] ; ug(code)[allownull=true] ; unit(code)[default=pieces]
;10001 ; US ; 93.60 ; false ; 01 ;
3.Assign User price Group to customer
UPDATE Customer ; uid[unique=true] ; Europe1PriceFactory_UPG(code)
; testuser ; 01
In case of B2B Accelerator assign the B2Bunit to price group instead of customer as above
Leave a comment