Fluent Commerce Logo
Docs

ForwardIfInventoryPositionStatusEquals

Rule

Changed on:

12 Aug 2025

Overview

This article covers the following topics: 
  • Supported Entities: `VIRTUAL_POSITION`
  • This rule produces a `SendEventAction`
  • Rule Parameters
  • Event Attributes
  • Exceptions
  • Configuration Example
  • Detailed Technical Description
Plugin NameInventory 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

Forwards the event {eventName} to the virtual position if the status of the corresponding inventory position matches any of {statuses}

Accepts

  • VIRTUAL_POSITION

Actions

  • This rule produces a `SendEventAction` that forwards the incoming event as an inline event with the given name `{eventName}` if the status of the corresponding inventory position of the given virtual position is in the status list of the rule property. Otherwise, it does not have any output/output action.

Rule parameters

ParameterDescription
eventNameThe name of the event to be triggered
statusesA list of inventory position statuses

Event attributes

ParameterDescriptionData TypeRequired?
inventoryPositionRefInventory position refStringOptional
virtualCatalogueInventoryCatalogueRefThe ref of the inventory catalogue this virtual position is associated withStringRequired
virtualPositionProductRefThe product ref of the virtual positionStringRequired
virtualPositionGroupRefThe group reference value of the virtual positionStringRequired

Exceptions

  • This rule throws a PropertyNotFoundException when any rule parameter `statues` or `eventName` are missing.
  • This rule throws an EventAttributeNotFoundException when missing any of the above event attributes.

Configuration example

1{
2  "name": "<AccountId>.globalinventory.ForwardIfInventoryPositionStatusEquals",
3  "props": {
4    "statuses": [
5      "ACTIVE"
6    ],
7    "eventName": "UpdateBaseVirtualPosition"
8  }
9}

Detailed Technical Description

  • The rule retrieves the corresponding inventory position based on the inventory catalogue ref and inventory position ref.  If inventoryPositionRef is not provided, it’s calculated as `{productRef}:{virtualPositionGroupRef}:DEFAULT`
  • Verify if its status is in the list of statuses given by the rule property.
  • If yes, it forwards the inline event with the name `{eventName}`. Otherwise, do nothing.

Version History

2023-08-02

v2.0.0

refers to plugin