function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sekhar passamsekhar passam 

How to make different discounts for different products based on roles?

I have some products, I have to provide different discounts for different users and it has to change dynamically based on the product.

Please help me out of this.
Thanks in advance

Jagannathan MJagannathan M
Hi Sekhar,

You can use $UserRole.Name global variable to identify the logged in User Role. If the Logged in User role meets your condition give discount based on that. The formula would be as below,

IF($UserRole.Name = 'Role A', Discount A,IF($UserRole.Name = 'Role B',Discount A,No Discount))