The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

CpqAppHandlerError Codes for Cart-Based APIs

Out of the box, error messages in CpqAppHandlerErrors.cls are based on custom labels. You define all CpqAppHandler error messages in the CpqAppHandlerErrors class, then create the translations for these messages.

Each error must have:

  • A unique integer code.

  • A default error message. You may use this message to construct the JSONMessage. The out of box error messages defined in the CpqAppHandlerErrors class are not intended to be translated because the error code is used to get the translated error message.

The following is the via_cpq/classes/CpqAppHandlerErrors.cls: