Reduce Item Discount
Automatically reduce 100% discounted items in open orders by a specified percentage to prevent incorrect pricing and revenue loss.
Overview
The RIS-SM-1015 – Reduce Item Discount macro identifies items with a 100% discount in open orders and reduces the discount based on a specified value.
This ensures that fully discounted items are corrected and pricing remains accurate.
Always verify the reducedDiscount value before execution to avoid unintended pricing changes.
Purpose
This macro:
- Identifies items with 100% discount
- Applies a reduced discount value
- Updates item pricing automatically
- Prevents incorrect free-item scenarios
👉 In short:
Reduce full discounts to a controlled value across open orders.
When It Runs
Used for pricing correction and validation
Typically runs:
- Manually triggered
- During order validation
- During pricing correction workflows
Parameters
Amount to reduce from 100% discount (value between 0 and 100).
Example:
reducedDiscount = 10
Meaning:
Final discount applied = 90%
How It Works
Validate Input
Ensure reducedDiscount value is between 0 and 100.
Fetch Open Orders
Retrieve all open orders from the system.
Identify Eligible Items
Filter items where discount is exactly 100%.
Calculate New Discount
Compute updated discount using:
New Discount = 100 − reducedDiscount
Update Order Items
Apply updated discount values using the API.
Log Results
Record execution details including updates and errors.
Final Result
- Fully discounted items are corrected
- Discounts reduced to specified value
- Orders updated automatically
- Execution logs available for tracking
Usefulness
This macro is highly beneficial for:
- Fixing incorrect 100% discounts
- Preventing accidental free items
- Reducing manual correction effort
- Maintaining accurate pricing and billing
- Protecting revenue integrity
Important Notes
- Only affects items with 100% discount
- Applies to all open orders
- Cannot increase discount (only reduce)
- Input must be between 0 and 100
- Changes are permanent once applied
Example Scenario
Key Insight
Automatically correcting full-discount items ensures pricing accuracy, prevents revenue leakage, and maintains consistency across all orders.
Last updated today
Built with Documentation.AI