When a modifiable order is loaded into the current global context, or selected by an agent, it is priced by Commerce Service Center using the CSREnvironmentMonitoring
component. The entire order is priced using PricingConstants.OP_REPRICE_ORDER_TOTAL
as the pricing operation.
Only modifiable orders are priced when selected for the global context, however, it is possible to configure which orders can be modified by Commerce Service Center based on the state of the order. CSRAgentTools
contains API and configurable properties for determining which orders are considered modifiable by state.
Determining if Orders are Modifiable
The CSRAgentTools.isOrderModifiable(Order
pOrder)
method determines if an order is modifiable by comparing the order’s current state to the configured values and can be extended if necessary.
An order is not modifiable when:
Any items in the order have been shipped
Any payment groups in the order are in a non-modifiable state
The order is in a non-modifiable order state
The following example displays the configurable properties in /atg/commerce/custsvc/util/
:
CSRAgentTools
#both nonModifiableOrderStates and nonModifiablePaymentGroupStates are #used to determine a non-modifiable order. #states that indicate an order cannot be modified nonModifiableOrderStates=REMOVED,\ QUOTED,\ NO_PENDING_ACTION,\ PENDING_REMOVE,\ PENDING_CUSTOMER_RETURN,\ AGENT_REJECTED nonModifiablePaymentGroupStates^=\ /atg/commerce/order/PaymentGroupManager.nonModifiablePaymentGroupStates=REMOVED,\ SETTLED
Determining if Orders are Submitted
The CSRAgentTools.isOrderSubmitted
method determines if an order is in a submitted state. Submitted order states are configured using the submittedOrderStates
property of CSRAgentTools
:
submitedOrderStates=SUBMITTED, PROCESSING, PENDING MERCHANT ACTION
Commerce Service Center uses this API to:
Determine which pipelines to use for clone edit initialization and reconciliation. All orders that the API considers submitted use pipelines configured for the submitted state
Determine if the original order prices should be used to price the order
Present dynamic page content when working on a submitted order. For example, disabling the Promotion Browser when working on a submitted order