Set Percentage Order
Automatically reduce 100% discounted items in open orders by a specified percentage to correct pricing and prevent revenue loss.
Overview
The RIS-SM-2015 – SetPrecentageOrder macro identifies items with a 100% discount across open orders and reduces the discount by a defined percentage.
It enables bulk correction of pricing issues caused by unintended full discounts.
Carefully review the percentage value before execution, as changes will affect all eligible open orders.
Purpose
This macro:
- Identifies items with 100% discount
- Reduces discount by a specified percentage
- Updates item pricing across open orders
- Prevents incorrect free-item scenarios
👉 In short:
Reduce full discounts in bulk across open orders.
When It Runs
Used for pricing correction and bulk updates
Typically runs:
- Manually triggered
- Scheduled for bulk correction processes
Parameters
Amount of discount to reduce from 100%.
Example:
percentage = 10
Meaning:
New discount applied = 90%
How It Works
Fetch Open Orders
Retrieve all open orders from the system.
Loop Through Orders
Process each order individually.
Identify Eligible Items
Select items where discount is exactly 100%.
Calculate New Discount
Compute updated discount using:
New Discount = 100 − percentage
Update Order Items
Apply updated discount values using the API.
Final Result
- Fully discounted items are corrected
- Discounts reduced by specified percentage
- Orders updated automatically
Usefulness
This macro is highly beneficial for:
- Preventing accidental 100% discounts
- Recovering potential revenue loss
- Performing bulk discount corrections
- Maintaining accurate pricing
- Improving control over discounting
Important Notes
- Only affects items with exactly 100% discount
- Does not validate if resulting discount goes below 0%
- Runs on all open orders (may impact performance)
- No detailed logging of updated items
- Cost update logic exists but is currently inactive
Example Scenario
Key Insight
Bulk correction of full-discount items ensures pricing consistency, improves financial accuracy, and safeguards against unintended revenue leakage.
Last updated today
Built with Documentation.AI