Event thresholds are used to control the frequency of generation of availability events
by providing configuration at different levels. Event threshold can be configured at global, item,
node, or distribution group level. The threshold configuration is used to validate availability
quantity so that events are only published when it falls below
or
above
threshold (low, medium, high
). The event is published when
quantity crosses any of the threshold levels regardless of threshold settings by default. The
eventThreshold configuration is used with the
thresholdLevel field that is stamped on the availability records when they are
calculated. This API is introduced to define a high, medium, and low availability event level
threshold at tenant level, distribution group level, ship node level, and item level.
Important: You can control the publishing of the event data at tenant level, at ship
node level, and at SKU level. The SKU level takes precedence over ship level. And ship node level
takes precedence over tenant level. Also, the raise-event flag at tenant level always takes
precedence regardless of any other settings that are used. If the raise-event flag is set to false,
the SKU level settings can be used to attain selective publishing of SKU data to webhook or Cloud
Object Storage endpoints.
Configuration values
The event level threshold value is the string representation of the threshold level. Each level
is inclusive. For example, an eventThreshold of BELOW_HIGH
means that an availability event is raised when an availability's threshold level is
BELOW_HIGH, BELOW_MEDIUM, or
BELOW_LOW. The available values are as follows:
Threshold Level |
Description |
NONE |
No events are published. |
BELOW_LOW |
Availability with quantity less than the low threshold is published. |
BELOW_MEDIUM |
Availability with quantity less than the medium threshold is published. |
BELOW_HIGH |
Availability with quantity less than the high threshold is published. |
ABOVE_LOW |
Availability with quantity more than the low threshold is published. |
ABOVE_MEDIUM |
Availability with quantity more than the medium threshold is published. |
ABOVE_HIGH |
Availability with quantity more than the high threshold is published. |
ALL |
All events are published. |
The API for event threshold at tenant level, item level, ship node level, and distribution group
level are introduced. For more information, refer to Sterling Intelligent
Promising APIs.
There are three different configuration options that are used in the following order of priority.
- Item
- Location (ship node or distribution group)
- Global (tenant specific)
Note: All existing tenants have their global level set to ALL. Therefore, they might not see
any behavioral change until they update the setting.
Table 1. Event threshold configurations: Example
configuration
Configuration |
Identifier |
Event threshold |
Global |
|
BELOW_LOW |
DG |
EastGroup |
ABOVE_MEDIUM |
Node |
store-BostonMA |
BELOW_MEDIUM |
Item |
t-shirt |
BELOW_LOW |
Table 2. Availability events: Example scenario
SKU |
Current availability threshold level |
Event raised |
Description |
t-shirt / store-BostonMA |
BELOW_LOW |
Yes |
Item event threshold is less than the lowest level. |
t-shirt / store-LittletonMA |
BELOW_MEDIUM |
No |
Item event threshold is less than the lowest level. |
jersey / store-BostonMA |
BELOW_LOW |
Yes |
No item configuration; Node event threshold is less than the medium level. |
jersey / store-LittletonMA |
BELOW_HIGH |
No |
No item configuration; No node configuration; Global event threshold is lesser than the
lowest level. |
t-shirt / EastGroup |
BELOW_HIGH |
No |
Item event threshold is less than the lowest level. |
jersey / EastGroup |
BELOW_HIGH |
Yes |
No item configuration; DG event threshold is more than the medium level. |
Enabling event publishing when crossing thresholds
In addition to configuring event threshold at global level, you can also configure and publish an
event if there is a change in the availability at threshold level. You can use the global event
threshold API to configure the new raiseOnThresholdChange
property for raising
events when any threshold is crossed.
- If
raiseOnThresholdChange
is set to true and event availability threshold level
is changed, the event is raised regardless of the configuration of event threshold level except when
it is set to NONE
.
- If event threshold level configuration is set to
NONE
, the event will not be
raised regardless of the configuration value of raiseOnThresholdChange
.
- The default value of
raiseOnThresholdChange
is TRUE
.
Table 3. Global event threshold configurations: Example scenario
Event threshold level |
Low |
Medium |
High |
BELOW_LOW |
10 |
50 |
100 |
For more information on the APIs, refer to Sterling Intelligent
Promising APIs.
Table 4. Availability events: Example scenario 1 (raiseOnThresholdChange = true)
Available quantity |
Current availability threshold level |
Event raised |
Explanation |
15 |
BELOW_MEDIUM |
Yes |
Item event crosses threshold as first event. |
25 |
BELOW_MEDIUM |
No |
Item event threshold is less than medium level and it does not cross threshold. |
55 |
BELOW_HIGH |
Yes |
Item event crosses threshold, the previous item event threshold is less than medium
level. |
5 |
BELOW_LOW |
Yes |
Item event threshold is less than lowest level. |
10 |
BELOW_LOW |
Yes |
Item event threshold is less than lowest level. |
Table 5. Availability events: Example scenario 2 (raiseOnThresholdChange = false)
Available quantity |
Current availability threshold level |
Event raised |
Explanation |
15 |
BELOW_MEDIUM |
No |
Item event threshold is below medium and event publishing is disabled when crossing
thresholds. |
25 |
BELOW_MEDIUM |
No |
Item event threshold is less than the medium level. |
55 |
BELOW_HIGH |
No |
Item event threshold is less than highest level and event publishing is disabled when
crossing thresholds. |
5 |
BELOW_LOW |
Yes |
Item event threshold is less than the lowest level. |
10 |
BELOW_LOW |
Yes |
Item event threshold is less than the lowest level. |