Discard Supplemental Order

For CME Winter '20 and later releases, the discardOrder API is invoked on a supplemental order if the supplemental order is not submitted and the user wants to discard a supplemental order and proceed with the original order’s fulfillment.

Apex Method

Use this method with the supplemental order's ID as input (supplementalOrdId) to discard a supplemental order request.

public static void unfreezeOrder(Id supplementalOrdId)
{
    final String methodName = 'discardOrder';
    Map<String, Object> inputMap = new Map<String, Object>
    {
        'cartId' => supplementalOrdId,
        'methodName' => methodName
    };
    Map<String, Object> outputMap = new Map<String, Object>();
    Map<String, Object> optionsMap = new Map<String, Object>();
    vlocity_cmt.CpqAppHandler handler = new vlocity_cmt.CpqAppHandler();
    handler.invokeMethod(methodName, inputMap, outputMap, optionsMap);
    // traverse the result that was returned, to find the supplemental order id.
    vlocity_cmt.JSONResult result = (vlocity_cmt.JSONResult) outputMap.get('result');
}

See Also