orderModified event
Order lines and their statuses are modeled as individual events and published together with the
orderModified event. Only new, modified, deleted and canceled lines are published.
To receive full order data, subscribe these events along with the orderModified
event. These accompanying events are described as follows:
- orderLine event
- This event is published with the
orderModifiedevent. It publishes line-level information only for the newly added, modified, deleted or canceled order lines.
- orderLineStatus event
- This event is published with the
orderModifiedevent, whenever an order line in a confirmed order is modified such that there is a status change. It publishes the status breakup of order line quantity.
- Event schema
-
For example, consider that an Order with two lines, each with an
orderedQuantityof 5 is scheduled. The resulting event is a batch event containing two batches, one for each of the order line statuses. Each batch will contain anorderLineStatusevent along with its correspondingorderLineevent andorderModifiedevent. When this order is updated to add a quantity of 2 to the first line, theorderModifiedevent is published with only the data pertaining to the changed line. The event published is a batch event containing two batches, one for each of the statuses of the changed line. The first batch will contain theorderLineStatusevent for Status as Scheduled andstatusQuantityas 5, along with its correspondingorderLineandorderModifiedevents. The second batch will contain theorderLineStatusevent for the Status as Created andstatusQuantityas 2, along with its correspondingorderLineandorderModifiedevents.The event schema now supports publishing
customAttributesfor order lines whenever an order is created or modified.customAttributesis a collection of dynamically extended columns of the order line entity. It is published as an attribute of typejsonnodewhose value is a JSON array object. Each element in the array is composed of attribute identifier of the column along with its data type and value.In order to publish the values for custom attributes in the event of
orderLine, you must first create the custom attributes by using the Object Extensibility support in Sterling™ Business Center. For more information, see Create extended attributes.Consider an example of an order line that has the following custom attributes configured and activated.OverrideLeadDayswith the data type asIntegerEndOfServiceDatewith the data type asDateLineServiceTypewith the data type asTextOverrideReturnQtywith the data type asDecimalIsPreOrderwith the data type asBoolean
Create a sales order with an item and define these custom attributes for the order line. For example, modify a sales order SO1 to add a new item Prod1 having these custom attributes at the
orderLinelevel:OverrideLeadDays="90",EndOfServiceDate="20201231T23:59:59",LineServiceType="VIP",OverrideReturnQty="0.5",IsPreOrder="Y"
When the order is changed, the data that is published by theorderModifiedevent under theorderLineevent will have these attributes as part of thecustomAttributesarray.Note:If you update custom attributes (other than the Boolean type) to NULL, such custom attributes are no longer associated with the order line.
See orderModified Schema for the event data in the JSON format.