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.

1public static void unfreezeOrder(Id supplementalOrdId)
2{
3    final String methodName = 'discardOrder';
4    Map<String, Object> inputMap = new Map<String, Object>
5    {
6        'cartId' => supplementalOrdId,
7        'methodName' => methodName
8    };
9    Map<String, Object> outputMap = new Map<String, Object>();
10    Map<String, Object> optionsMap = new Map<String, Object>();
11    vlocity_cmt.CpqAppHandler handler = new vlocity_cmt.CpqAppHandler();
12    handler.invokeMethod(methodName, inputMap, outputMap, optionsMap);
13    // traverse the result that was returned, to find the supplemental order id.
14    vlocity_cmt.JSONResult result = (vlocity_cmt.JSONResult) outputMap.get('result');
15}

See Also