B2B Commerce for Visualforce Developer Guide
No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Data Service Provider Classes
Platform Cache for Logic Service Provider Classes
Extend or Override a Default Logic Service Provider
ccrz.ccLogicAttrFetch
ccrz.ccLogicCartPriceAsync.process
ccrz.ccLogicCartPriceAsync.processInput
ccrz.ccLogicCartPriceAsync.retrieveCartData
ccrz.ccLogicCartPriceAsync.validateLastPriceDate
ccrz.ccLogicCartPriceAsync.prepareAsyncPrice
ccrz.ccLogicCartPriceAsync.enqueuePricing
ccrz.ccLogicCartPriceAsync.updateCartHeader
ccrz.ccLogicCartPriceAsync.performDMLOnCart
ccrz.ccLogicCartPriceAsync.executeAsyncPrice
ccrz.ccLogicCartPriceAsync.retrieveCartItems
ccrz.ccLogicCartPriceAsync.prepareCartItems
ccrz.ccLogicCartPriceAsync.fetchPricingData
ccrz.ccLogicCartPriceAsync.applyPricing
ccrz.ccLogicCartPriceAsync.priceItem
ccrz.ccLogicCartPriceAsync.evaluateSubProdtermPricing
ccrz.ccLogicCartPriceAsync.applySubscriptionPercentages
ccrz.ccLogicCartPriceAsync.priceAttributeItem
ccrz.ccLogicCartPriceAsync.checkCartItemValidity
ccrz.ccLogicCartPriceAsync.evaluateComplexProducts
ccrz.ccLogicCartPriceAsync.performExternalPricing
ccrz.ccLogicCartPriceAsync.performDMLOnItems
ccrz.ccLogicCartPriceAsync.enqueueNext
ccrz.ccLogicCartPriceAsync.applyCoupons
ccrz.ccLogicCartPriceAsync.enqueuePlace
ccrz.ccLogicCartPriceAsync.updateOnError
ccrz.ccLogicCartPriceAsync.prepReturn
ccrz.ccLogicCartPriceAsync.handleCartPriceException
ccrz.ccLogicUserCreateUser
ccrz.ccLogicUserGetProfileData
ccrz.ccLogicUserLogin
ccrz.ccLogicUserRegister
ccrz.ccLogicUserUpdateProfileData
ccrz.ccLogicWLAddTo
ccrz.ccLogicWLCreate
ccrz.ccLogicWLCreateCart
ccrz.ccLogicWLGetActive
ccrz.ccLogicWLRemove
ccrz.ccLogicWLRemoveFrom
ccrz.ccLogicWLSetActive
REST API Endpoints for B2B Commerce for Visualforce
Create Subscriber APIs for B2B Commerce for Visualforce
ccrz.ccLogicCartPriceAsync
Define the business logic for converting a cart to an order using asynchronous Apex
jobs.
Compatibility
This reference applies to:
Release | Managed Package Version | API Version |
---|---|---|
B2B Commerce for Visualforce Winter ’21 | 4.13 | 12 |
Global API Caller
Methods
-
process
Overrides the base ccrz.ccLogic.process method, sets up an intermediate working map, and invokes the other methods for this class. -
processInput
Parses the working map for keys that downstream methods in the process chain require, and verifies that appropriate values are set. This method executes only during the synchronous portion of the initial ccrz.ccApiCart.priceAsync method call. -
retrieveCartData
Calls the ccrz.ccApiCart.fetch method for querying the ccrz__E_Cart__c record to price. Finally, this method also queries the cart's related ccrz__E_CartCoupon__c records, but doesn't query the cart's items. This method executes for every ccrz.ccApiCart.priceAsync call, regardless of whether it's the initial or a recursive call. -
validateLastPriceDate
Evaluates whether the ccrz__RepricedDate__c field on the ccrz__E_Cart__c record is considered current, depending on the value of the Optimize Cart Repricing storefront configuration. This method executes for every ccrz.ccApiCart.priceAsync call, regardless of whether it's the initial or a recursive call. -
prepareAsyncPrice
Wraps inner methods that execute synchronously during the initial ccrz.ccApiCart.priceAsync call. These methods determine whether to price the cart. This method executes only during the synchronous portion of the initial ccrz.ccApiCart.priceAsync method call. -
enqueuePricing
Calls the System.enqueueJob method for adding the queueable ccLogicCartPriceEnqueue class to the asynchronous Apex job queue. To call a custom queueable class, override this method with custom subscriber code. -
updateCartHeader
Sets fields on the ccrz__E_Cart__c record to reference the asynchronous Apex job ID, update the cat's status, and set the repriced date. This method executes for every ccrz.ccApiCart.priceAsync call, regardless of whether it's the initial or a recursive call. -
performDMLOnCart
Performs the DML update operation on the ccrz__E_Cart__c record to price. This method executes for every ccrz.ccApiCart.priceAsync call, regardless of whether it's the initial or a recursive call. -
executeAsyncPrice
Wraps inner methods that execute during the recursive, asynchronous ccrz.ccApiCart.priceAsync calls. These methods process a subset of ccrz__E_CartItem__c records from the source ccrz__E_Cart__c. -
retrieveCartItems
Determines how many ccrz__E_CartItem__c records to price during the recursive job, and then calls the ccrz.ccApiCart.fetchCartItems method for querying them. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
prepareCartItems
Identifies ccrz__E_CartItem__c records to pass to or exclude from the subsequent pricing methods. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
fetchPricingData
Calls the ccrz.ccApiProduct.fetch method and returns product pricing data for the cart items to reprice. If the fetched product data includes attributes, this method also calls the ccrz.ccApiAttribute.fetch method. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
applyPricing
Loops through the cart items to reprice, and calls the appropriate inner method for setting each cart item's price. This method also ensures that major and minor line items remain associated with each other. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
priceItem
Begins the For loop within the ccrz.ccLogicCartPriceAsync.applyPricing method by evaluating the current cart item and determining the appropriate pricing logic. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
evaluateSubProdtermPricing
Parses the subscription term for a cart item, and sets the item's corresponding price fields. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
applySubscriptionPercentages
Adjusts the price for a cart item that's a minor line item for a kit or dynamic kit that defines a subscription term. This method applies the parent subscription's upfront and recurring percentage discounts to the child cart item, which previously had only standard pricing logic applied. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
priceAttributeItem
Parses JSON attribute pricing data for a cart item, and sets the item's corresponding price fields. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
checkCartItemValidity
Continues the For loop within the ccrz.ccLogicCartPriceAsync.applyPricing method by evaluating validation criteria and updating the cart item's status. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
evaluateComplexProducts
Evaluates cart items that are included in complex products and sets the status of each cart item. A complex product can be a bundle, kit, dynamic kit, assembly product, or attribute-based product. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
performExternalPricing
Provides a placeholder for pricing a cart from an external source. By default, this method is empty and performs no default action. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
performDMLOnItems
Removes cart items, combines externally priced cart items with other cart items, and finally executes the DML upsert operation for the updated ccrz__E_CartItem__c records. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
enqueueNext
Determines whether more major line item ccrz__E_CartItem__c records remain to be priced, and calls ccrz.ccLogicCartPriceAsync.enqueuePricing for queueing the next job. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
applyCoupons
Creates a cart item for a coupon, and applies the coupon's discount to the cart. This method calls the ccrz.ccApiCoupon.apply method, which creates the coupon cart item, applies the discount, and executes the corresponding DML operations. This method executes only during the final recursive ccrz.ccApiCart.priceAsync method call that processes the remaining ccrz__E_CartItem__c records. -
enqueuePlace
Calls the System.enqueueJob method for adding the queueable ccLogicCartPriceEnqueuePlace class to the asynchronous Apex job queue. To call a custom queueable class, override this method with custom subscriber code. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls, and only when pricing occurs as part of the ccrz.ccApiCart.placeAsync logic chain. -
updateOnError
Updates the fields on the ccrz__E_Cart__c record when an exception occurs during asynchronous cart pricing. This method executes only during the recursive, asynchronous ccrz.ccApiCart.priceAsync method calls. -
prepReturn
Overrides the base ccrz.ccLogic.prepReturn method, removes intermediate keys added to the working map by the preceding methods, and returns the final return data keys. This method executes for every ccrz.ccApiCart.priceAsync call, regardless of whether it's the initial or a recursive call. -
handleCartPriceException
Catches a ccrz.ccLogicCartPriceAsync.CartPriceAsyncException that occurs during the logic chain, and logs the exception message. If the pricing logic is executing as part of a ccrz.ccApiCart.placeAsync call, this method also catches a ccrz.ccLogicCartPlaceAsync.CartPlaceAsyncException to ensure that the error propagates and ends order placement.