You are here:
Order Rejected Example for Order Management Integration Layer
This notification is sent when a supplemental order is created and submitted. The order management system processes the fulfillment of the supplemental order.
During fulfillment, the order management system might determine that it cannot proceed with the supplemental order. In such cases, it sends a notification message to CPQ that the supplemental order is Rejected.
Similar to the Order Activated notification message, an optional fields container is included allowing the order management system to pass any values for any of the Order fields.
[
{
"orderId": "8011U000000Tq5l",
"state": "Rejected",
"reasonCode": "PONR",
"reasonDescription": "Point of Non Return is reached"
}
]
The following Apex code example shows how to invoke the Order Rejected notification:
Map<String, Object> orderInputMap = (Map<String, Object>) JSON.deserializeUntyped('{\"orderId\": \"8013i000000qvWhAAI\",\"state\": \"Rejected\",\"fields\": {\"JeopardyStatus__c\": \"Green\"}}');
OdinService.notify(new List<Object> { orderInputMap });

