capacityAvailability event
The data that is published as part of the capacityAvailability event
contains total capacity as well as remaining capacity per Item-Node combination for each Date/Shift
configured for all the resource pools. The availability is calculated for each day. The number of
days to consider for the capacity calculation is configurable.
For more information, see Defining capacity rules.
The CALCULATE_CAPACITY_AVAILABILITY agent calculates the capacity and stores in
the YFS_CAPACITY_AVAILABILITY table. When any capacity availability record is
either inserted or updated in the table, the capacityAvailability event is invoked
to publish that data. The data in the table is converted to a format as a JSON message and publishes
it.
The capacityAvailability event is published conditionally, if the capacity
organization belongs to an enabled enterprise, the availability is changed by the
CALCULATE_CAPACITY_AVAILABILITY agent, and the resource pool is for
Purpose=INVENTORY.
Event schema
This event is a batch event where each batch contains one capacityAvailability
event. The event contains inventory capacity availability information for a given resource pool and
ShipNode-Date combination.
capacityAvailability event schema as an
example:[
{
"specversion": "1.0",
"type": "capacityAvailability",
"id": "capacityAvailability-<timestamp>-<random>",
"time": "ISO-8601 datetime",
"datacontenttype": "application/json",
"tenantid": "string",
"data": {
"capacityAvailabilityKey": "string",
"enterprise": "string",
"resourcePoolID": "string",
"shipNode": "string",
"capacityUnitOfMeasure": "string",
"deliveryMethod": "string",
"availableDate": "YYYY-MM-DD",
"availableCapacity": "decimal",
"totalStandardCapacity": "decimal",
"totalSupplementCapacity": "decimal",
"startTime": "ISO-8601 datetime",
"endTime": "ISO-8601 datetime"
}
}
]