CartSummary (Beta)

This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms.

Entry point for the Cart Summary. The Salesforce app will call the calculate method when starting Cart Summary calculations. To implement custom calculator orchestration and handling logic, extend this class and override the calculate method.

CartSummary is currently limited to the following set of cart and checkout operations:

  • AddItemToCart
  • EditCartItem
  • StartCheckout
  • PatchCheckout (address, set delivery method)

The remaining cart operations, including DeleteCartItem, AddCoupon, and DeleteCoupon are not supported.

Calls specific calculators that modify the given cart. Can be overridden with custom logic. To access the overridden method, call super.calculate(). Returns nothing.

ParamDescription
CartSummaryCalculationRequestThe CartSummaryCalculationRequest to act on.

Calls the custom Apex price calculator, if supplied. Otherwise, this method calls the default price calculator. This method cannot be overridden. Use with the calculate method. To supply a custom price calculator, see PricingCartCalculator.

ParamDescription
CartCalculationRequestThe CartCalculationRequest to act on.

Calls the custom Apex promotion calculator, if supplied. Otherwise, this method calls the default promotion calculator. This method cannot be overridden. Use with the calculate method. To supply a custom promotion calculator, see PromotionsCartCalculator.

ParamDescription
CartCalculationRequestThe CartCalculationRequest to act on.

Calls the custom Apex inventory calculator, if supplied. Otherwise, this method calls the default inventory calculator. This method cannot be overridden. Use with the calculate method. To supply a custom inventory calculator, see InventoryCartCalculator.

ParamDescription
CartCalculationRequestThe CartCalculationRequest to act on.

Calls the custom Apex shipping calculator, if supplied. Otherwise, this method calls the default shipping calculator. This method cannot be overridden. Use with the calculate method. To supply a custom shipping calculator, see ShippingCartCalculator.

ParamDescription
CartCalculationRequestThe CartCalculationRequest to act on.

Calls the custom Apex tax calculator, if supplied. Otherwise, this method calls the default tax calculator. This method cannot be overridden. Use with the calculate method. To supply a custom tax calculator, see TaxCartCalculator.

ParamDescription
CartCalculationRequestThe CartCalculationRequest to act on.

Selects the Cheapest Delivery Method and adds Shipping Charge Item to the Cart This method cannot be overridden. Returns nothing.

ParamDescription
CartSummaryCalculationRequestThe CartSummaryCalculationRequest to act on.