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.enqueueNext
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> enqueueNext(Map<String, Object>)
Inputs (Required)
This method accepts the working Map<String, Object> after the ccrz.ccLogicCartPlaceAsync.performDMLOnOrderItems method completes.
This method requires the following keys in the working map:
- ccrz.ccApiCart.CARTITEMLASTID
- String that specifies the Salesforce ID of the final major cart item that was processed during the current recursive job.
- ccrz.ccApiCart.CART_ID
- String that specifies the Salesforce ID of the cart to convert.
- ccrz.ccLogic.ORIGINAL_INPUT
- Map<String, Object> of the original, unmodified input data.
Logic Performed
This method completes the following actions:
- Reads ccrz.ccApiCart.CARTITEMLASTID and determines where in the list of cart items the current recursive job finished processing.
- Executes a direct query of ccrz__E_CartItem__c records for the source ccrz__E_Cart__c to
determine whether more ccrz__E_CartItem__c records
remain to be processed:
- If more ccrz__E_CartItem__c records remain, this method sets the ccrz.ccApiCart.NEXT_PLACE_JOB_ENQUEUED output to true.
- Otherwise, this method sets the ccrz.ccApiCart.NEXT_PLACE_JOB_ENQUEUED output to false.
- Sets ccrz.ccApiCart.CARTITEMLASTID for the next recursive job that ccrz.ccLogicCartPlaceAsync.enqueuePlace executes.
Outputs
This method returns the working Map<String, Object>, and sets the following key:
- ccrz.ccApiCart.NEXT_PLACE_JOB_ENQUEUED
- Boolean
Value Usage true Another recursive ccrz.ccApiCart.placeAsync call is enqueued for processing the next batch of ccrz__E_CartItem__c records. false The current job is the final recursive job. No other ccrz__E_CartItem__c records remain for processing.