Customer specific pricing in the SAP Hybris

How to create customer specific price in SAP Hybris using 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


Author Image

Ankitkumar Patel

Sr. SAP Hybris consultant, having 6+ years experience in Hybris, Java, J2EE. Extensive hands-on experience in SAP Hybris development, third-party integrations with Hybris, project architecture and design... Read more

Comments

Popular posts from this blog

Hybris flexible search query examples

How to remove or update all data records in Hybris?

Hybris backoffice customization