Schedule MacroRIS-SM-2039 – Increase Open Order Value

Increase Open Order Value

Restore original order values by reverting item prices from cost back to their original selling prices using XML or stored backup data.

Overview

The RIS-SM-2039 – Increase Open Order Value macro restores order values that were previously reduced using the Reduce Order Value macro.

It retrieves original pricing data from order XML or extended properties and reapplies it to ensure accurate financial records.

Ensure the PriceReducedFlag identifier and backup data (XML or extended properties) exist before running this macro.

Purpose

This macro:

  • Restores original item prices
  • Reapplies tax and discounts
  • Recalculates order totals
  • Removes reduction tracking flag

👉 In short:
Restore original pricing → recalculate totals → clean up flags.

When It Runs

Used for financial restoration and post-processing workflows

Typically runs:

  • Scheduled / automated execution
  • After shipping label is printed
  • After a defined delay
  • Before financial reconciliation

Parameters

path
durationInMinutesnumber
Required

Minimum time (in minutes) after label printing before restoration starts.

This delay ensures that price restoration does not interfere with shipping and label generation processes.

How It Works

Fetch Open Orders

Retrieve all open orders across locations.

Filter Eligible Orders

Select orders where:

  • Identifier PriceReducedFlag exists
  • Shipping label is printed
  • Defined delay time has passed

Retrieve Order Data

Fetch order XML and extended properties for restoration.

Restore Item Prices (Primary)

Use XML data to restore:

  • PricePerUnit
  • Tax
  • DiscountValue
  • CostIncTax

Restore Totals from XML

Restore subtotal, tax, total, and discount values from XML and update via API.

Fallback Restoration

If XML is unavailable:

  • Use extended properties (e.g., SKU_RetailPrice)
  • Recalculate tax and totals

Recalculate Totals

Ensure final totals are correctly calculated if fallback method is used.

Mark Execution

Add extended property IncreaseOrderValueMacro = Run.

Remove Identifier

Remove PriceReducedFlag from processed orders.

Log Execution

Log eligibility checks, restoration method, updates, and errors.

Final Result

  • Original item prices restored

  • Order totals recalculated accurately

  • Taxes and discounts reapplied

  • Reduction identifier removed

  • Execution tracked via extended property

Usefulness

This macro is highly beneficial for:

  • Reversing temporary pricing adjustments
  • Maintaining financial accuracy
  • Supporting automated workflows
  • Preserving audit trails
  • Preventing incorrect reporting post-dispatch

Important Notes

  • Requires PriceReducedFlag identifier

  • Depends on XML or extended property backup

  • Delay timing must be correctly configured

  • Tax recalculation may slightly vary in fallback mode

  • Should run only after label generation

  • Large order volumes may impact performance

Example Scenario

Key Insight

Acting as the reverse mechanism of price reduction, this macro ensures that temporary financial adjustments are safely restored—maintaining accuracy, auditability, and consistency across the entire order lifecycle.