You are here:
OrderItem Accepted Example for Order Management Integration Layer
This notification is sent when a supplemental order is created and submitted, and the order management system processes the fulfillment of the supplemental order. During fulfillment, the order management system might determine that a particular order item can successfully supersede an order item from a previous order. In such cases, the order management system sends the OrderItem Accepted notification.
You can optionally include the OrderItem Accepted notification in the Order Accepted payload.
The notification message may optionally contain fields and describedBy containers. The fields container contains any data that must be updated in the OrderItem record.
The describedBy container stores any data that must be updated in the OrderItem.
[
{
"orderItemId": "8011U000000Tq0H",
"state": "Accepted"
}
]
Sample Apex code for invoking the OrderItem Accepted notification:
Map<String, Object> orderItem1InputMap = (Map<String, Object>) JSON.deserializeUntyped('{\"orderItemId\": \"8023i000000qpqn\",\"state": \"Accepted\",\"fields\": {\"DueDate__c\": \"2019-10-01T10:00:23+10:00\",\"JeopardyStatus__c\": \"Green\"},\"describedBy\": {\"IMSI\": \"00000000\",\"MSISDN\": \"61456273222\"}}');
OdinService.notify(new List<Object> { orderItem1InputMap });

