CalculateOnHand
Changed on:
13 Nov 2023
Overview
Calculates the onHand value of an position using quantities filtered by statuses {filterStatuses} and types {filterTypes}, and then send the {eventName}
Plugin Name | Inventory Reference Module |
---|---|
Namespace | [[account.id]].globalinventory |
The is the foundation for related implementations. It provides reference Workflows for inventory ingestion and processing. Extensible by design, use this Module as a base to build a solution to the needs of your customers.
The Module includes the following areas:
- Product Catalogue workflow
- Inventory Catalogue workflow
- Control Group workflow
- Virtual Catalogue workflow
UI Description
Calculates the onHand value of an inventory position using inventory quantities filtered by statuses {filterStatuses} and types {filterTypes}, and then send the event {eventName}
Accepts
- INVENTORY_POSITION
Actions
- This rule produces a SendEventAction that will send an inline event with the attribute inventoryPositionOnHandCalculated set to True
Rule parameters
Parameter | Description |
eventName | The name of to be triggered after calculating the on-hand |
filterTypes | List of quantity types that should be updated |
filterStatuses | List of quantity statuses that should be updated |
Event attributes
Not Applicable for this .
Exceptions
If `eventName`
property is not set in the , a PropertyNotFoundException will be thrown. If the `filterStatuses`
and `filterTypes`
cannot be converted to a valid list of Strings InvalidPropertyTypeException exception will be thrown.
Configuration example
1{
2 "name": "FLUENTRETAIL.globalinventory.CalculateOnHand",
3 "props": {
4 "filterTypes": ["SALE","CORRECTION"],
5 "eventName": "on_hand_calculated",
6 "filterStatuses": ["CREATED","ACTIVE"]
7 }
8}
Detailed Technical Description
Using the Quantity types `{filterTypes}`
and Quantity statuses `{filterStatuses}`
configured through , this calculates the current `{onHand}`
value for a given position. This calculation is done by summing all the Quantities returned by the query where the Quantities match both of the filtered statuses and the filtered types. position ref and catalogue ref are taken from the incoming . After the on-hand value is calculated, this sets the on-hand value as an of the generated , which is an . The name is called `inventoryPositionOnHandCalculated`
. The name of the generated by this is taken from the attributes configured through `{eventName}`
.
Version History
v2.0.0
refers to