orderCreated event

The orderCreated event provides basic order information, order lines, and order line statuses. It is published when a confirmed order is created or when a draft order is confirmed.

Order lines and their statuses are modeled as individual events that are published together with the main event. To receive order data, subscribe these events along with the orderCreated event. These accompanying events are described as follows:

orderLine event

This event is published with the orderCreated event whenever an order is created with one or more order lines. This event publishes order line information such as orderLineKey, productID, quantity, deliveryMethod, and so on.

orderLineStatus event

Different units on an order line can be in different statuses. This event publishes status quantity break up for the order line. If the order line has multiple statuses, then this event is published for each status. This event is published along with the orderCreated and orderLine events.

Event schema

The orderCreated event is published in batches along with orderLine and orderLineStatus events. The data is de-normalized at line status level. In other words, for every orderLineStatus event, the corresponding orderLine event for the associated order line and orderCreated event representing the order are batched together.

For example, if an order is created in Sterling™ Order Management System Software with three order lines and assuming that all units of the order lines are in one status. Then there will be three batches published. Each batch will contain one orderLineStatus event, one orderLine event and one orderCreated event.

The event schema now supports publishing customAttributes for order lines whenever an order is created or modified. customAttributes is a collection of dynamically extended columns of the order line entity. It is published as an attribute of type jsonnode whose 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.
  • OverrideLeadDays with the data type as Integer
  • EndOfServiceDate with the data type as Date
  • LineServiceType with the data type as Text
  • OverrideReturnQty with the data type as Decimal
  • IsPreOrder with the data type as Boolean
Create a sales order with an item and define these custom attributes for the order line. For example, create a sales order SO1 with an item Prod1 having these custom attributes at the orderLine level: OverrideLeadDays="90", EndOfServiceDate="20201231T23:59:59", LineServiceType="VIP", OverrideReturnQty="0.5", IsPreOrder="Y".
When the order is created, the data that is published under the orderLine event will have these attributes as part of the customAttributes array.
Note:

If you update custom attributes (other than the Boolean type) to NULL, such custom attributes are no longer associated with the order line.

Refer orderCreated Schema for the event data in JSON format.