ccrz.ccApiCart.price
Reprices all the items in a cart.
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 static Map<String, Object> price(Map<String, Object>)
Service Layer Classes
- Logic Service Provider
- ccrz.ccLogicCartPrice
Inputs (Required)
Map<String, Object> that must include the following required keys:
- ccrz.ccApi.API_VERSION
- The version of the B2B Commerce for Visualforce API to reference for the method call. We recommend that you use the ccrz.ccApi.CURRENT_VERSION constant whenever possible, and only reference a specific version for compatibility if necessary.
- ccrz.ccApiCart.CART_ENCID
- String that specifies the encrypted cart ID to price.
- ccrz.ccApiCart.CART_ID
- String that specifies the cart ID to price.
Inputs (Optional)
The input map can also include the following keys:
- ccrz.ccApi.API_SIZING
-
Map<String, Object> that describes options
for sizing and scoping the method's return data. This method supports
ccrz.ccApi.SZ_REFETCH => TRUE, which specifies
that this method invokes ccrz.ccApiCart.fetch for returning the repriced
cart.
ccrz.ccApi.SIZING => new Map<String, Object>{ ccrz.ccApiCart.ENTITYNAME => new Map<String, Object>{ ccrz.ccApi.SZ_REFETCH => TRUE } }
- ccrz.ccApiCart.CILIST
-
Map<String, Map<String, Object>> of the
cart items to reprice. For example, when a buyer updates quantities of items in the
cart, this list specifies the cart items that have changed. This map is keyed by cart
item ID, and each nested Map<String, Object>
defines the following subkeys:
- ccrz.ccApiCart.CIQTY
- Integer that specifies the item's quantity.
- ccrz.ccApiCart.CICMTS
- String that specifies the item's comments.
- ccrz.ccApiCart.CIPREPROC
- Boolean
Value Usage true Call the ccrz.cc_api_CartExtension.preprocess extension point method for processing the cart items. false (default) Skip the ccrz.cc_api_CartExtension.preprocess extension point method. - ccrz.ccApiCart.FORCE_PRICE_SYNC
- Boolean
Value Usage true Execute pricing synchronously, regardless of the value of the ccrz.ccApiCart.PRICE_ASYNC input. false (default) Default logic determines whether to price the cart synchronously or asynchronously. - ccrz.ccApiCart.PARTIAL_CART_UPDATE
- Boolean
Value Usage true Apply pricing, entitlements, and quantity updates only to a certain subset of cart items. The ccrz.ccLogicCartPrice.retrieveCartData method defines the business logic for the partial update. false (default) Execute default pricing logic. - ccrz.ccApiCart.PRICE_ASYNC
- Boolean
Value Usage true Execute pricing asynchronously by calling the ccrz.ccApiCart.priceAsync method. false (default) Execute pricing synchronously. - ccrz.ccApiCart.SKIP_CART_PRICING
- Boolean
Value Usage true Skip the pricing logic defined in the ccrz.ccLogicCartPrice logic service provider. false (default) Execute the pricing logic defined in ccrz.ccLogicCartPrice. - ccrz.ccApiCart.SYNC_MAX_CART_SIZE
- Integer that specifies the maximum number of items that must be in a cart for synchronous processing. This value overrides the value of the Asynchronous Processing Threshold storefront configuration setting in the Cart Scale module (cs.asyncthreshold).
Outputs
Map<String, Object> that can include the following keys:
- ccrz.ccApi.API_VERSION
- Integer that indicates which API version was used for the query.
- ccrz.ccApi.SUCCESS
- Boolean
Value Usage true The call completed. false The call encountered errors. - ccrz.ccApiCart.CART_ENCID
- String that specifies the encrypted ID of the cart that was priced.
- ccrz.ccApiCart.CART_OBJLIST
- List<Map<String, Object>>, where each Map<String, Object> represents an updated ccrz__E_Cart__c record that the ccrz.ccApiCart.fetch method returned.