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.ccLogicCartPlace.process
ccrz.ccLogicCartPlace.processInput
ccrz.ccLogicCartPlace.checkCartForAsyncPlace
ccrz.ccLogicCartPlace.retrieveCartHeader
ccrz.ccLogicCartPlace.validateCartPricing
ccrz.ccLogicCartPlace.processAddresses
ccrz.ccLogicCartPlace.createOrderHeader
ccrz.ccLogicCartPlace.retrieveCartItems
ccrz.ccLogicCartPlace.processCartItems
ccrz.ccLogicCartPlace.createOrderItem
ccrz.ccLogicCartPlace.performDMLOnOrder
ccrz.ccLogicCartPlace.processOrderGroups
ccrz.ccLogicCartPlace.performDMLOnOrderItems
ccrz.ccLogicCartPlace.insertMajorItems
ccrz.ccLogicCartPlace.insertMinorOrderItems
ccrz.ccLogicCartPlace.processOrderTerms
ccrz.ccLogicCartPlace.closeCart
ccrz.ccLogicCartPlace.createStoredPayments
ccrz.ccLogicCartPlace.processSubscriptions
ccrz.ccLogicCartPlace.processTransactionPayments
ccrz.ccLogicCartPlace.changeOrderStatus
ccrz.ccLogicCartPlace.processInvoices
ccrz.ccLogicCartPlace.refetch
ccrz.ccLogicCartPlace.placeOrder
ccrz.ccLogicCartPlace.prepReturn
ccrz.ccLogicCartPlace.handleCartPlaceException
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
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.ccLogicCartPlace
Define the business logic for converting a cart to an order.
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 |
In B2B Commerce for Visualforce Winter ’21 (managed package version 4.13 and API version 12):
- This logic service provider class includes methods that replace the ccrz.cc_api_Cart.placeEOrder public method, which is deprecated in this version. Pay close attention to the compatibility information listed for each inner method.
- As a result, this logic service provider executes differently compared to B2B Commerce for Visualforce Spring ’20 (managed package version 4.12 and API version 11) or older. The ccrz.cc_api_Cart.placeEOrder public method remains available for those older versions.
- To continue using ccrz.cc_api_Cart.placeEOrder logic for placing an order, set the Checkout storefront configuration module's Use Order Hook setting (co.usehkorder) to TRUE. This configuration specifies that methods of the ccrz.cc_hk_Order extension point class execute and call ccrz.cc_api_Cart.placeEOrder. When this configuration is FALSE, the ccrz.ccLogicCartPlace logic service provider executes instead.
Important
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. -
checkCartForAsyncPlace
Evaluates the cart, storefront configuration settings, and input keys to determine whether to place the order synchronously or asynchronously. -
retrieveCartHeader
Calls the ccrz.ccApiCart.fetch method for querying the ccrz__E_Cart__c record to place an order from. This method can also evaluate the cart's ccrz__ValidationStatus__c before creating an order. Finally, this method also queries the cart's related ccrz__E_CartCoupon__c and ccrz__E_ContactAddr__c records, but doesn't query the cart's items. -
validateCartPricing
Evaluates whether the cart's price data is current. -
processAddresses
Copies the cart's billing and shipping addresses, so that the copies can apply to the order that this logic chain creates. -
createOrderHeader
Creates the ccrz__E_Order__c record by copying all relevant field values from the source ccrz__E_Cart__c record. This method doesn't perform the DML insert operation. -
retrieveCartItems
Calls the ccrz.ccApiCart.fetchCartItems method for querying the ccrz__E_CartItem__c records associated with the source ccrz__E_Cart__c record. -
processCartItems
Separates the fetched ccrz__E_CartItem__c records into major and minor line items, and calls the ccrz.ccLogicCartPlace.createOrderItem method for creating corresponding ccrz__E_OrderItem__c records. -
createOrderItem
Creates a ccrz__E_OrderItem__c record by copying all relevant field values from a source ccrz__E_CartItem__c record. This method also evaluates the source cart item's groups and subscriptions, and sorts the order item by whether it's a major or minor line item. The ccrz.ccLogicCartPlace.processCartItems method calls this method for each ccrz__E_CartItem__c associated with the source cart. -
performDMLOnOrder
Performs the DML insert operation on the order's billing and shipping addresses. Then, this method performs the DML update operation on the ccrz__E_Order__c record. -
processOrderGroups
Clones shipping addresses from source ccrz__E_CartItemGroup__c records for the corresponding ccrz__E_OrderItemGroup__c records. This method also inserts the created addresses and order item groups, and finally associates the order item groups with their corresponding order items. -
performDMLOnOrderItems
Calls inner methods for performing the DML insert operation for the order's major and minor line items, and then evaluates whether the cart has a coupon applied. -
insertMajorItems
Sets the ccrz__Order__c and ccrz__RequestedDate__c fields on each ccrz__E_OrderItem__c record that represents a major line item in the order. Then, the method performs the DML insert operation on the ccrz__E_OrderItem__c records. -
insertMinorOrderItems
Sets the ccrz__Order__c, ccrz__RequestedDate__c, and ccrz__ParentOrderItem__c fields on each ccrz__E_OrderItem__c record that represents a minor line item in the order. Then, the method performs the DML insert operation on the ccrz__E_OrderItem__c records. -
processOrderTerms
Creates and inserts ccrz__E_OrderTerm__c records for the order. -
closeCart
Updates fields on the source ccrz__E_Cart__c record to indicate that the cart is closed and a corresponding order was created. -
createStoredPayments
Evaluates whether to create a stored payment from the input payment data. -
processSubscriptions
Creates ccrz__E_Subscription__c records for any ccrz__E_SubProdTerm__c records associated with the order. -
processTransactionPayments
Evaluates whether to call the ccrz.cc_hk_Order.createTransaction extension point method, and then calls ccrz.ccPaymentProcessor methods for processing the payment. -
changeOrderStatus
Updates fields on the created ccrz__E_Order__c record to indicate that the order was placed. -
processInvoices
Calls the ccrz.cc_hk_Invoice.onOrder extension point method for creating invoice for the order. -
refetch
Call the ccrz.ccApiCart.fetch method for fetching the ordered cart. -
placeOrder
Passes the input data to the ccrz.cc_api_Cart.placeEOrder public method, which invokes methods of the ccrz.cc_hk_Order and ccrz.cc_hk_Payment extension point classes. Those methods return data to this method, including the created order and the transaction details. -
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. -
handleCartPlaceException
Catches a ccrz.ccLogicCartPlace.CartPlaceException that occurs during the logic chain, and logs the exception message.