Customer account rate with group code based

we are applying %10 percent when our customers ordered. But now we want to apply percent with product or group code based. How can we do every group code different percent for customers? thank you.

Current:
Action -> Create Account Transaction
Amount : [=Data.Get(“ProcessedAmount”)*0.01]
Rule -> Payment Processed

In your rule add a constraint { GROUP CODE } equals Spirits

Then your rule will only work for any products that have Spirits as their group code

You could alternatively use one rule, add multiple of the same action but change the % discount and then in the constraint field of the ACTION put ‘{ GROUP CODE }’ == ‘Spirits’ only that action will fire for products in the Spirit group

Then add another action constraint in the next action with a different group code and so on

This will allow you to create just one rule with as many actions as you want, but as all the actions have specific constraint only 1 of them will fire

Surely you won’t get group code on a payment procesesed rule?
I have a setup which uses seperate discounts for food and drink with 3 levels of discount. Will post screenshots if interested.

thanks for replay but i can not get { GROUP CODE } in payment processed. I think payment processed merge all orders so only has amounts.

thanks you but i can make discount product based or group code based. only i can not product or group based percent bonus for customers.

for example…
Burgers = %4
Pizza = %7
Drinks = %6

You can or you can’t? Thought that’s what you were asking?

I have discounts for drinks and food. It uses custom product tags to set what’s drink and what’s food rather than group code which are more broken down but prinsiple is the same.
I made automation to update discount amount using a formula based on a report expression which returns the total value of drinks or the total value of food and then calculate discount based on that. Ie regulars get 10% off drinks and 20% off food. Staff get same 10% on drinks but 50% on food.

thank you. if it posible, can you share screenshots?

I guess I couldn’t tell you right. Our customers has loyalty card and each orders credit their account %10 percent bonus. Now i want to product or group based bonus their account.

This is my discount update rule, its an automation command executed rule as have a few triggers ie from ticket total changed, ticket entity changed and maybe others.
The key part being this;
[=Math.floor((TN('{TICKET ORDER TOTAL EXP:(OS.NewBook GLA=3101)&&(ODI=True)&&(OS.GStatus= )}')*0.2)/0.05)*0.05]
You will see the report expression has an order state constraint which for your request would be menu group.

thank you very much JTRTech for your replay

I think we’re talking about different topics. I still don’t understand how to add a product-based commission to my customer accounts on every purchases. sorry.

Use a calculation/formula like this to create account transaction or whatever method you are storing the points/bonus or whatever you want to call it.
I wasnt showing you the discounts, I was showing you the formulas/calculations used as it will give you the values your after to feed into your automation.