Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ccrz.ccLogicCartPlaceAsync.executeAsyncOrder
Compatibility
This reference applies to:
Release | Managed Package Version | API Version |
---|---|---|
B2B Commerce for Visualforce Winter ’21 | 4.13 | 12 |
Signature
global virtual Map<String, Object> executeAsyncOrder(Map<String, Object>)
Inputs (Required)
This method accepts the working Map<String, Object> after the ccrz.ccLogicCartPlaceAsync.processInput method completes.
This method requires the following key in the working map:
- ccrz.ccApiCart.PLACE_ASYNC_FINISH
- Boolean that must be true for this method to
execute.
Value Usage true The current method execution is a recursive, asynchronous call that continues the order placement process after the initial call. false The current method execution is the synchronous portion of the initial call that begins the order placement process.
Inputs (Optional)
If the working map includes the following key, this method evaluates it:
- ccrz.ccApiCart.PRICING_FOR_ORDER_FAILED
- Boolean
Value Usage true An error occurred when pricing the cart during the previous iteration of the recursive, asynchronous call. The logic chain returns a ccrz.ccLogicCartPlaceAsync.CartPlaceAsyncException, and the ccrz.ccLogicCartPlaceAsync.updateOrderOnError method executes. false (default) No error occurred.
Logic Performed
During each recursive, asynchronous call, this method invokes other methods of the ccrz.ccLogicCartPlaceAsync class in the following order for converting a subset of ccrz__E_CartItem__c records to corresponding ccrz__E_OrderItem__c records:
- checkForInvalidItems
- retrieveCartItems
- processCartItems, which calls into createOrderItem
- processOrderGroups
- performDMLOnOrderItems, which calls into insertMajorItems and insertMinorOrderItems
- enqueueNext, which calls into enqueuePlace
- prepReturn
During the final recursive ccrz.ccApiCart.placeAsync call that processes the remaining ccrz__E_CartItem__c records, this method invokes the remaining methods of the ccrz.ccLogicCartPlaceAsync class in the following order:
- processOrderTerms
- closeCart
- createStoredPayments
- processSubscriptions
- processTransactionPayments
- changeOrderStatus
- processInvoices
- sendOrderConfirmation
- prepReturn
Outputs
This method returns the working Map<String, Object> after all inner methods have completed. Refer to the individual method reference for more information about each method's outputs.