Fluent Commerce Logo
Docs
Sign In

UpdateAggregateVirtualPosition

Rule

Changed on:

3 Nov 2023

Overview

Updates an aggregate virtual position including inventory positions in the given {statuses}

Plugin NameInventory Reference Module
Namespace{{accountId}}.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 Modules includes the following areas:

  • Inventory Catalogue workflow
  • Virtual Catalogue workflow
  • Control Group workflow
  • Product Catalogue workflow

UI Description

Updates an aggregate virtual position including inventory positions in the given {statuses}

Accepts

  • VIRTUAL_POSITION

Actions

  • This rule produces a MutationAction to update the associated virtual position's qty base on the associated inventory positions and controls

Rule parameters

Parameter

Description

statuses

A list of inventory position statuses

Event attributes

Parameter

Description

Data Type

Required?

virtualCatalogueNetworkIds

The network references this virtual catalogue is made of

String

Required

virtualCatalogueRef

The ref of the virtual catalogue

String

Required

virtualCatalogueInventoryCatalogueRef

The inventory catalogue ref this virtual catalogue is made of

String

Required

virtualCatalogueProductCatalogueRef

The product catalogue ref this virtual catalogue is made of

String

Required

virtualCatalogueControlGroupRef

The control group ref this virtual catalogue is made of

String

Required

virtualPositionRef

The ref of the virtual position

String

Required

virtualPositionProductRef

The product ref of the virtual position

String

Required

virtualPositionGroupRef

The group reference value of the virtual position

String

Required

Exceptions

  • This rule throws a PropertyNotFoundException when the rule parameter 
    `statuses`
     is missing.
  • This rule throws a EventAttributeNotFoundException when any of the above event attributes are missing.

Configuration example

1{
2  "name": "FLUENTRETAIL.globalinventory.UpdateAggregateVirtualPosition",
3  "props": {
4    "statuses": [
5      "ACTIVE"
6    ]
7  }
8}

Language: json

Detailed Technical Description

  • The rule retrieves the virtual position and catalogue information from event attributes
  • Get the ID of the first network from the virtual catalogue
  • Load all the locations from the network
  • Load stock on hand for each location in the network
  • Loop through the locations and apply EXCLUSIONBUFFER or MASTER BUFFER controls. The details about the quantity calculation can be found in the section Calculate the aggregate quantity for the new virtual position of the rule CreateAggregateVirtualPosition

Version History

2023-08-03

v2.0.0

refers to the plguin

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo