Loading

CustomerBasketsQuotaExceededException errors occur when attempting to create baskets for B2C Commerce

Veröffentlichungsdatum: Feb 9, 2026
Beschreibung

The 24.8 release for B2C Commerce contained a fix to handle duplicate basket creation that occurred when utilizing the Storefront Reference Architecture (SFRA) and via Salesforce Commerce API (SCAPI) / Open Commerce API (OCAPI) in hybrid Composable storefront implementations

 

The duplicate basket creation referenced above leads to CustomerBasketsQuotaExceededException errors which manifest as 400 Bad Request errors when attempting to create a basket. An example of what this looks like is:

"CustomerBasketsQuotaExceededException",
"message": "The maximum number of baskets per customer was exceeded. Please reuse or delete one of the existing baskets (7d0c9a43eaa41cd433c5032a02)."

 

This exception simply means that at the time of a POST request to create a basket via SCAPI/OCAPI, there is already an empty basket created earlier which has been found to usually occur when the getCurrentOrNewBasket() method is used which you may see as being called as part of a hook or in any other flow. This should be avoided and instead, only create a basket when there is a need e.g. when adding the first product or storing customer information such as their address. This is a general best practice but especially important for hybrid storefronts.

Lösung

There are two action items to take when the CustomerBasketsQuotaExceededException errors occur:

 

  • (For live storefronts that require Immediate mitigation) Reach out to the Commerce Support team to enable the "Legacy Multiple Open And Not Expired Baskets" feature toggle on your Production instance.
    • Please consider doing this only for the Production instance to allow for further troubleshooting in the Development & Staging instances.

  • (Long term / pre-implementation fix) Identify what is creating the pre-existing empty basket in your existing code e.g. use of the getCurrentOrNewBasket() method and fix this issue by following the best practices listed in Hybrid Implementation Guidance.

 

Note: The above does NOT apply if your storefront implementation is SiteGenesis only, SFRA (controller based) or pure PWA Kit (REST based with SCAPI/OCAPI).

Nummer des Knowledge-Artikels

002717246

 
Laden
Salesforce Help | Article