ccrz.ccLogicCartAddTo.upsertCartItems

Executes the DML upsert operation for the created cart item records, which assigns IDs to each record.

Compatibility

This reference applies to:

Release Managed Package Version API Version
B2B Commerce for Visualforce Winter ’21 4.13 12
B2B Commerce for Visualforce Spring ’20 4.12 11
B2B Commerce for Visualforce Summer ’19 4.11 10
B2B Commerce for Visualforce Spring ’19 4.10 9
B2B Commerce for Visualforce Summer ’18 4.9 8

Signature

global virtual Map<String, Object> upsertCartItems(Map<String, Object>)

Inputs (Required)

This method accepts the working Map<String, Object> from the ccrz.ccLogicCartAddTo.validateItem method.

This method requires the following keys in the working map:

ccrz.ccApiCart.CARTITEMS_TO_UPSERT
List<ccrz__E_CartItem__c> of cart items to upsert.
ccrz.ccApiCart.HAS_LINE_DATA
Boolean
Value Usage
true The working map still contains line data that hasn't been evaluated.
false The working map no longer contains any line data.
ccrz.ccApiCart.RESPONSE
Map<String, Object> that describes the status of the logic chain for this method, such as the current value of the ccrz.ccApi.SUCCESS return key.

Outputs

This method returns the working Map<String, Object>, and sets the following key:

ccrz.ccApi.SUCCESS
Boolean
Value Usage
true The method upserted all cart items successfully.
false The call encountered errors.