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.

Freeze Order

Freeze the order's fulfillment in the order management system.

Before canceling an order, call the order management system and return the real-time point of no return (PONR) status to confirm that the order can be canceled.

With CME Winter '20 and later releases, clicking the Cancel button calls the CPQ/CancelOrder OmniScript, which calls the preValidate and createSupplementalOrder methods.

Prior to CME Winter '20, the Cancel Order button was displayed and it would call the submitCancelOrder method. For backward compatibility, you can adjust the value of the CPQ Configuration Settings Reference configuration setting.

The preValidate method freezes the order's fulfillment in the order management system, which can respond with one of the following:

  • Accepted: The fulfillment is (or can be eventually) frozen. When the order management system accepts the freeze order request, Odin will set the Order.OrderStatus__c to the Frozen state.

  • Rejected: The fulfillment cannot be Frozen. Odin looks for the reasonCode field. If the reasonCode value is PONR, Odin sets the Changes Allowed flag in the Order and OrderItem to false.

Communication (vlocity_cmt)

For API parameter names and descriptions, see Cart-Based API Swagger Reference.

Response FormatJSON
Resource URL/services/apexrest/{namespace}/v2/cpq/carts/{order_ID}/prevalidate
Request Body{"cartId": "order_ID"}
CodeDescription
FREEZE-1026The preValidate API can make a Freeze Order request to the Order Management System (OM). This code indicates that OM accepted the Freeze Order request.
FREEZE-1027The preValidate API can make a Freeze Order request to the Order Management System (OM). This code indicates that OM rejected the Freeze Order request.
FREEZE-1028The preValidate API can make a Freeze Order request to the Order Management System (OM). This code indicates that parameters required by OdinAPIHandler (orderIdList) were not passed. To avoid this, use standard provided implementations for OdinAPIHandler interface.
FREEZE-1029The preValidate API can make a Freeze Order request to the Order Management System (OM). If OM returns an unrecognized response, then this code is returned by preValidate API. Only Accepted and Rejected are recognized responses for Freeze Order request.
FREEZE-1030The preValidate API can make a Freeze Order request to the Order Management System (OM). If the OM rejects the request, it can send the reasonCode field to specify why the request was rejected. Recognized reasonCode values include PONR, UNKNOWN, and EXCEPTION. If OM returns any other reasonCode, the preValidate API returns this error code.
INVOKE-500The preValidate API was called with an incorrect cart ID.

See Also