Loading

Industries CPQ: getCartsProducts API fails with internal server exception when Standard cart API is enabled in the Sandbox/Production org.

Publish Date: May 28, 2026
Description

When invoking getCartsProducts in Salesforce Industries Communications CPQ (Vlocity managed package), the call returns "An internal server error has occurred. Error ID: <id>" or throws a UI that displays a red banner "An error has occurred. Please contact your System Administrator" in Cart Page.

Resolution

PFB the details of Possible RCA of the issue:-

Cause 1: Blank ProductAvailabilityOpen Custom Class Implementation (most common after sandbox refresh)

  1. Open Developer Console > Query Editor and run: SELECT Id, Name, vlocity_cmt__ClassName__c FROM vlocity_cmt__CustomClassImplementation__c WHERE Name = 'ProductAvailabilityOpen'.
  2. If the vlocity_cmt__ClassName__c field is blank or null, edit the record and set vlocity_cmt__ClassName__c to CtxRulesProductsOpenImplementation.
  3. Save the record.
  4. Clear the Vlocity platform cache: App Launcher > Vlocity CMT Administration > Please run 3 Maintenance Jobs. If Standard Cart API is enabled in the org then please run the Generate EPC jobs as well.

Cause 2: Generate EPC Job has Failed in the backend

  1. Navigate to App Launcher > Async Processes and open the most recent Generate Compile Data run.
  2. Inspect the related vlocity_cmt__AsyncProcessStep__c records. If Compile Promotions or Compile Pricing show Failed, review the failure reason.
  3. If the error is "STORAGE LIMIT EXCEEDED" or expired CachedAPIResponses are consuming data storage, navigate to Setup > Storage Usage [StorageUsage] and delete expired vlocity_cmt__CachedAPIResponse__c rows: DELETE [SELECT Id FROM vlocity_cmt__CachedAPIResponse__c WHERE vlocity_cmt__ExpireAt__c < :System.now() LIMIT 10000];
  4.  Re-run Generate Catalog Product Definitions, then Generate Compile Data, and verify all 8 steps are complete with status Completed.

Cause 3: Invalid CatalogProductRelationship records (causes "Attempt to reference a null object")

  1. Run: SELECT vlocity_cmt__Product2Id__c, vlocity_cmt__PromotionId__c, vlocity_cmt__CatalogId__r.vlocity_cmt__CatalogCode__c FROM vlocity_cmt__CatalogProductRelationship__c WHERE vlocity_cmt__Product2Id__c = NULL AND vlocity_cmt__PromotionId__c = NULL.
  2.  Delete every row returned — these are invalid relationships missing both Product and Promotion.
  3. Re-run the 3 Maintenance Jobs and then Generate EPC Job.


Cause 4: While Partner Community or Guest user request are failing and internal user request are succeeding

  1. Navigate to Setup > Profiles > [Partner Community Profile] (or the Guest User profile under Setup > Digital Experiences > All Sites > [Site] > Public Access Settings).
  2. Under Enabled Apex Class Access, add vlocity_cmt.CpqAppHandler and the supporting classes vlocity_cmt.CpqAppHandlerController, vlocity_cmt.CpqApexCallable, and vlocity_cmt.CpqCachedApiResponseSelector.
  3.  Under Object Settings, grant Read on Product2 [Product2], Pricebook2 [Pricebook2], PricebookEntry [PricebookEntry], vlocity_cmt__PriceList__c, vlocity_cmt__PriceListEntry__c, vlocity_cmt__CatalogProductRelationship__c, and the cart object vlocity_cmt__OrchestrationItem__c / Order [Order] / Quote [Quote] depending on the cart type.
  4.  Add the user to the appropriate Vlocity managed package permission sets: Vlocity CMT User and Vlocity CMT Cpq User (or Vlocity Communications User on Communications Cloud).
  5.  For Guest users on an Experience Cloud Site, also navigate to Setup > Digital Experiences > All Sites > [Site] > Builder > Settings > Security & Privacy and confirm Guest User Sharing Rules grant access to Product2, Catalog, and PriceList records used by the cart.
  6.  If the call still fails with UserSecurityException for Guest users, create a sharing rule on vlocity_cmt__CatalogProductRelationship__c granting Read access to the Guest User profile.

 

Knowledge Article Number

005385090

 
Loading
Salesforce Help | Article