It is possible to adjust an order total by a fixed amount. Adjustments can either be a fixed increase (debit) or decrease (credit) to the order total. The details of a manual adjustment such as the amount, adjustment type and reason code are permanently stored within the database. For information on the corresponding Commerce API, refer to the ATG Commerce Programming Guide.

All manual adjustments are created as transient repository items. Subsequent processing in the updateOrder pipeline determines if the adjustments is permanently added to the repository based on the following rules.

  • All adjustments created for submitted orders are unconditionally persisted to the repository. As configured by default, this is the only time Commerce and Commerce Service Center unconditionally saves adjustments to the repository

  • All adjustments created for persistent, incomplete orders are conditionally saved based on configuration. Commerce Service Center uses a Boolean configuration setting, whose default value is false, that determines if adjustments should be saved immediately for persistent, incomplete orders

The Commerce updateOrder pipeline contains a processor that saves the manual adjustment items to the repository when appropriate. saveManualAdjustment executes the atg/commerce/order/
processor with the following two processor configurations:

# The processor will save the manual adjustments to the repository for
# orders in these states, depending on the value of saveIncomplete
# saveForIncompleteOrders


# The processor will save the manual adjustments to the repository for
# orders in the configured incomplete states if this property is true.
# Otherwise, the manual adjustments are not saved for incomplete orders.


Important: Be aware of a condition that may occur when saving incomplete manual adjustments. Manual adjustments are, by default, applied unconditionally. Once added to the order, manual adjustments affect the order’s price despite the contents of the order. This is important if an incomplete order is saved with manual adjustments as subsequent changes to the order at checkout time will not change any adjustments that have been applied. For example, if an agent applies a $20 credit adjustment to an order with $100 merchandise and saves it in an incomplete state, the customer could return and remove $80 worth of merchandise from the order and checkout with a $0 total. As such, the processor is configured by default to not save manual adjustments for incomplete orders.

The OrderAdjustmentCalculator adjusts the order’s subtotal based on the manual adjustments associated with the order. The /atg/commerce/pricing/calculators/
component contains the following configuration:


The adjustment calculator is added as a postCalculator in the /atg/commerce/pricing/
. As such, the calculator runs after the pre-calculators and all calculators associated with any promotions for the order. The configuration for the OrderPricingEngine is:


For additional information on pricing and calculators, refer to the Working with Exchange Orders section and the ATG Commerce Programming Guide.

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices