Solution Scheduled
Commerce / B2B Commerce
Sync Add to Cart picks the Catalog Procedure Plan instead of the Transactional (WebCart) Procedure Plan when no cart exists yet
Summary
In a Commerce store with Consumer Goods (CG) integration enabled, the first add-to-cart for a buyer with no existing cart prices the item with the Catalog Procedure Plan instead of the Transactional Procedure Plan (whose Primary Object is WebCart). Once the cart exists, subsequent add-to-cart calls resolve the Transactional plan correctly. As a result, the same operation executes different pricing logic depending on whether a cart already exists.
- Storefront Configuration: Commerce storefront with Consumer Goods integration enabled; Pricing Calculation Schema = PPP.
- Catalog Procedure Plan: Process Type Commerce, no Primary Object, context definition AdvOrderSalesTxnContext__stdctx, PreApex section ApexConsumerGoodsHydrationPreHook, PricingProcedure section Basic_PPP, all sections set to Default resolution.
- Transactional Procedure Plan: Process Type Commerce, Primary Object WebCart, identical context definition and sections, all set to Default resolution.
- Execution Mode: Add-to-cart runs synchronously.
Workaround
Salesforce hasn't published a workaround. Check the official page.
Steps to reproduce
- Log in as a buyer, or browse as a guest, with no active cart in the store.
- Add a product to the cart via POST /commerce/webstores/{webstoreId}/carts/active/cart-items.
- Check which Procedure Plan was used to price the cart (via pricing logs or the debug output of the executed expression sets).
- Add another product to the same cart and verify the Procedure Plan used again.
History
First tracked here as Solution Scheduled
Nov 30, 2026