Skip to main content
Version: 1.1.x

Extension Point: Order Hold Strategy

Basics​

ParameterValue
Extension Point KeyORDER_HOLD_STRATEGY
Extension Point NameOrder Hold Strategy
Extension InterfaceOrderHoldStrategy
Supports Multiple Extensions?Yes
Selector TypeStore
Available Since1.0.0

Use Cases​

Extensions implementing this Extension Point can optionally return an XPFOrderHold object indicating the reason why the order relating to the details passed in the context should be held. This will cause the order to go into an ON_HOLD state until a business user either releases or rejects the order in Commerce Manager.

Methods​

evaluate​

The evaluate method is invoked during checkout. It can use data from the context to determine if the order should be held.

Extension Sample​

@Extension
@XPFAssignment(extensionPoint = XPFExtensionPointEnum.ORDER_HOLD_STRATEGY, priority = 50)
public class HoldAllOrdersOrderHoldStrategyImpl extends XPFExtensionPointImpl implements OrderHoldStrategy {

private static final String ALL_ORDERS_ARE_CONFIGURED_FOR_HOLD_PROCESSING = "All orders are configured for hold processing";

@Override
public Optional<XPFOrderHold> evaluate(final XPFOrderHoldStrategyContext context) {
return Optional.of(new XPFOrderHold(getPermission(context), ALL_ORDERS_ARE_CONFIGURED_FOR_HOLD_PROCESSING));
}
}