You are here:
OrderItem Activated Example for Order Management Integration Layer
Order Management Integration Layer sends the OrderItem Activated notification when the order management system fulfills order items that are part of either an original order or a supplemental order. The order management system sends this notification to CPQ when the order item is activated.
The optional fields parameter in the notification message can contain any data that must be set in the order item fields.
The optional describedBy container can contain any data that must be set to attributes of an order item. Any attribute that is set is copied to the asset.
[
{
"orderItemId": "8021U000000hv6T",
"state": "Activated",
"fields": {
"vlocity_cmt__DueDate__c": "2019-10-01T10:00:23+10:00",
"vlocity_cmt__JeopardyStatus__c": "Green"
},
"describedBy": {
"IMSI": "00000000",
"MSISDN": "61456273222"
}
}
]
Sample Apex code example for invoking the OrderItem Activated notification:
Map<String, Object> orderItem1InputMap = (Map<String, Object>) JSON.deserializeUntyped('{\"orderItemId\": \"8023i000000qpqn\",\"state": \"Activated\",\"fields\": {\"DueDate__c\": \"2019-10-01T10:00:23+10:00\",\"JeopardyStatus__c\": \"Green\"},\"describedBy\": {\"IMSI\": \"00000000\",\"MSISDN\": \"61456273222\"}}');
OdinService.notify(new List<Object> { orderItem1InputMap });
When the OrderItem Activated notification is received, Order Management Integration Layer updates the fields and attributes for the order item for which the notification is sent. It also marks the order item and its children (if any) as Activated. This notification does not create an asset.

