UpdateAggregateVirtualPosition
Changed on:
24 Oct 2024
Overview
Update an Aggregate Virtual Position and calculate its Available-to-Sell (ATS) quantity.
Aggregate Virtual Position ATS calculation is based on the associated Inventory Positions Stock on Hand (SOH) quantities and the applied Controls.
The associated Inventory Positions are defined with:
- The given Product Reference
- The list of Locations for the given Network (the first Network assigned to the Virtual Catalog)
- The specified Inventory Position Statuses
Plugin Name | Inventory Reference Module |
---|---|
Namespace | [[account.id]].globalinventory |
The Inventory Reference Module is the foundation for inventory 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 Inventory Module includes the following areas:
- Product Catalogue workflow
- Inventory Catalogue workflow
- Control Group workflow
- Virtual Catalogue workflow
UI Description
Updates an aggregate virtual position including inventory positions in the given {statuses}.
Accepts
- VIRTUAL_POSITION
Actions
- This Rule produces a MutateAction that updates the target Aggregate Virtual Position ATS quantity.
Rule parameters
Name | Type | Description |
|
| Statuses of the Inventory Positions to be used for Aggregate Virtual Position ATS calculation |
Event attributes
Name | Type | Description | Required |
|
| Virtual Position Reference | Required |
|
| Product Reference of the Virtual Position | Required |
|
| Group Reference of the Virtual Position | Required |
|
| Reference of the Virtual Catalog | Required |
|
| Reference of the Inventory Catalog associated with the Virtual Catalog | Required |
|
| Reference of the Product Catalog associated with the Virtual Catalog | Required |
|
| Reference of the Control Group associated with the Virtual Catalog | Required |
|
| Network IDs of the Virtual Catalog | Required |
Exceptions
- This Rule throws a when the Rule parameter(s) is not provided.
`PropertyNotFoundException`
- This Rule throws an when the required Event attribute(s) is not provided.
`EventAttributeNotFoundException`
Configuration example
1{
2 "name": "[[account.id]].globalinventory.UpdateAggregateVirtualPosition",
3 "props": {
4 "statuses": [
5 "ACTIVE",
6 "AT_RISK",
7 "OUT_OF_STOCK"
8 ]
9 }
10}
Language: json
Detailed Technical Description
This Rule execution includes the following steps:
- The Rule retrieves the Aggregate Virtual Position and Catalog data from the Event attributes.
- The Rule determines the Inventory Positions associated with the Aggregate Virtual Position (to be updated):
- Load the list of Location References from the Network assigned to the given Virtual Catalog.
Only the first Network from theEvent attribute is considered.`virtualCatalogueNetworkIds`
- Query Inventory Positions by:
- The given Inventory Catalog Reference (Event attribute)
`virtualCatalogueInventoryCatalogueRef`
- The given Product Reference (Event attribute)
`virtualPositionProductRef`
- The loaded (in the previous step) list of Location References
- The specified Inventory Position Statuses (Rule parameter)
`statuses`
- The given Inventory Catalog Reference (
- Load the list of Location References from the Network assigned to the given Virtual Catalog.
- The Rule calculates the updated Aggregate Virtual Position ATS quantity based on the determined Inventory Positions SOH quantities and the relevant Controls to be applied.
The ATS calculation algorithm equals the one used in theRule and is described below.`CreateAggregateVirtualPosition`
- The Rule produces a MutateAction that updates the Aggregate Virtual Position with the calculated (point 3) ATS quantity.
Version History
v.24.10.28
This Rule has been optimized to load all the related Controls (by Product, its Categories, and list of Locations) at once for efficient Aggregate Virtual Position Available-to-Sell (ATS) calculations.
The Rule Version refers to the Product Release Version.
v2.0.0
refers to the plguin