Customer specific pricing in the SAP Hybris
How to create customer specific price in SAP Hybris using UserPriceGroup?
1. Create UserPriceGroup
1. Create UserPriceGroup
INSERT_UPDATE UserPriceGroup ; code[unique=true] ; name[lang=en]
; group1 ; "Group 1"
; group2 ; "Group 2"
2. Assign userPriceGroup to PriceRow
# Macros / replace yourProductCatalog name
$productCatalog=yourProductCatalog
$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]
; PRODUCT-1 ; CAD ; 93.60 ; false ; group1 ;
; PRODUCT-1 ; CAD ; 900.00 ; false ; group2 ;
3. Assign userPriceGroup to customer/b2bUnit
UPDATE Customer ; uid[unique=true] ; Europe1PriceFactory_UPG(code)
; cus1 ; group1
; cus2 ; group2
In case of b2b project, you can assign it to b2bUnit
INSERT_UPDATE b2bunit ; uid[unique=true] ; userPriceGroup(code)
; unit1 ; group1
; unit2 ; group2
Comments
Post a Comment