Loading

Industries CPQ: assetToOrder Fails with Internal Server Error After Enabling Standard Cart APIs

Publish Date: May 26, 2026
Description
When invoking the vlocity_cmt.CpqAppHandler remote action with the subaction assetToOrder (including via the REST endpoint /services/apexrest/vlocity_cmt/v2/carts), the operation fails and halts the fulfillment pipeline. No Order record is created.
 
Symptoms & Error Messages
  • REST API Response: {"errorCode":"INVOKE-500","error":"An internal server error has occurred. Error ID: <id>"}
  • Integration Procedure Response: Configuration Error: Async Apex Job: <jobId> Status: Failed. Salesforce System Error: <id>
Trigger Conditions
This behavior is consistently reproducible for specific Asset IDs on CME Summer '24 and later when Standard Cart-Based APIs are enabled, and one of the following is true:
  • The requestDateTime parameter uses a non-ISO-8601 format.
  • The active vlocity_cmt__ConfigurationSnapshot__c record has expired or is missing.
  • A custom CPQ pre-hook implementation (assetToOrder.PreInvoke) throws an unhandled exception or fails to return properly.
Resolution
Follow these troubleshooting steps in order. Validate the assetToOrder call after each step before moving to the next.
Cause 1: Invalid requestDateTime Format
  1. Inspect the JSON request payload sent to the endpoint or the CpqAppHandler.
  2. Ensure the parameter name is explicitly requestDateTime (not requestDate).
  3. Format the timestamp strictly to the ISO-8601 UTC format: yyyy-MM-ddTHH:mm:ss.SSSZ (e.g., 2026-05-26T22:45:00.000Z).
    1. Note: Raw dates like 2026-05-26 or incorrect timezone offsets like +0000 will trigger an internal server error.
    2. Valid Payload Example:
{
  "subaction": "assetToOrder",
  "id": "<Asset_Id>",
  "accountId": "<Account_Id>",
  "requestDateTime": "2026-05-26T22:45:00.000Z"
}
Cause 2: Expired or Missing Configuration Snapshot
When Standard Cart APIs are enabled, an active configuration snapshot is strictly required.
  1. Navigate to Setup > Custom Settings > CPQ Configuration Setup (or access via Vlocity CMT Administration) and verify that Standard Cart API is set to True.
  2. Open the Developer Console and execute the following SOQL query to inspect your snapshots:
    SELECT Id, vlocity_cmt__ConfigurationSnapshotId__c, vlocity_cmt__EffectiveStartDate__c, vlocity_cmt__EffectiveEndDate__c, vlocity_cmt__Status__c 
    FROM vlocity_cmt__ConfigurationSnapshot__c 
    WHERE vlocity_cmt__Status__c IN ('Processing','Active') 
    ORDER BY LastModifiedDate DESC
    
  3. Verify that at least one record shows a Status of Active and an EffectiveEndDate in the future (or null). If all snapshots are expired, the API will fail.
  4. To Regenerate: Navigate to Vlocity CMT Administration and run both Cache Catalog Product Definitions and Refresh PriceBook. Wait until both Apex jobs complete successfully.
Cause 3: Faulty Custom CPQ Pre-Hook
If your organization utilizes a custom implementation of vlocity_cmt.VlocityOpenInterface for the pre-hook filter:
  1. Temporarily disable the hook to isolate the issue.
  2. Test the assetToOrder call again. If it succeeds, the issue resides in your custom code.
  3. Re-enable the hook and review its invokeMethod logic. Ensure it returns true for matched methods and gracefully handles exceptions.
Cause 4: Async Processing Errors in Integration Procedures
If the error surfaces inside an Integration Procedure as an Async Apex Job Failure:
  1. Locate the Remote Action step inside your Integration Procedure.
  2. Confirm Remote Class is vlocity_cmt.CpqAppHandler and Remote Method is assetToOrder.
  3. Under Additional Options, verify both Use Queueable Apex Remoting (useQueueableApexRemoting) and Queueable Chainable (queueableChainable) are enabled.
  4. To extract the underlying error, bypass the async wrapper by testing the raw payload directly in Workbench or Postman via POST /services/apexrest/vlocity_cmt/v2/carts. Check Setup > Apex Jobs to view the true system exception message.
Knowledge Article Number

005385201

 
Loading
Salesforce Help | Article