Fluent Commerce Logo
Docs
Sign In

Inventory Reference Module

Package

Changed on:

11 Apr 2025

Publisher:Fluent Commerce
Website:Fluent Commerce

Download reference module

Interface contracts

Dependencies

Version History

2025-04-14

Key Changes

  • The CreateBaseVirtualPosition, UpdateBaseVirtualPosition, CreateAggregateVirtualPosition, and UpdateAggregateVirtualPosition rules now apply control-specific logic only if the event includes a Control Group reference (
    `virtualCatalogueControlGroupRef`
    event attribute). The Control Group reference is initially loaded from the Virtual Catalog (see LoadVirtualPositionAndVirtualCatalogueDetails).
    • Before this enhancement, the rules would run control logic even when a Control Group reference was absent, which could cause errors during updates.
    • Now, if a Control Group reference is not present in the event payload, the control logic is skipped, which matches the expected optional behavior.
  • The rule descriptions have been updated to clearly show that
    `virtualCatalogueControlGroupRef`
    is optional and to avoid confusion about required fields.
2025-02-18

Key Changes:

  • Rules and Utilities
    • `ApplyThresholdControlsToInventoryPosition`
      and
      `ApplyThresholdControlsToVirtualPosition`
      Rules have been enhanced to apply fallback logic that imitates the presence of an Active Bulk Threshold Control (applicable to all the Inventory and Virtual Catalogs) to ensure the correct management of Position Statuses when no Bulk Threshold Controls are configured. Previously, Inventory and Virtual Positions remained in the
      `CREATED`
      Status when no Active Bulk Threshold Control(s) was available for a corresponding Inventory or Virtual Catalog.
    • New
      `UpsertInventoryQuantity`
      and
      `LoadInventoryPositionData`
      Rules have been introduced to enable Inventory Quantity Type configuration for Inventory Quantity creation or update via the Batch.
  • Reference Workflows

Note:

2024-10-28

Key Changes:

2024-09-19

Key Changes:

  • Inventory and Virtual Position Reference Statuses have been extended with
    `OUT_OF_STOCK`
    and
    `AT_RISK`
    Statuses.
  • A New Reference Control Type
    `BULK_THRESHOLD`
    has been introduced. It is driven by threshold-based logic and applicable to both Inventory and Virtual Positions, empowering Inventory stock Status management.
  • Reference Inventory Workflows have been updated with New Rules:
    `ApplyThresholdControlsToInventoryPosition`
    and
    `ApplyThresholdControlsToVirtualPosition`
    , utilized in the following Rulesets:
    • Inventory Catalog:
      `UpdateOnHand`
      ,
      `ActivateInventoryPosition`
      ,
      `UpdateOnHandForFulfilment`
    • Virtual Catalogs
      • Base:
        `CREATE`
        ,
        `UpdateBaseVirtualPosition`
      • Aggregate:
        `CREATE`
        ,
        `UpdateAggregateVirtualPosition`
    • Rulesets' Triggers and Status Properties have been updated to reflect the introduction of the new Statuses.

Limitations:

2024-09-16

Enhanced Rules: The following inventory rules have been updated to support flexible inventory catalog types and to remove the dependency on the default catalog type:

  • `SplitInventoryUpdates`
  • `InventoryChanged`
  • `LoadInventoryPosition`
  • `CheckIfInventoryPositionExists`
  • `DownToInventoryPositionIfExists`
  • `CheckInventoryQuantityExists`
  • `ForwardIfInventoryQuantityTypeExists`
  • `BatchInventoryPositionUpdate`
  • `UpdateInventoryQuantity`
  • `CreateBaseVirtualPosition`
  • `UpdateBaseVirtualPosition`
  • `LoadVirtualPositionAndVirtualCatalogueDetails`
  • `NotifyVirtualCatalogueOnNetworkMatch`

Key Changes:

  • Inventory position types now inherit from the inventory catalog type, enabling workflows and plugins to function across different catalog types without rule modifications.
  • The subtype in the inventory catalog workflow must be correctly set to leverage this flexibility, ensuring rules are no longer limited to the default catalog type.
  • Rule updates have removed the hard-coded inventory catalog type (DEFAULT), increasing the usability of these rules with non-default catalogs.
  • A new field,
    `inventoryQuantity`
    , has been introduced for the
    `InventoryChanged`
    event. This field aggregates all attributes under "attributes" from inventory batches and related rulesets like
    `INVENTORY_UPDATE`
    . Specific keys like "condition," "expectedOn," and "storageAreaRef" will be updated at the inventory quantity level, while other attributes will be available in workflows for further actions.
2024-08-15
  • Rule Enhancement: Updated the
    `LoadInventoryPosition`
    rule to limit retrieval to the
    `LAST_ON_HAND`
    inventory quantity type.
    • This change reduces unnecessary data fetching, focusing only on relevant inventory quantities.
  • Improved Performance:
    • By narrowing the data retrieval scope, the module processes inventory data more efficiently.
  • No Workflow Changes:
    • The update involves only a change to the inventory rule, with no impact on existing workflows or operations from the 1.3.0 version
2024-07-04

Module release including:

  • Reference Module Structure Improvements:
    • The Module File and Folder Organization has been updated
    • The Naming and Versioning have been improved
    • The Core Module dependency has been established, utilizing its Reference Rules
    • The Workflows Ruleset Key Fields have been arranged
    • The Workflows Placeholder and Default Value Formats have been modified
  • Reference Workflows Enhancements and Fixes:
2023-05-18

Minor Module release with fixes

2023-05-04

Minor Module release with the following fixes:

  • `SplitUpdatesAndDownToInventoryPosition`
     rule has been updated to 
    `SplitInventoryUpdates`
     to correctly send the following events to the right entity level
  • `SplitDeltasAndDownToInventoryPosition`
     rule will correctly work with more than 10 delta updates
  • New 
    `CreateBaseVirtualPositionIfNotPresent`
     rule & reference workflow were introduced to handle an edge case where a Virtual Position won't be created when creating a new Inventory Position
2023-03-31

Minor Module release including Reference Inventory Catalog Workflow update

2023-02-22

Module release including reference implementations of Inventory Delta updates and direct Last on Hand Inventory Updates.

2022-04-19

v1.1.0

Module release with reference implementation of Product Catalog domain.

2022-02-15

v1.0.0

Initial Inventory Reference Module release.

Overview

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 Catalog workflow
  • Inventory Catalog workflow
  • Control Group workflows
  • Virtual Catalog workflows

Detailed Technical Description

The artifacts below make up the Inventory Module.

Workflows:

Name

Primary Entity

Description

Product Catalog

`PRODUCT_CATALOGUE`

This workflow is used to implement the Product Catalog entity features within the Inventory Module

Inventory Catalog

`INVENTORY_CATALOGUE`

This workflow is used to implement the Inventory Catalog entity features within the Inventory Module

Virtual Catalog

`VIRTUAL_CATALOGUE`

This workflow is used to implement the Virtual Catalog entity features within the Inventory Module

Control Group

`CONTROL_GROUP`

This workflow is used to implement the Control Group entity features within the Inventory Module

Rules

Name

Description

ApplyThresholdControlsToInventoryPosition

Apply Threshold Controls to an Inventory Position and determine its Status.

ApplyThresholdControlsToVirtualPosition

Apply Threshold Controls to a Virtual Position and determine its Status.

CalculateOnHand

Calculates the onHand value of an inventory position using inventory quantities filtered by statuses and types followed by sending an event

ChangeStateGQL

Change the state of the current entity

CreateAggregateVirtualPosition

Creates an aggregate virtual position and sends an event

CreateBaseVirtualPosition

Creates a base virtual position and sends an event

CreateBaseVirtualPositionIfNotPresent

Checks if a base virtual position exists and creates the position if it doesn't already exist

CreateCategory

Creates a category

CreateDeltaInventoryQuantities

Creates an Inventory Quantity(ies) for the specified Inventory Position

CreateInventoryPosition

Creates an Inventory Position

CreateFulfilmentInventoryQuantity

Creates an Inventory Quantity for a Fulfillment

CreateInventoryQuantity

Creates an Inventory Quantity

CreateStandardProduct

Creates a Standard Product

CreateVariantProduct

Creates a Variant Product

DownToCategory

Sends an event to the Category entity

DownToInventoryPosition

Send an event to the Inventory Position entity

DownToInventoryPositionIfExists

Checks if an Inventory Position exists and if so sends an event

DownToProduct

Sends an event to the Product entity

DownToVirtualPositionIfExists

Checks if a Virtual Position exists and if so sends an event

Forward

Send an event

ForwardIfCategoryExists

Checks if a Category exists and if so sends an event

ForwardIfCategoryNotExists

Checks if a Category exists and if not sends an event

ForwardIfIncomingAttributeEquals

Sends an event if an attribute equals a given value

ForwardIfInventoryPositionNotExists

Checks if an Inventory Position exists and if not sends an event

ForwardIfInventoryPositionStatusEquals

Checks an Inventory Position status and sends an event on match

ForwardIfInventoryQuantityOfTypeExists

Checks if an Inventory Quantity of the specified type exists and if so sends an event

ForwardIfInventoryQuantityOfTypeNotExists

Checks if an Inventory Quantity of the specified type exists and if not sends an event

ForwardIfLocationStatusEquals

Checks a Location status and sends an event on match

ForwardIfOnHandChanged

Sends an event if the onHand value has changed

ForwardIfProductStatusEquals

Checks a Product status and sends an event on match

ForwardIfStandardProductExists

Checks if a Standard Product exists and if so sends an event

ForwardIfStandardProductNotExists

Checks if a Standard Product exists and if not sends an event

ForwardIfVariantProductExists

Checks if a Variant Product exists and if so sends an event

ForwardIfVariantProductNotExists

Checks if a Variant Product exists and if not sends an event

ForwardIfVirtualPositionNotExists

Checks if a Virtual Position exists and if not sends an event

LoadInventoryPosition

Load the given Inventory Position and its Inventory Quantity (of the

`LAST_ON_HAND`
Type) data and send an event

LoadInventoryPositionData

Load the given Inventory Position data and send an event

This Rule is a simplified version of the

Rule

LoadProductAndLocationStatus

Loads the status of the related Product and Location for an Inventory Position and send an event

LoadVirtualPositionAndVirtualCatalogueDetails

Loads the virtual position details and then sends an event

NotifyInventoryCatalogueForProduct

Send an event to an Inventory Catalog on Product update

NotifyVirtualCataloguesOnNetworksMatch

Send an event (or multiple events) to Virtual Catalog(s) if its Network(s) finds a match with a given Inventory Position Location Network(s).

NotifyVirtualCataloguesByRefsOnNetworksMatch

Send an event (or multiple events) to the Virtual Catalog(s) specified by its Reference(s) if its Network(s) finds a match with a given Inventory Position Location Network(s).

NotifyVirtualCataloguesByTypesOnNetworksMatch

Send an event (or multiple events) to Virtual Catalog(s) specified by its Type(s) if its Network(s) finds a match with a given Inventory Position Location Network(s).

ProducePositionEventsForLocation

Send events to all Inventory Positions related to the given Location

ProducePositionEventsForProduct

Send events to all Inventory Positions related to the given Product

ProduceVirtualPositionEventsForControlUpdate

Send events to all Virtual Positions when a control is updated

ResetBaseVirtualPosition

Set a Base Virtual Position value to 0

SendEventGQL

Send an event

SendEventOnFulfilmentInventoryUpdate

Send events to create fulfilment related Inventory Quantities

SendEventToAllInventoryQuantities

Send an event to all Inventory Quantities related to an Inventory Position

SplitDeltasAndDownToInventoryPosition

Notifies the inventory positions of the incoming deltas with an event

UpdateAggregateVirtualPosition

Update an Aggregate Virtual Position

UpdateBaseVirtualPosition

Update a Base Virtual Position

UpdateCategoriesForStandardProduct

Update related Categories for a Standard Product

UpdateCategoriesForVariantProduct

Update related Categories for a Variant Product

UpdateCategory

Update a Category

UpdateControlValue

Update the value of a Control

UpdateInventoryQuantitiesStatus

Bulk update Inventory Quantities related to an Inventory Position

UpdateInventoryQuantity

Update an Inventory Quantity

UpdateOnHand

Update an Inventory Positions onHand

UpdateStandardProduct

Update a Standard Product

UpdateVariantProduct

Update a Variant Product

UpsertInventoryQuantity

Create or Update an Inventory Quantity

ValidateCategoriesExist

Validate whether the given categories exist

ValidateIncomingCategory

Validate if the given category exists

ValidateIncomingProduct

Validate if the given product exists

ValidateProductCategoriesExist

Validate if the categories in the product payload exist

ValidateStandardProduct

Validate if a standard product has valid information

ValidateVariantProduct

Validate if a variant product has valid information


No alt text provided
Capability type:Module