ForwardIfOnHandChanged
Rule
Changed on:
8 Dec 2025
Overview
Forwards the configured event when the inventory position’s on-hand value changes.The rule compares the current on-hand value with the newly calculated on-hand value and forwards the event only when these values differ.| Plugin Name | Inventory Reference Module |
|---|---|
| Namespace | [[account.id]].globalinventory |
- Product Catalogue workflow
- Inventory Catalogue workflow
- Control Group workflow
- Virtual Catalogue workflow
UI Description
Forward the event {eventName} if the inventory position onHand value has changed
Accepts
- INVENTORY_POSITION
Actions
- This rule produces a SendEventAction that will send an event {eventName} to the given inventory position when the onHand changes
Rule parameters
| Name | Type | Description |
`eventName` | `String` | The name of event to be triggered |
Event attributes
| Name | Type | Description | Required? |
`inventoryPositionOnHandCalculated` | `Integer` | The newly calculated on-hand value for the inventory position (typically produced by the preceding `CalculateOnHand` rule or equivalent logic) | Yes |
`inventoryPositionOnHand` | `Integer` | The current on-hand value of the inventory position before the new calculation is applied | Yes |
Exceptions
- This Rule throws a
`PropertyNotFoundException`when the Rule parameter(s) is not provided.
- This Rule throws an
`EventAttributeNotFoundException`when the required Event attribute(s) is not provided.
Configuration example
1{
2 "name": "[[account.id]].globalinventory.ForwardIfOnHandChanged",
3 "props": {
4 "eventName": "UpdateOnHand"
5 }
6}Detailed Technical Description
The rule execution includes the following steps:- Validate that the
`eventName`rule parameter is provided - Validate that the incoming event includes both
`inventoryPositionOnHand`and`inventoryPositionOnHandCalculated`event attributes - Compare
`inventoryPositionOnHandCalculated`to`inventoryPositionOnHand`. If the values are different, forward an inline event with the configured`eventName`to the inventory position
Version History
See previous versions
2023-08-02